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

datagrid not handling new row correctly

Hi syncfusion, I have been much helped from your datagrid FAQ for windows forms. I downloaded datagridtextboxcombo_vb.zip and am attempting to use the class in a new project I am working on. I set up some properties to set up the combobox with a dataset and set the display/value members. When I run it from my user control (instead of a form), I am getting some looping on the edit sub and also on a new row, the is setting the edit on the previous row and then erroring with "the ListManager's position must be equal to rowNum. Parameter name: rowNum. Any help you can give in resolving this error would greatly appreciated! Thanks in advance, Suzanne

4 Replies

AD Administrator Syncfusion Team November 22, 2003 11:17 PM

In the ComboBoxColumn class, at the end of the SetColomnValueAtRow function, encapsulate the last call like so: if(source.Position == rowNum) { base.SetColumnValueAtRow(source, rowNum, s); } > Hi syncfusion, > > I have been much helped from your datagrid FAQ for windows forms. > > I downloaded datagridtextboxcombo_vb.zip and am attempting to use the class in a new project I am working on. I set up some properties to set up the combobox with a dataset and set the display/value members. When I run it from my user control (instead of a form), I am getting some looping on the edit sub and also on a new row, the is setting the edit on the previous row and then erroring with "the ListManager's position must be equal to rowNum. Parameter name: rowNum. > > Any help you can give in resolving this error would greatly appreciated! > > Thanks in advance, > Suzanne >


CT Chris Thomas December 11, 2003 06:24 AM

Hey I am having the same problem. The ComboBoxColumn works fine in one grid, but not at all in another. I tried your suggestion, testing if Source.Position == rowNum before calling SetColumnValueAtRow but now it just never commits the value. Any help or suggestion would be greatly appriciated


AP appsupp March 22, 2005 10:19 AM

many tanks anon. a brilliant workaround - succinct in its simplicity. I thought - yeah trap the error but loose the update - however it worked for me - bypassing SetColomnValueAtRow () and allowing GridColumnStyle.Add (CustomDataGridColumnStyle) to do the update... >In the ComboBoxColumn class, at the end of the SetColomnValueAtRow function, encapsulate the last call like so: >if(source.Position == rowNum) > { > base.SetColumnValueAtRow(source, rowNum, s); > } > > > > Hi syncfusion, >> >> I have been much helped from your datagrid FAQ for windows forms. >> >> I downloaded datagridtextboxcombo_vb.zip and am attempting to use the class in a new project I am working on. I set up some properties to set up the combobox with a dataset and set the display/value members. When I run it from my user control (instead of a form), I am getting some looping on the edit sub and also on a new row, the is setting the edit on the previous row and then erroring with "the ListManager''s position must be equal to rowNum. Parameter name: rowNum. >> >> Any help you can give in resolving this error would greatly appreciated! >> >> Thanks in advance, >> Suzanne >> >


PJ Peter J Novosel January 3, 2006 06:52 PM

Hello: Adding the fix described below does not fix my problem, the Datagrid column style works without fail except if I add a new row to the data grid. Without the fix I get the error message "The ListManager''s position must be equal to rowNum", with the fix the error is no longer reported but the selected data value from the Combo/List box is not updated in the Grid ? >In the ComboBoxColumn class, at the end of the SetColomnValueAtRow function, encapsulate the last call like so: >if(source.Position == rowNum) > { > base.SetColumnValueAtRow(source, rowNum, s); > } > > > > Hi syncfusion, >> >> I have been much helped from your datagrid FAQ for windows forms. >> >> I downloaded datagridtextboxcombo_vb.zip and am attempting to use the class in a new project I am working on. I set up some properties to set up the combobox with a dataset and set the display/value members. When I run it from my user control (instead of a form), I am getting some looping on the edit sub and also on a new row, the is setting the edit on the previous row and then erroring with "the ListManager''s position must be equal to rowNum. Parameter name: rowNum. >> >> Any help you can give in resolving this error would greatly appreciated! >> >> Thanks in advance, >> Suzanne >> >

Loader.
Live Chat Icon For mobile
Up arrow icon