Hi,
I have a RadGrid under a RadTabStrip. ALL controls on the page are created dynamically. I need that when a Row in the Grid is double clicked, the client side javascript function switches the Tab according to a cell value on the Row. I have reached to the point where I can get my desired value from the Row. I get stuck when I need to reference the RadTabStrip that is being generated dynamically.
I get this error
Any help would be appreciated.
I have a RadGrid under a RadTabStrip. ALL controls on the page are created dynamically. I need that when a Row in the Grid is double clicked, the client side javascript function switches the Tab according to a cell value on the Row. I have reached to the point where I can get my desired value from the Row. I get stuck when I need to reference the RadTabStrip that is being generated dynamically.
<head runat="server"> |
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
<script type="text/javascript"> |
<!-- |
function OnRowDblClick(sender, eventArgs) { |
var dataItem = $get(eventArgs.get_id()); |
var grid = sender; |
var MasterTable = grid.get_masterTableView(); |
var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()]; |
var cell = MasterTable.getCellByColumnUniqueName(row, "CurrRegionName"); |
alert(cell.innerHTML); |
var tabStrip = $find("<%= TabStrip1.ClientID %>"); |
var selectedTab = tabStrip.findTabByText(cell.innerHTML); |
tabStrip.commitChanges(); |
} |
--> |
</script> |
</telerik:RadCodeBlock> |
<title></title> |
I get this error
Server Error in '/' Application. |
-------------------------------------------------------------------------------- |
Compilation Error |
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. |
Compiler Error Message: CS0103: The name 'TabStrip1' does not exist in the current context |
Source Error: |
Line 15: var cell = MasterTable.getCellByColumnUniqueName(row, "CurrRegionName"); |
Line 16: alert(cell.innerHTML); |
Line 17: var tabStrip = $find("<%= TabStrip1.ClientID %>"); |
Line 18: var selectedTab = tabStrip.findTabByText(cell.innerHTML); |
Line 19: tabStrip.commitChanges(); |
Source File: c:\AIK\Projects\Web\I2Care\AssetMgmt\ShowTabs.aspx Line: 17 |
Any help would be appreciated.