GridCointrol edit cell
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. :(
SIGN IN To post a reply.
7 Replies
AD
Administrator
Syncfusion Team
March 29, 2004 06:51 AM UTC
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?
LI
LIJing
March 29, 2004 12:50 PM UTC
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. :(
AD
Administrator
Syncfusion Team
March 29, 2004 01:24 PM UTC
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?
LI
LIJing
March 29, 2004 01:54 PM UTC
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.
AD
Administrator
Syncfusion Team
March 29, 2004 03:56 PM UTC
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"?
LI
LIJing
March 29, 2004 10:07 PM UTC
If i run your project,it is ok.
but if i add your form2 into my project and run it,so error message happened.
:(
AD
Administrator
Syncfusion Team
March 29, 2004 10:17 PM UTC
Can you attach a project showing the problem?
Are you setting CurrentCulture in your code?
SIGN IN To post a reply.
- 7 Replies
- 2 Participants
-
LI LIJing
- Mar 29, 2004 02:13 AM UTC
- Mar 29, 2004 10:17 PM UTC