Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

display a DTC databound checkbox in a DTC

Posted on 2002-05-31
1
Medium Priority
?
250 Views
Last Modified: 2013-12-24
How do I display a DTC databound checkbox in a DTC datagrid?
Thanks
0
Comment
Question by:revman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
begaj earned 400 total points
ID: 7341259
revman,

you will have to use some script to do this:

In one of the columns of the datagrid enter hidden field to hold absolutePosition for each record. i.e.

"<input type=hidden name=abspos value=" + Recordset1.absolutePosition + ">"

In the column that you want to display checkbox put a function something like this:

=WriteCheckBox([JobDone], Recordset1.absolutePosition)

and the function should look something like:

<script LANGUAGE="vbscript" RUNAT="Server">
     Function WriteCheckBox(txtCompleted, numPos)
          Select Case txtCompleted
               Case "ON"
                    CheckBox = "ON"
               Case "OFF"
                    CheckBox = "OFF"
          End Select
         
          OutVal = "<input name=Completed" & numPos & " type=checkbox  value="" & CheckBox & "">&nbsp;"
         
          WriteCheckBox = OutVal
End Function

To update recordset use a function which you call using a button or on any event (i.e.thisPage.onenter()) and check if the field value is different to checkbox value.

Long time since I've done this (and I've used radio buttons) so it might need twiking. Hope this helps.

Enjoy!
0

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question