Search code examples
asp.nettelerikdatasourceradpanelbar

RadPanelBar bound to DataSet


I'm trying to use a RadPanelBar to divide a form into a series of collapsible sections. I created the first section with no data source; this works normally. When I bind the panel bar to a DataSet, all the template controls are gone. There is a single header item titled "System.Data.DataRowView".

What I'm trying to do is pretty simple - take a single record and display it for editing. Normally this would be a job for a FormView, but the form will be fairly long and the users want to be able to focus on only a few relevant sections of the form. I'm hoping RadPanelBar can handle the section collapsing behavior for me. I'd like to bind the form's controls to the data source like I would do in a FormView, but RadPanelBar doesn't seem to work this way. I've drowned myself in telerik docs and google searches, but can't find any solutions.


Solution

  • It looks to me that RadPanelBar only allows you to bind a datasource to create the panels but it won't allow you to just bind any data source to the templated controls inside each panel.

    You should create the Panels (dynamically or statically, it's your choice) defining your template inside each panel. You then need to gather the specific data that you want to display in the appropriate panel and populate the fields manually.