Created
August 28, 2013 04:52
-
-
Save monyskynet/6362253 to your computer and use it in GitHub Desktop.
Create custom datatemplate in grid
From http://www.devexpress.com/Support/Center/Question/Details/Q106712
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[C#]Open in popup windowpublic class MyTemplate : ITemplate | |
{ | |
public void InstantiateIn(Control container) | |
{ | |
HyperLink link = new HyperLink(); | |
link.Text = DataBinder.Eval(container, "DataItem.Id").ToString(); | |
link.NavigateUrl = "javascript:alert('" + DataBinder.Eval(container, "DataItem.Id").ToString() + "');"; | |
container.Controls.Add(link); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment