Click here to Skip to main content
16,020,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on a project containing Telerik reporting.
Database consist Names and Description of these reports
This data is binded to View containing That many reports (Buttons) when i click these buttons respective report is opened
*** When i add new record in DB i want to add new button on View ??
How can i do it dynamically??**
Posted

1 solution

Hello
If you have control of getting the reports "metadata" (Name + Description) from the database, you can simply create class containing these as properties. Let's call it "ReportMetaData".

Create a property ObservableCollection<ReportMetaData> and add the report metadata rows to that collection. Let's call that "ReportItems".

Then get the item control that should hold the buttons and a Binding to the "ReportItems" collection. Then create an "ItemTemplate" to define the buttons.

Hope it helps :-)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900