PC Review


Reply
Thread Tools Rate Thread

ComboBox and msflexgrid

 
 
JFB
Guest
Posts: n/a
 
      11th Dec 2003
Hi Folks,
I'm using ado.net and I have a combo box inside of a msFlexgrid, so when I
selected the item from the combo I'm passing this value to the
textMatrix(row,col).
At the time to press the save botton I'm using a for loop thru the
msFlexgrid to get the data and save it in the table, but I have the
lastname+firstName values in the cell and I need the customerID.
How can I fix this? Any idea?
Tks
JFB

Select employeeID, lastName+ ', '+ firstName AS fullName from employees
order by lastName

' Attach dataset's DefaultView to the datagrid control
Dim dv As DataView = ds.Tables("Employees").DefaultView
ComboBox1.DataSource = dv
ComboBox1.DisplayMember = "fullName"

For i = 1 To OrderFlexGrid.Rows - 1

Param = cmd.Parameters.Add("@employeeID", SqlDbType.Int, 4)

Param.Value = OrderFlexGrid.get_TextMatrix(i, j + 3).ToString

Next


 
Reply With Quote
 
 
 
 
Cor
Guest
Posts: n/a
 
      12th Dec 2003
Hi JFB,

I don't know if it is the only thing,
But in your combobox you can say
> ' Attach dataset's DefaultView to the datagrid control
> Dim dv As DataView = ds.Tables("Employees").DefaultView
> ComboBox1.DataSource = dv
> ComboBox1.DisplayMember = "fullName"

Combobox1.valuemember = "myvalue"

And then use the value.

I hope this helps?

Cor




 
Reply With Quote
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MSFlexGrid =?Utf-8?B?TWlrZUc=?= Microsoft Access VBA Modules 3 10th Feb 2007 09:43 AM
MSFlexGrid Fiskmiddagen Microsoft Access 1 19th May 2004 01:26 PM
MSFlexGrid =?Utf-8?B?QnJ1Y2UgRm9yc3Rlcg==?= Microsoft VB .NET 1 1st Apr 2004 01:06 AM
MSFlexGrid JFB Microsoft VB .NET 0 18th Nov 2003 05:59 PM
MSFlexGrid David Sawyer Microsoft VB .NET 2 8th Sep 2003 11:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:40 AM.