Solved

display a DTC databound checkbox in a DTC

Posted on 2002-05-31
1
235 Views
Last Modified: 2013-12-24
How do I display a DTC databound checkbox in a DTC datagrid?
Thanks
0
Comment
Question by:revman
1 Comment
 

Accepted Solution

by:
begaj earned 100 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
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 connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now