Can i add Columns in Repeater Control using Code behind with out using Source code ?
I wanted to create a Repeater Web control and i need to generalize it for adding user defined columns for different web forms, Can i add Columns into that RepeaterWebControl by code behind for the data in datatable from Database...
Auto generate columns in Repeater for Web controls
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Sanjay KumarRank #561 · 4.3K reputationPosted Apr 16, 2014, 3:47 AM EDT
try this
http://www.c-sharpcorner.com/UploadFile/47548d/twitter-bootstrap-and-repeater-control-in-Asp-Net/
Pratheesh s5 reputationPosted Apr 21, 2014, 11:12 PM EDT
Thanks for your valuable reply, Actually what iam trying to implement is to make a repeater user control that can generate dynamic columns , that is if i use that repeater in a web form with 3 columns i must be able to use that repeater control in the next web form for more than or less than 3 columns , so the problem is i need to bind that data with out using source code, that is "Eval" method can only add one data from a particular table only, i need to generalize that part and need to made that part data binding in general, so can i bind data to a repeater without source code by using only code behind.
Please pardon me if there is any confusions, ask me for more clarifications to my idea.
Pratheesh s5 reputationPosted Apr 29, 2014, 1:31 AM EDT