This is a migrated thread and some comments may be shown as answers.

GridTableView call codebehind function

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
NS
Top achievements
Rank 1
NS asked on 18 Aug 2008, 01:10 PM
Hello,
In a typical grid I would declare a column like this to call a codebehind function. (eg pass a string, and return a color trough a codebehind function)

<telerik:GridTemplateColumn ItemStyle-Width="15px" HeaderText="Workflow Status">  
                                            <ItemTemplate> 
                                                <asp:Label ID="Label1" runat="server" Width="15px" BackColor='<%# translateColor(Eval("K2Status").ToString()) %>' /> 
                                            </ItemTemplate> 
                                           </telerik:GridTemplateColumn> 

I want to do something similar in a nested grid. (using GridTableView),
However, If I do this, I get an "object reference not set error" on the label where I try to call the codebehind functon.

Any ideas how to solve this ?
Thanks,
Nicolas

1 Answer, 1 is accepted

Sort by
0
NS
Top achievements
Rank 1
answered on 18 Aug 2008, 02:12 PM
I solved it myself. This actually also works on a GridTableView. My problem was that there was an element missing in my object.
Tags
Grid
Asked by
NS
Top achievements
Rank 1
Answers by
NS
Top achievements
Rank 1
Share this question
or