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

Bind custom object on listview

3 Answers 85 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Alexandre
Top achievements
Rank 1
Alexandre asked on 20 Sep 2013, 04:07 PM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 25 Sep 2013, 01:17 PM
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 >>
0
Mostafa
Top achievements
Rank 1
answered on 19 Dec 2013, 07:10 PM
Hi ,
how can i change data after added with custom object?
thnks
0
Dimitar
Telerik team
answered on 23 Dec 2013, 08:20 AM
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 >>
Tags
ListView
Asked by
Alexandre
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Mostafa
Top achievements
Rank 1
Share this question
or