Solved

display a DTC databound checkbox in a DTC

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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ColdFusion and quickBooks 4 81
Web Developer 7 285
Building a Netflix-style website for a beginner to intermediate web-builder. 6 1,671
WEB Service vs ??? 7 133
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…

751 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