473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Comboboxes in windows forms datagrid

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
Nov 20 '05 #1
1 859
This was from Scorp a few days ago

http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q480q

http://www.syncfusion.com/faq/winfor...ndCombo_vb.zip

http://dotnet.leadit.be/extendeddatagrid

http://www.knowdotnet.com/articles/kdngrid.html
HTH
--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
"JennySm" <Je*****@discussions.microsoft.com> wrote in message
news:AE**********************************@microsof t.com...
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

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: RFickling | last post by:
Hi, I have implemented a DataGrid with ComboBoxes in it using the DataGridComboBoxColumn class from the MSDN article. My problem is that I would like to make the combobox disappear when an item...
0
by: Hiroyuki Tanaka | last post by:
Hi, I am trying to develop an application for a touch screen using buttons for the numeric pad with Completion ComboBoxes. At the moment I am having a problem sending the button presses to my...
0
by: Hector | last post by:
I have a ComboBox set up in a non-modal form. When a selection is made from the ComboBox, the handler code closes the form, but then the system crashes because of an unhandled NullReferenceException....
4
by: Carl Fenley | last post by:
I believe I have almost successfully created a custom datagrid control. The new class builds without error. I have added it as reference to the main Windows Application project. It appears on...
2
by: Wayne | last post by:
I have a datagrid on my windows form, it needs to be read only and when a user selects a row, I want the whole row to be selected. How would I go about doing this? -- Thanks Wayne Sepega...
11
by: Steve B. | last post by:
How can I keep the ComboBox textbox empty of datasource items when my local application starts AND keep them empty even after the user clicks different Tabs on the form. I welcome any questions....
2
by: Reidar | last post by:
I am making a datagrid with one table. In this datagrid I change som columns from textboxes to comboboxes. The comboboxes has datasource from another table, displaymember is the textfield from...
0
by: mjsterz | last post by:
I've been working with VB .NET for less than a year and this is the first time I've posted on one of these groups, so let me apologize beforehand if I'm being unclear, not posting my issue...
3
by: Major Doug | last post by:
Hello: situation--I have a research database. Each record in the database consists of 10 fields. I used access97 to rack/stack my database; very easy in the beginning. I created a form with a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.