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

GridCointrol edit cell

Thread ID:





12382 Mar 28,2004 09:13 PM Mar 29,2004 05:17 PM Windows Forms 7
Tags: GridControl
Asked On March 28, 2004 09:13 PM

I have redraw my gridcontrol by dynamic''s dataset.but when i edit the cell of gridcontrol,the form is cloed by itself.i have no code at all. :(

Administrator [Syncfusion]
Replied On March 29, 2004 01:51 AM

Can you post a sample project showing this problem so we can see it here, and try to suggest some way to avoid the problem?

Replied On March 29, 2004 07:50 AM

one form name -----"form1" sub form name -----"form2" form2 have a gridcontrol form1 code: dim tmpForm as new form2 form2.ShowDialog(me) form2 code: at form2_load() Me.GridControl1.BeginUpdate() Me.GridControl1.RowCount = dataTb.Rows.Count Me.GridControl1.ColCount = dataTb.Columns.Count Dim iCol As Integer For iCol = 0 To Me.GridControl1.ColCount - 1 Me.GridControl1(0, iCol + 1).Text = dataTb.Columns(iCol).ColumnName Me.GridControl1.ColWidths(iCol + 1) = dataTb.Columns(iCol).ColumnName.Length * 10 Next Dim i As Integer = 0 While i < dataTb.Rows.Count Dim j As Integer = 0 While j < dataTb.Columns.Count Me.GridControl1(i + 1, j + 1).CellValue = dataTb.Rows(i).Item(dataTb.Columns(j).ColumnName) If j + 1 = dataTb.Columns.Count Then Me.GridControl1(i + 1, j + 1).ReadOnly = False Else Me.GridControl1(i + 1, j + 1).ReadOnly = True End If j = j + 1 End While i = i + 1 End While Me.GridControl1.EndUpdate() Me.GridControl1.Refresh() when i edit the data at the gridcontrol,the form2 will closed by itself. :(

Administrator [Syncfusion]
Replied On March 29, 2004 08:24 AM

Here is a sample that I think does what you described, and I can edit the last column in the grid without the form closing. Forum-2Forms_3451.zip In your case, are there any exceptions being shown in the output window? Are you setting any special tabbing properties when you try to leave the last column? Can you modify the sample to show teh problem?

Replied On March 29, 2004 08:54 AM

error message: Culture "en" is a neutral culture.It can not be used in formatting and parsing and therefore cannot be set as the thread''s current culture.

Administrator [Syncfusion]
Replied On March 29, 2004 10:56 AM

Do you see this problem in the sample I sent you, or in your code? If it is in your code, do you have code that explicitly set some CultureInfo? If so, what is it? Are you using the full 5 character name like "en-US"?

Replied On March 29, 2004 05:07 PM

If i run your project,it is ok. but if i add your form2 into my project and run it,so error message happened. :(

Administrator [Syncfusion]
Replied On March 29, 2004 05:17 PM

Can you attach a project showing the problem? Are you setting CurrentCulture in your code?


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.

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.