I have a datalist and would like to pull the row names from the table that I am getting my values from for the datalist. Heres an example of what I would like to do.
<HeaderTemplate>
'Get data row names
'Maybe something like Container.DataItem(row)?
</HeaderTemplate>
If you are using a DataTable as a Data Source for your Data List you could use the
OnItemCreatedmethod and provide a custom handler for theItemCreatedevent to add the column header values. I’m not sure why you would want to do this. It sounds like a Repeater or GridView might be better suited to your needs. At any rate, here’s the code.