We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

check box in GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

43465 Apr 24,2006 12:09 PM UTC Apr 25,2006 07:33 AM UTC WinForms 4
loading
Tags: GridControl
Fady Sayegh
Asked On April 24, 2006 12:09 PM UTC

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

Administrator [Syncfusion]
Replied On 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

Fady Sayegh
Replied On 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

Administrator [Syncfusion]
Replied On 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

Fady Sayegh
Replied On April 25, 2006 07:33 AM UTC

Hi Haneef, thanks to your reply, it works fady

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;