I am having some trouble with getting a cell value when visible = false. The innerHTML no longer returns the value. Is there another solution?
When .MasterTableView.GetColumnSafe(
"ID"
).Visible =
False
is commented out it works correctly. But, I need this column to be invisible.
With
mGridEx
.MasterTableView.GetColumnSafe(
"ID"
).Visible =
False
' .MasterTableView.Rebind()
End
With
<telerik:RadScriptManager ID=
"ScriptManager"
runat=
"server"
/>
<telerik:RadGrid ID=
"RadGrid"
runat=
"server"
Width=
"100%"
Height=
"90%"
Font-Names=
"Verdana"
GridLines=
"None"
AllowSorting=
"True"
ShowGroupPanel=
"True"
Skin=
"Office2007"
AllowPaging=
"True"
PageSize=
"50"
AutoPostBack=
"True"
>
<MasterTableView>
</MasterTableView>
<ClientSettings AllowDragToGroup=
"True"
>
<Selecting AllowRowSelect=
"True"
/>
<Scrolling AllowScroll=
"True"
UseStaticHeaders=
"True"
SaveScrollPosition=
"True"
>
</Scrolling>
<ClientEvents OnRowDblClick=
"RowDblClick"
/>
</ClientSettings>
</telerik:RadGrid>
<script type=
"text/javascript"
>
function
RowDblClick(sender, args) {
var
grid = sender;
var
MasterTable = grid.get_masterTableView();
var
row = MasterTable.get_dataItems()[args.get_itemIndexHierarchical()];
var
cell = MasterTable.getCellByColumnUniqueName(row,
"ID"
);
var
value = cell.innerHTML
alert(
"ID for this Row is: "
+ value);
}
</script>