I have a RadCardView that is using a BindingList as the datasource.
Please quide me to a portion of the documentation that shows how to bind to a datasource and still be able to retain the cardview template.
When i bind to this list, it disregards the template that i initially set up.
5 Answers, 1 is accepted
Thank you for writing.
Currently, setting the data source at run time resets the already created layout. However, you can create the desired layout at run-time and save it. To do that open the Customize dialog from the context menu and arrange the items. Then save the layout with the button: Customize Layout Mode.
Then you can load the layout after the data source is set:
this
.radCardView1.DataSource = dataSource;
this
.radCardView1.CardViewElement.CardTemplate.LoadLayout(@
"C:\layout.xml"
);
Do not hesitate to contact us if you have other questions.
Dimitar
Telerik by Progress
While I see how to use the Layout Control, this does not seem to be the solution for my scenario. Let me be more specific, and see if I am missing something.
I want to the saved layout to contain the columns of the cardview.. this does not seem possible. I have created a simple form with the layout control. Inside the layout control, i have placed a simple card view with come columns arranged (see picture). But when I start the project, right click and select "Customize", the columns I created are no longer there and there is no option in the "Customize" window to add any (only options are shown in picture).
Is there a solution to this? Or is the solution to create a method that moves everything around the way I want?
picture: Left: Design view, Right: Runtime view
How are you setting the data source in this case, at design-time or at run-time? I am asking you this because setting the data source at least should create a default template. I have attached my test project so you can see how this works there.
I am looking forward to your reply.
Dimitar
Telerik by Progress
Hello!
please any sample cardview with picture.
Regards
We have such example in our demo application. The attached image shows where you can find it.
I hope this will be useful. Let me know if you have additional questions.
Regards,
Dimitar
Progress Telerik