This is a migrated thread and some comments may be shown as answers.

Getting individual Values From ListviewElement

4 Answers 275 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Saneesh
Top achievements
Rank 1
Saneesh asked on 14 Feb 2012, 04:06 PM
i cant but seem to  retrieve  indivijual values of elements from a ListviewElement 

radListView1.ItemValueChanged += (s, e) => { Edited.Add(new ListViewEditedItems() { Loan = e.ListViewElement.Columns[0].ToString(), Recovery = e.ListViewElement.Columns[1].ToString(), CurrInstNo = e.ListViewElement.Columns[2].ToString(), TotInstNo = e.ListViewElement.Columns[3].ToString(), AmtDrawn = e.ListViewElement.Columns[4].ToString(), AmtRecoverd = e.ListViewElement.Columns[5].ToString(), BalAmt = e.ListViewElement.Columns[6].ToString() }); };

e.ListViewElement.Columns[0].ToString()
this i suppose was to get the value from the column ..but does'nt seem to be working..
i need to get the value from columns in the listview
idea's please..

4 Answers, 1 is accepted

Sort by
0
Saneesh
Top achievements
Rank 1
answered on 15 Feb 2012, 05:00 AM
found it .... 
0
Ivan Todorov
Telerik team
answered on 17 Feb 2012, 02:26 PM
Hi Saneesh,

I am glad that you have found a solution to your case.

Feel free to ask us whenever you have any future questions.

Greetings,
Ivan Todorov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Milind
Top achievements
Rank 1
answered on 17 Feb 2012, 07:02 PM
Hi,

Can you post the solution ?

Thanks,

Milind Shevade
0
Ivan Todorov
Telerik team
answered on 21 Feb 2012, 04:26 PM
Hello Milind,

To get or set values of cells, you should use the indexers of the ListViewDataItems:
this.radListView1.Items[0][0] = "value";
//OR
this.radListView1.Items[0]["ColumnName0"] = "value";
//OR
this.radListView1.Items[0][this.radListView1.Columns[0]] = "value";

You also might find this help article useful.

In case you have any additional questions, feel free to ask.

Kind regards,
Ivan Todorov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
ListView
Asked by
Saneesh
Top achievements
Rank 1
Answers by
Saneesh
Top achievements
Rank 1
Ivan Todorov
Telerik team
Milind
Top achievements
Rank 1
Share this question
or