Getting individual Values From ListviewElement

5 posts, 0 answers
  1. Saneesh
    Saneesh avatar
    8 posts
    Member since:
    Feb 2012

    Posted 14 Feb 2012 Link to this post

    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..
  2. Saneesh
    Saneesh avatar
    8 posts
    Member since:
    Feb 2012

    Posted 14 Feb 2012 Link to this post

    found it .... 
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 17 Feb 2012 Link to this post

    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 >>
  5. Milind
    Milind avatar
    16 posts
    Member since:
    Mar 2009

    Posted 17 Feb 2012 Link to this post

    Hi,

    Can you post the solution ?

    Thanks,

    Milind Shevade
  6. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 21 Feb 2012 Link to this post

    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 >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready