Their is difficulty in changing the name of the columnheader of list view constantly by using the loop in button click method...Is their any way to change the textname by using loop??? :S
prathoven
0
Newbie Poster
Recommended Answers
Jump to PostTry this.
I don't know why you would want to do this, but w/e.
foreach (ColumnHeader LWC in listView1.Columns) { LWC.Text = "LWS"; }
This will change all columns in the ListView to LWS.
If this isn't what you wanted please clarify.
Please mark …
Jump to Poststring[] i = new string{ "Email ID", "Phone", "Address" }; int k = 0; foreach (ColumnHeader LWC in listView1.Columns) { LWC.Text = i[k]; k++; }
As I mentioned earlier:
This will change all columns in the ListView to LWS.
it may be more economical to just do:
…
All 7 Replies
finito
46
Nearly a Posting Virtuoso
prathoven
0
Newbie Poster
prathoven
0
Newbie Poster
finito
46
Nearly a Posting Virtuoso
prathoven
0
Newbie Poster
finito
46
Nearly a Posting Virtuoso
prathoven
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.