c# - How to implement a data-bound control with templates? -


I want to implement a very simple list control, it has 2 properties:

  1. Datasource (ILIST)

You must present each row using the control implementation in right-templates The template is specified in the respective object passing in the code> DataSource list, so that if I have a property called name If it is in the object that is in the passage, then it is Eval ("name") .

I want an example of how to render control using the right-template and how the reporter is datasource on the template object .


I am reading MSDN document on this topic: But but I do not know how to implement the control that passes an object on the template.

It seems that you are trying to develop a templated data-bound control.

During the rendering of the original control you need to run your data source object again. For each item in your datasource, create a new instance of your Template Container object and add it to the container control. Depending on what you are expanding, the actual render method may be different, but if you are expanding something like BaseDataList , you can " CreateControlHeirarchy () .

There are some walking around that you can see.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -