Hi All,
I have an ItemTemplate with a RadNumericTextBox bound as follows:-
    
In some instances I wish to change the binding of the control at runtime ie costAdjust rather than cost
    
I have tried the following:-
    
But the .Items(0) returns an error.
Does anyone have any ideas how this can be achieved???
Thanx
Marcus
ItemTemplate
                                I have an ItemTemplate with a RadNumericTextBox bound as follows:-
| <ItemTemplate> | 
| <telerik:RadNumericTextBox ID="RadNumericTextBox_cost" Runat="server" | 
| Culture="English (United Kingdom)" | 
| Type="Currency" | 
| Width="60px" Text='<%# Eval("cost") %>' MinValue="0" MaxValue="5500" | 
| EnabledStyle-HorizontalAlign="Right" FocusedStyle-HorizontalAlign="Right"> | 
| <FocusedStyle HorizontalAlign="Right" /> | 
| <EnabledStyle HorizontalAlign="Right" /> | 
| </telerik:RadNumericTextBox> | 
| </ItemTemplate> | 
In some instances I wish to change the binding of the control at runtime ie costAdjust rather than cost
| <ItemTemplate> | 
| <telerik:RadNumericTextBox ID="RadNumericTextBox_cost" Runat="server" | 
| Culture="English (United Kingdom)" | 
| Type="Currency" | 
| Width="60px" Text='<%# Eval("costAdjust") %>' MinValue="0" MaxValue="5500" | 
| EnabledStyle-HorizontalAlign="Right" FocusedStyle-HorizontalAlign="Right"> | 
| <FocusedStyle HorizontalAlign="Right" /> | 
| <EnabledStyle HorizontalAlign="Right" /> | 
| </telerik:RadNumericTextBox> | 
| </ItemTemplate> | 
I have tried the following:-
| Dim costAdjust As RadNumericTextBox = (DirectCast(dg_detailRecovery.MasterTableView.Items(0).FindControl("RadNumericTextBox_cost"), RadNumericTextBox)) | 
| costAdjust.Text = "<%# DataBinder.Eval(Container.DataItem, 'costAdjust') %>" | 
But the .Items(0) returns an error.
Does anyone have any ideas how this can be achieved???
Thanx
Marcus
ItemTemplate

