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. Image for the cookie policy date

Problem when focus shifts away from the GDBG

I have a GDBG 1.6.1,6, It is bound to a DataView, most of the columns are bound checkboxes. When user clicks on any checkbox in the first row of the grid, and then clicks on any other control (such as a button) on a form, the first row's checkbox is reset to the original state. This does not happen if user edits any other row, i.e. clicking away does not change state of the row unexpectedly (which is the normal behavior) Gene Gorokhovsky

7 Replies

GG Gene Gorokhovsky November 13, 2003 06:57 PM UTC

More info: the problem only occurs when editing the first row is the first action that user does on the grid. After changes to any other row the problem no longer manifests itself. > I have a GDBG 1.6.1,6, It is bound to a DataView, most of the columns are bound checkboxes. > When user clicks on any checkbox in the first row of the grid, and then clicks on any other control (such as a button) on a form, the first row's checkbox is reset to the original state. > This does not happen if user edits any other row, i.e. clicking away does not change state of the row unexpectedly (which is the normal behavior) > > Gene Gorokhovsky


AD Administrator Syncfusion Team November 13, 2003 11:27 PM UTC

I tried to see this problem in the attached sample using 1.6.1.6, but could not. Can you see the problem in this sample?


GG Gene Gorokhovsky November 14, 2003 01:15 PM UTC

The problem can bee seen in the attached sample. I have modified your code with several relevant fragments that we are using in our app. Sorry if the code is not absolutely minimal. Gene


AD Administrator Syncfusion Team November 14, 2003 01:46 PM UTC

The samething is happening to me in my app(1.6.1.8 databound grid). The first row checkbox is getting reset. After another change is made, it is taking the values properly. Sometimes, non-checkbox (combobox, textbox) values are also getting reset. Thanks, - Reddy


AD Administrator Syncfusion Team November 14, 2003 03:24 PM UTC

I think you can avoid the problem by setting the datasource after you set the GridBoundColumns instead of before you set them.
//this.DataSource = dataSource;
if (cols != null) 
{
	this.GridBoundColumns.AddRange(cols);	
}
this.DataSource = dataSource;


GG Gene Gorokhovsky November 14, 2003 05:47 PM UTC

It worked.This was a strange one, indeed. Thanks! Gene


TZ Thomas Zueger November 14, 2003 06:45 PM UTC

Clay, I'm running into the same problem, but only on one form. The grid displays the data of a child relation. Sometimes the text typed into the first cell will be lost after moving to the next row/cell e.g. by pressing the tab key. I want to check if the reset of the DataSource will solve the problem. Regards, Thomas

Loader.
Live Chat Icon For mobile
Up arrow icon