Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 9th, 2004, 10:54 PM
.netnewbie73 .netnewbie73 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 6 .netnewbie73 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Combobox in datagrid

Hi All,

I am hoping I can get some feedback on a problem I am having with a combobox control in a datagrid.
I am working on windows application using VB.NET. I have done lots of searching on
several forums, but can't find any good threads on this particular issue.

I have managed to get a combobox in the datagrid, and when a user clicks a
particular cell in the datagrid, the combobox appears, and the user can
drop the box and select items. The problem occurs when update or any other
cell is clicked. At that point the selected item from the combobox is
cleared and the cell is set back to it's original value. Basically, the
user can select an item, but it will not keep the value in the cell.

Here is a code snippet. When the user clicks any cell in column 4, that
cell changes to a combobox, and "items1-3" are in the combobox.

Private Sub DataGrid1_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.GotFocus

Dim combo As New ComboBox
combo.Cursor = System.Windows.Forms.Cursors.Arrow
combo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown
combo.Dock = DockStyle.Fill
combo.Items.Add("Item1")
combo.Items.Add("Item2")
combo.Items.Add("Item3")
DataGridTextBoxColumn4.TextBox.Controls.Add(combo)
combo.BringToFront()

End Sub

Any feedback would be greatly appreciated.

Thank You

Reply With Quote
  #2  
Old September 3rd, 2005, 04:54 AM
ninotahiti ninotahiti is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 2 ninotahiti User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 21 sec
Reputation Power: 0
combobox in datagrid

Hi All,

I am hoping I can get some feedback on a problem I am having with a combobox control in a datagrid.
I am working on windows application using VB.NET. I have done lots of searching on
several forums, but can't find any good threads on this particular issue.

I have managed to get a combobox in the datagrid, and when a user clicks a
particular cell in the datagrid, the combobox appears, and the user can
drop the box and select items. The problem occurs when update or any other
cell is clicked. At that point the selected item from the combobox is
cleared and the cell is set back to it's original value. Basically, the
user can select an item, but it will not keep the value in the cell.

Here is a code snippet. When the user clicks any cell in column 4, that
cell changes to a combobox, and "items1-3" are in the combobox.

Private Sub DataGrid1_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.GotFocus

Dim combo As New ComboBox
combo.Cursor = System.Windows.Forms.Cursors.Arrow
combo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown
combo.Dock = DockStyle.Fill
combo.Items.Add("Item1")
combo.Items.Add("Item2")
combo.Items.Add("Item3")
DataGridTextBoxColumn4.TextBox.Controls.Add(combo)
combo.BringToFront()

End Sub

Any feedback would be greatly appreciated.

Thank You

Reply With Quote
  #3  
Old September 3rd, 2005, 05:00 AM
ninotahiti ninotahiti is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 2 ninotahiti User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 21 sec
Reputation Power: 0
Hi All,

I am hoping I can get some feedback on a problem I am having with a combobox control in a datagrid.
I am working on windows application using VB.NET. I have done lots of searching on
several forums, but can't find any good threads on this particular issue.

I have managed to get a combobox in the datagrid, and when a user clicks a
particular cell in the datagrid, the combobox appears, and the user can
drop the box and select items. The problem occurs when update or any other
cell is clicked. At that point the selected item from the combobox is
cleared and the cell is set back to it's original value. Basically, the
user can select an item, but it will not keep the value in the cell.

Here is a code snippet. When the user clicks any cell in column 4, that
cell changes to a combobox, and "items1-3" are in the combobox.

Private Sub DataGrid1_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.GotFocus

Dim combo As New ComboBox
combo.Cursor = System.Windows.Forms.Cursors.Arrow
combo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown
combo.Dock = DockStyle.Fill
combo.Items.Add("Item1")
combo.Items.Add("Item2")
combo.Items.Add("Item3")
DataGridTextBoxColumn4.TextBox.Controls.Add(combo)
combo.BringToFront()

End Sub

Any feedback would be greatly appreciated.

Thank You

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Combobox in datagrid


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT