Comboboxes in windows forms datagrid
(Tuesday, January 03, 2006)
Found the following interesting discussion in the Newsgroups:
Comboboxes in windows forms datagrid by:Anonymous
| There is an article with an example on this topic. ( article 323167). The example works good if the datagrid column is string type. Here is a portion of code that handles text changed: ------------------------------ Private Sub Ctrls_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) If DataGrid1.CurrentCell.ColumnNumber = 3 Then MyCombo.Visible = False If DataGrid1.Item(DataGrid1.CurrentCell) & "" = "" Then SendKeys.Send("*") End If DataGrid1.Item(DataGrid1.CurrentCell) = MyCombo.Text End If End Sub ---------------------
I have problem to make this work for column with integer type. When I select an integer from the combobox, the screen freezes, error either in SendKeys.Send("*") or DataGrid1.Item(DataGrid1.CurrentCell) = MyCombo.Text complaining about data type.
Any hits are welcome.
Jenny
| | | Reply: by:One Handed Man \( OHM - Terry Burns \)
| | | This was from Scorp a few days ago
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q480q
http://www.syncfusion.com/faq/winforms/Files/DataGridBoundCombo_vb.zip
http://dotnet.leadit.be/extendeddatagrid
http://www.knowdotnet.com/articles/kdngrid.html HTH --
OHM ( Terry Burns )
|
Posted by Xander Zelders

|
|
|
|
0 Comments:
Post a Comment
<< Home