Click here to Skip to main content
15,921,276 members
Home / Discussions / C#
   

C#

 
GeneralRe: creating cross reference with c# and office.interop Pin
shinboxe18-Jan-12 5:18
shinboxe18-Jan-12 5:18 
GeneralRe: creating cross reference with c# and office.interop Pin
Pete O'Hanlon18-Jan-12 5:24
mvePete O'Hanlon18-Jan-12 5:24 
GeneralRe: creating cross reference with c# and office.interop Pin
shinboxe18-Jan-12 5:28
shinboxe18-Jan-12 5:28 
GeneralRe: creating cross reference with c# and office.interop Pin
Pete O'Hanlon18-Jan-12 5:26
mvePete O'Hanlon18-Jan-12 5:26 
GeneralRe: creating cross reference with c# and office.interop Pin
shinboxe18-Jan-12 5:45
shinboxe18-Jan-12 5:45 
GeneralRe: creating cross reference with c# and office.interop Pin
Pete O'Hanlon18-Jan-12 5:57
mvePete O'Hanlon18-Jan-12 5:57 
GeneralRe: creating cross reference with c# and office.interop Pin
shinboxe18-Jan-12 21:16
shinboxe18-Jan-12 21:16 
QuestionHow to find the Selected Column Name of ListView Control ? Pin
Paramu197318-Jan-12 1:01
Paramu197318-Jan-12 1:01 
Hi,
Iam using C# 2010. I would like to know, is it possible to select a column name of listview?
I mean, once the user click on second column, then I want to get the second column value...also, once the user click on third column then the reslutant has to be thisd column value...

Is it possible?

Iam using the following codes...for listview...

C#
for (int F12 = 0; F12 <= MyDataTable.Length - 1; F12++)
{
ListViewItem GItem = new ListViewItem(MyDataTable[F12]["invoic_no"].ToString());
GItem.SubItems.Add(MyDataTable[F12]["invoice_date"].ToString());
GItem.SubItems.Add(MyDataTable[F12]["Supplier_name"].ToString());
GItem.SubItems.Add(MyDataTable[F12]["itm_description"].ToString());
GItem.SubItems.Add(MyDataTable[F12]["unit_measure"].ToString());
GItem.SubItems.Add(MyDataTable[F12]["Invoice_Quantity"].ToString());
listView1.Items.Add(GItem);
}
listView1.Visible = true;
listView1.Focus();

Note: ListView1.SelectedItems[0].text or
ListView1.SelectedItems[0].SubItems[1].text all will give the value by assigned column.
But My clarification is is it possible to get the unkwon clicked column name...

ThanksThumbs Up | :thumbsup:
AnswerRe: How to find the Selected Column Name of ListView Control ? Pin
Eddy Vluggen18-Jan-12 7:08
professionalEddy Vluggen18-Jan-12 7:08 
GeneralRe: How to find the Selected Column Name of ListView Control ? Pin
Paramu197318-Jan-12 19:52
Paramu197318-Jan-12 19:52 
GeneralRe: How to find the Selected Column Name of ListView Control ? Pin
Eddy Vluggen18-Jan-12 20:17
professionalEddy Vluggen18-Jan-12 20:17 
AnswerRe: How to find the Selected Column Name of ListView Control ? Pin
BillWoodruff18-Jan-12 11:36
professionalBillWoodruff18-Jan-12 11:36 
GeneralRe: How to find the Selected Column Name of ListView Control ? Pin
Paramu197318-Jan-12 19:22
Paramu197318-Jan-12 19:22 
QuestionTeam Foundation server ???? Pin
Pierre besquent17-Jan-12 22:01
Pierre besquent17-Jan-12 22:01 
AnswerRe: Team Foundation server ???? Pin
Pete O'Hanlon17-Jan-12 22:28
mvePete O'Hanlon17-Jan-12 22:28 
GeneralunRe: Team Foundation server ???? Pin
Pierre besquent17-Jan-12 22:58
Pierre besquent17-Jan-12 22:58 
AnswerRe: Team Foundation server ???? Pin
RobCroll18-Jan-12 15:15
RobCroll18-Jan-12 15:15 
QuestionError while compile a default C# template grid Pin
alex_petrov17-Jan-12 13:02
alex_petrov17-Jan-12 13:02 
AnswerRe: Error while compile a default C# template grid Pin
Richard MacCutchan17-Jan-12 23:06
mveRichard MacCutchan17-Jan-12 23:06 
QuestionSpeech recognition and drawing Pin
momo.pomo17-Jan-12 9:15
momo.pomo17-Jan-12 9:15 
AnswerRe: Speech recognition and drawing Pin
Not Active17-Jan-12 9:58
mentorNot Active17-Jan-12 9:58 
AnswerRe: Speech recognition and drawing Pin
Pete O'Hanlon17-Jan-12 10:08
mvePete O'Hanlon17-Jan-12 10:08 
JokeRe: Speech recognition and drawing Pin
Not Active17-Jan-12 10:17
mentorNot Active17-Jan-12 10:17 
AnswerRe: Speech recognition and drawing Pin
Dave Kreskowiak17-Jan-12 11:03
mveDave Kreskowiak17-Jan-12 11:03 
GeneralRe: Speech recognition and drawing Pin
Albert Holguin17-Jan-12 11:24
professionalAlbert Holguin17-Jan-12 11:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.