AD
Administrator
Syncfusion Team
March 4, 2004 10:21 AM
I am having a difficult time running the sample.
I had to add calls to grid.Binder.OptimizeListChangedEvent to all your grids, or else the code throw exception in the InitializeConponent code. What version of our libraries are you running?
Anyway, once I coudl get teh grids to display, I could never leave teh first row of the top grid even though the first cell was occupied. I worked around that problem by adding a cc.IsEditing check to both your RowLeave handlers.
//pnr
if (cc.IsEditing && cc.Renderer.ControlText.Trim().Length == 0)
and
//kbnr
if (cc.IsEditing && cc.Renderer.ControlText.Trim().Length == 0){
Once that was done, I was able to click arond the top grid and then click to the bottom grid and see the row added.
One other thing I saw was that you had code like
cc.Renderer.ControlText = "";
cc.CancelEdit();
when you set e.Cnacel = true in currentcellvalidating. Noramlly, you would not do this. You would only set e.Cancel = true, and then the grid should take you back to the cell with it exactly as it was when you tried to leave it.
AD
Administrator
Syncfusion Team
March 5, 2004 12:20 AM
Sorry that I didn''t write version. Our version is 1.6.1.0. And I send this sample with libraries of syncfunsion. There isn''t event grid.Binder.OptimizeListChangedEvent in our version
WindowsApplication27_4214.zip
AD
Administrator
Syncfusion Team
March 5, 2004 03:33 AM
Is there some reason you are not using the 1.6.1.8 version that is available through Direct Trac from your support home page on our website?
I keep getting exception thrown in your code. For example, in your gbgPNROverview_CurrentCellMoved handler, why are you indexing this.gbgPNROverview with cc.RowIndex when cc.RowIndex is the value from the currentcell in the this.gbgKBNR grid. Do you expect the rows in gbgPNROverview to always be as many as there are in gbgKBNR? I do not see this. If I bring up your sample, and click on row 2 of the top grid, and then click on the first empty row in the bottom grid, I see an exception thrown at this point because there are not 2 rows in the bottom grid.
To handle the above exception, I assumed you wanted cc to point to teh current cell on teh bottom grid when you were setting the values. Making this change allowed the clicked row in the bottom grid to be populated without adding a two empty rows.
JA
Jaris
March 5, 2004 05:28 AM
Thank you very much, my mistakes, I''m sorry. I corrected my code and I have problem. When I enter new row in bottom grid and I fill first field and I move to field ''cena'',then I press key Up arrow, new row is created in bottom grid. It is wrong.
We don''t use version 1.6.1.8 because when we installed this version, it didn''t work right. There were exceptions in aplication, probably caused by licence.
thank you
AD
Administrator
Syncfusion Team
March 5, 2004 08:18 AM
In 1.6.1.0, I see an exception being thrown saying "Column ''PnrID'' does not allow nulls." when I do what you described.
This problem does not occur for me in 1.6.1.8. No exception is thrown, and the extra row does not get added.
If you are getting a license violoation error when you try to use 1.6.1.8, here is a link that should explain how you can correct it.
http://www.syncfusion.net/squiffler/patches/v1618/lic_update.htm