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

Combobox in datagrid problem

Hello, I was hoping someone might be able to give me some direction on what I am doing wrong. I downloaded the sample VB.NET version of "How to put a combobox in a column of a datagrid" from the syncfusion sight. However it is not completely working the way it should. I have a datagrid that is bound to a dataset. The datagrid has one text column and 3 combobox columns. When you start the application an empty datagrid appears. Clicking on the first cell of the (new row) populates that row with the defaults that I've set up in code. So for the first row I fill in the text column (this generates a new row underneath), and choose new values for all of the remaining 3 dropdown columns. Next I click on the new row to add another row of data. Here's where the problem occurs. I type data into the text column (default data for this row and new row happen as expected), then I click in the first dropdown cell to make a change to it's default data and the text column (in the same row) returns to it's default data which in this case is NULL. After that I have to change it multiple times to get it to keep my entered data. Odd thing is the very first row I enter data in works fine. Every row after that gives me this problem. Thanks in advance for any ideas, Bobby

1 Reply

CB Clay Burch Syncfusion Team July 16, 2002 01:27 AM

Bobby, Try this. In the Edit override in the comboboxcolumn column, comment out all the lines up to the call to the baseclass call. So, the first line of code would be
base.Edit(source,rowNum, bounds, readOnly, instantText , cellIsVisible);
The deleting & adding the new row that you are removing is what is causing this problem. Clay

Live Chat Icon For mobile
Up arrow icon