473,378 Members | 1,317 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,378 software developers and data experts.

How to get a column value that's not the displaymember from a list

Hi, I have a listbox with displaymember that I combined 3 columns together.
After the user made the selection I then need to get each one the of the
selected valuemember but then I don't want the displaymember. I only want 2
of the columns of that made up the displaymember. How can I refer to the
column value in each of the selecteditems?

Thanks, Alpha

strJoinTable = "";
strSelectedIDs.Append(" and l.jcodeID in (");

for (int x = 0; x < count; x++)
{
DataRowView rowView = this.lstLedger.SelectedItems[x] as DataRowView;
if (rowView != null)
{
if (x>0 )
{
strSelectedIDs.Append(", ");
strSelectValues.Append(", ");
}
strSelectedIDs.Append(rowView.Row[this.lstLedger.ValueMember].ToString());
strSelectValues.Append(rowView.Row[this.lstLedger.DisplayMember].ToString());
}
}//end for
Nov 17 '05 #1
0 962

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

Similar topics

27
by: DraguVaso | last post by:
Hi, The Multi column comboBox is a well spoken control, that a lot of people desire, and a lot of people buildtheir own. I tested a lot of them, but none really was what i wanted to have. But...
3
by: Bill C. | last post by:
Hello, I know this has been discussed a lot already because I've been searching around for information the last few weeks. I'm trying to implement a DataGridComboBoxColumn class. I've found...
1
by: Nikhil Patel | last post by:
Hi All, I am using a dll function that returns a two diamensional array containing BankNames and RoutingIds. I need to display BankNames and RoutingIds in two different comboboxes. When user...
2
by: Vern | last post by:
I created a table in a dataset that contains multiple columns. I attached a combo box to that table. Now I'm doing something wrong with trying to retrieve the value of the third column of the...
2
by: Mike L | last post by:
How do I get the value in the first column of a combo box? cboRails.DataSource = ds1.Tables; cboRails.DisplayMember = "Description"; The combo box shows the "Description" column of my table....
2
by: Young J. Putt | last post by:
I've got a list box bound to a Datatable, like this: lstProjects.DataSource = m_oProjectSet.DataTable lstProjects.DisplayMember = "ProjectDesc" lstProjects.ValueMember = "ProjectID" I want to...
9
by: Capt_Ron | last post by:
Hello, I would like to set the value of the item in the checked list box. I have a datareader that has 2 columns. PK and TEXT I want the TEXT as the Item and the PK as the Value. I can not...
6
by: Thief_ | last post by:
Can a combobox conatin more than one column? I want to store text in one column and in the other (hidden) column store integer values which are associated with the text. VB.Net 2003 -- |...
3
by: sklett | last post by:
I'm changing from a DataGrid to a DataGridView and have run across a problem. The items that are bound to the DataGrid have an int Property that represents a primary key of a lookup table in my...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.