hi to all,
i''m using the GridDataBoundGrid control, i have a column that contains a checkbox.
my GridDataBoundGrid populates correctly (check boxes included).
the problem is when i click with the mouse to change the state of the check box of a cell, nothing happend. but if i move to the cell and hit the space bar than the state of the check box change.
does someone has a solution for this ?
best regards and thanks in advance
fady
AD
Administrator
Syncfusion Team
April 24, 2006 12:33 PM UTC
Hi Fady,
I have tested this issue by creating a sample using GridDatabound in v.4.1.0.50 and then again tested by upgrading to 4.1.0.62. I was not able to reproduce the issue.
Here is a sample
http://www.syncfusion.com/Support/user/uploads/DataBoundGrid_83f7e444.zip
Could you please run this at your end and let me know how it goes?
Thanks for your patience.
Best Regards,
Haneef
FS
Fady Sayegh
April 24, 2006 01:43 PM UTC
Hi Haneef,
thanks to your reply, the code you post work fine.
if you want to reproduce the bug, try to add these two lines on PrepareViewStyleInfo event to your sample :
if (e.RowIndex > 0 && e.ColIndex == 5)
e.Style.HorizontalAlignment = GridHorizontalAlignment.Left;
sometimes i need to align the check box to the left or to the right.
so when i click on the checkbox, nothing happened, but when i click on the left of the check box the state change (from checked to unchecke and vice versa).
i don''t know if you see my problem ? but it seems that the control GridDataBoundGrid memorize then initial position of the check box in the cell, and the user have to click always in the memorized area.
do you have a solution for that ?
best regards and thanks in advance
fady
AD
Administrator
Syncfusion Team
April 25, 2006 05:05 AM UTC
Hi Fady,
Please use this code in CellClick event to change the cellvalue of the checkbox in a grid .Here is a code snippet.
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if(cc.Renderer.CurrentStyle.CellType == "CheckBox")
{
this.gridDataBoundGrid1.Model[cc.RowIndex,cc.ColIndex].CellValue = !((bool)cc.Renderer.ControlValue) ;
}
Please let me know if this helps.
Regards,
Haneef
FS
Fady Sayegh
April 25, 2006 07:33 AM UTC
Hi Haneef,
thanks to your reply, it works
fady