-
February 25th, 2002, 12:54 AM
#1
Show Check Box in DataGrid Control
How can I show check box in a datagrid control ?
Thanks.
-
February 25th, 2002, 01:46 AM
#2
Re: Show Check Box in DataGrid Control
Right click on the DataGrid and then choose Retrieve Fields from the popup menu. Then Right click on the DataGrid again and choose properties from the popup menu. Then in the tabbed form that will show up, choose the Format tab. In that tab, choose the column you want to assign a checkbox to, from the combobox, and then from the listbox below that choose CheckBox. Make sure that the column you choose has valid boolean data.
-
February 25th, 2002, 04:33 AM
#3
Re: Show Check Box in DataGrid Control
Her is how you can show the checkboxes programaticaly. Add a reference to Microsoft Data Formatting Object Library. Then Add the following code to your formrivate withevents fmtMyFormat as StdDataFormat
private Sub Command1_Click()
set fmtMyFormat = new StdDataFormat
fmtMyFormat.Format = fmtCheckBox
'Change the column number 6 to the column number you want.
DataGrid1.Columns(6).DataFormat = fmtMyFormat
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|