Quantcast
Viewing all articles
Browse latest Browse all 7205

How to create a DataItem template for a grid column at runtime


This example demonstrates how to create a simple hyperlink template programmatically. There is a MyHyperlinkTemplate class; it implements an ITemplate standard interface. A MyHyperlinkTemplate instance is created and assigned to a column's DataItemTemplate property on an ASPxGridView1_Load event.

See Also:
Creating Web Server Control Templates Dynamically

Example Comments

Added By: Muhammad Jamil 3 at: 10/9/2012 9:07:09 AM    

I have some different kind of scenerio where its creating serious issue. My data is coming from DataTables to bind which are dynamically created according to number of statuses we have. I used AutoGeneratedFields=true to display records, now I want to make them hyperlinks. Which is somehow achieved using help of following demonstration and its working fine. But problem is that when I open Child Detail Row, Parent Links disappear and only bound data remains, while Child doesnt disappear on viewing Subchilds.
Checked all events and life cycle etc but got no clue at all ion this regard. One thing I noticed is that in case of child view it cursor call Parent's DataBound while its perfectly calling on child and subchild and they are accurately showing hyperlinks.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>