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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Combobox in datagrid problem

Thread ID:





602 Jul 15,2002 02:34 PM UTC Jul 16,2002 06:27 AM UTC WinForms 1
Tags: FAQ
Asked On July 15, 2002 02:34 PM UTC

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

Clay Burch [Syncfusion]
Replied On July 16, 2002 06:27 AM UTC

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon