donnacha Posted November 17, 2004 Posted November 17, 2004 Hi folks, I have a weird problem when I am using a datagridcomboboxcolumn. In my grid I have several columns one of which is a combobox. When I enter data (1st entry for a new row) in any of the columns other than the combobox column, a new row is created in the grid and datasource. When I enter date in the combobol column as the 1st entry for a new row, the data is accepted and appears in the grid, but no new row is created in the datagrid/dataset. Has anybody come across anything like this before. Am I failing to handle some event ? I am using VS 2000 and VB. The combox box is a derived class, I have tried it out with a variety of samples and I get the sam result each time. Any help would be great. Quote Hamlet
donnacha Posted November 18, 2004 Author Posted November 18, 2004 Hi folks, I found the solution, apparently the problem has nothing to do with the derived class, it lies instead with the datagrid. The solution is thanks to http://www.error-bank.com/microsoft.public.dotnet.languages.vb.controls/4644_Thread.aspx (why could't I have found that a month ago, oh the pain, the pain....) Private Sub MainGrid_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles MainGrid.CurrentCellChanged Me.BindingContext(MainGrid.DataSource, MainGrid.DataMember).EndCurrentEdit() End Sub Quote Hamlet
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.