Solved

display a DTC databound checkbox in a DTC

Posted on 2002-05-31
1
249 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 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

Webinar: MongoDB® Index Types

Join Percona’s Senior Technical Services Engineer, Adamo Tonete as he presents “MongoDB Index Types, How, When and Where Should They be Used?” on Wednesday, July 12, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7).

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…
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 …
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…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

628 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