0

I'm trying to load data to a panel. normally I'm binding datasource to the grid. but how can I bind data to a Panel?

var pro = (from pr in context.Products
                       select new
                       {
                           ProductName = pr.Name,
                           Price = pr.Price,
                           Quantity = pr.Qty

                       }).ToList(); 

I want to show the above-selected value inside the panel.

  • Panel is nothing more than a container for other controls. So basically you need to add other controls to the panel to show. – Reza Aghaei Feb 17 '19 at 19:22
  • You can use a `DataRepeater` control, or instances of `UserControl` hosted in `Panel` as [described here](https://stackoverflow.com/a/36941920/3110834). You can create a [data form](https://stackoverflow.com/a/38168317/3110834) by drag and drop from data source window and use binding navigator to navigate between records. – Reza Aghaei Feb 17 '19 at 19:34
  • @RezaAghaei thank you for help. the thing is I'm using bunifu framework it has control call Card. it inherits from the panel. so i want to load some data to that card data repeater not help for this... –  Feb 17 '19 at 21:24

0 Answers0