Bind custom object on listview

4 posts, 1 answers
  1. Alexandre
    Alexandre avatar
    26 posts
    Member since:
    Feb 2008

    Posted 20 Sep 2013 Link to this post

    Hi,
    I am looking to bind a listview with a generic list of a custom object. I got some problems trying to get the same results as in your examples. First of all when I put it on listview viewmode it show only the display member value when I was expecting it to show all column in the listview. may be I need to set something to get it work? I noticed that I can show what I want using the visualitem.text to show it the way I want but I can't find a way to do it automatically. Also I did copy your code to make the grouping work and it dosen't... I doe's make grouping when I put wrong property name in it then, the grouping seem's to be based on the count of item's. Well I would like to find a way to acheive it. May be a little project binding a custom object with grouping and differents viewmodes could help me to achieve my goal (since all your example are made with datatable).

    Thanks
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 25 Sep 2013 Link to this post

    Hi Alexandre,

    Thank you for contacting us.

    I have prepared the desired sample project where the RadListView is bound to a generic list. Also there are three buttons with which you can change the views. When the ListViewType is set to ListView there are no columns visible, the columns are visible only in details view.

    Alternatively you can create Custom Items. This way you will be able display additional information when the ListViewType is set to ListView.

    I hope this will be useful. Should you have further questions, I would be glad to help.

    Regards,
    Dimitar
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Mostafa
    Mostafa avatar
    1 posts
    Member since:
    Mar 2013

    Posted 19 Dec 2013 Link to this post

    Hi ,
    how can i change data after added with custom object?
    thnks
  5. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 23 Dec 2013 Link to this post

    Hi Mostafa,

    Thank you for contacting Telerik support.

    By default you can specify which field will be edited by using the ValueMember property. This way the user can edit the corresponding value when the F2 key is pressed for example. 

    Also, if you want to manage the data in a custom way you can take a look at the following help article where you can find out how to change default editor for example: Checkboxes and editors.

    I hope this will be useful. Should you have further questions, I would be glad to help.

    Regards,
    Dimitar
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top