This question is locked. New answers and comments are not allowed.
I've gone through a bunch of threads looking for something to suit my need here and not sure I've seen one as of yet. I currently have a static radgridview on the .xaml page with autogeneratecolumns = 'true' because in my case when I populate the grid with data I will never know ahead of time what type of data it is. In a particular case a column of data being returned may include <a></a> tags in it to indicate a hyperlink data set in which case I need to make that particular column a "GridViewdynamicHyperlinkColumn". I've seen threads dynamically creating the grid in the pageload, but as my population data for it is indeterminate this wont work and would have to be created further along the page creation structure.
Is there a simple way to get this done??
I've tried things like this, which throws an error upon creation:
Is there a simple way to get this done??
I've tried things like this, which throws an error upon creation:
Telerik.Windows.Controls.GridViewHyperlinkColumn myhyper = new Telerik.Windows.Controls.GridViewHyperlinkColumn(); radGrid1.Columns.Add(myhyper);
I've also tried the following, but as I dont know what the headers will be I cant get the child element from the result e.Result[0] set.
(
this.radGrid1.Columns[0] as Telerik.Windows.Controls.GridViewHyperlinkColumn).ContentBinding = new Binding(e.Result[0].ToString());
So since I dont know what the key name will be I use the following to get the first result set or e.Result[0][0] basically:
(this.radGrid1.Columns[0] as Telerik.Windows.Controls.GridViewHyperlinkColumn).ContentBinding = new Binding(e.Result.ElementAt(0).Values.ElementAt(0).ToString());this still errors saying index out of range, but gives me the correct string I need for the hyperlinkcolumn.