compactframework >> How add Checkbox to datagrid

by Harsh Trivedi » Mon, 18 Jul 2005 13:17:22 GMT

Hi,
I want to checkbox column in datagrid.
In my PPC application when frmListing form opens( this is the name of the
form which has datagrid), all data from database is being filled through
calling of web service. Now I want to add checkbox in datagrid, which will
represents the boolean value of a field in database.If in database if value
is 1 then for that row checkbox should be checked otherwise not checked.
Thank you in advace



Similar Threads

1. Adding checkbox to datagrid headers

Can anyone help me with this.
I have a datagrid on a page which is used to show different views from 
SQL-Server.
With autogenerate columns, this works fine for me. But now I want a checkbox 
before every caption in the header. With this checkbox I'm goint to determine 
if the user wants that field in his/her final print or export.

I'm able to add the checkbox on designtime by using Itemtemplates, but I can 
not get this to work on runtime. 

Thanks in advance 

2. how to add checkbox in DataGrid control dynamically? - ASP.NET Web Controls

3. Adding CheckBox to DataGrid in Header

Does Anyone know how to add a checkbox in the header of a 
datagrid so when they click the checkbox, all the rows 
will be checked?

Thanks

Tom

4. Add Checkbox to DataGrid Header - VB.Net

5. Added CheckBox to a DataGrid Doesn't work with DataGrid.Enabled=False

I have created a Template Column and Added to a Datagrid, which
contains a checkBox. The column is not Binded to any column of the
Dataset, but is an extra one so i can retrieve on Save Button which
rows are selected and make the necessary work. The problem is that my
page has 3 states. The 1 one is when form is first loaded. When i
click the Save button the Page goes to state 2 and the DataGrid must
become Enabled = false, in order to ask from the user a confirmation
about the data, and finally when Save button is clicked again the
transaction must take place. At that point when i try to determine
which check boxes are selected through (which is correct):

foreach(DataGridItem mItem in CAssigned.Items){
CheckBox mBox = (CheckBox)cItem.Cells[CAssigned.GetCheckBoxColumnIndex()].Controls[0];
if (mBox.Checked){
   countCheckBox ++;
}
}
all the checkboxes are unselected.

WHEN i don't make DataGrid Enabled = false and leave it always enabled
i get always the correct values at the 3rd state of my form. Maybe
something is going wrong with Enabled property of the DataGrid?

Please Help!.

6. Master-Detail Datagrid -checkbox (once tick the checkbox, all the child checkbox is ticked) - VB.Net

7. Howto: Add a CheckBox column to bound WinForms DataGrid

check gridcolumnstyle collection of datagrid.

when you go through
datagrid1->properties->tablestylescollection->gridcolumnstylecollection.

you will have button there to add column style. that button is dropdown list
box. open list of that button. you will see add boolean column. that gives
you a checkbox column. with 2/3 states whatever you want.

Rajesh Patel

"Shmulik" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
> After running a query and binding the data to a DataGrid, I want to add a
> Checkbox column ("i.e., Delete/Edit/etc") -
> I've seen Asp.Net examples but I'm looking for a WinForms (C#) example.
>
> TIA
>
>


8. How Do I : Add a Click event to a checkbox in a DataGrid