Hi,
I have a RadGrid like this: (only selective code is shown here for clarity..please bear)
<telerik:RadGrid ID="MessageView" runat="server" AllowPaging="True" PageSize="50"
OnGroupsChanging="MessageView_GroupsChanging" OnNeedDataSource="MessageView_NeedDataSource"
AllowSorting="true" ShowGroupPanel="true" AutoGenerateColumns="False" GridLines="None"
OnItemDataBound="MessageView_ItemDataBound" OnItemCommand="MessageView_ItemCommand"
Width="916px">
<ClientEvents OnRowDblClick="MessageViewDoubleClick"></ClientEvents>
I have a column like this in RadGrid HTML:
<telerik:GridTemplateColumn UniqueName="CustomerName">
<ItemTemplate>
<asp:Label ID="hdnLblCustomerName" Style="visibility: hidden;" runat="server"></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
ON SERVER SIDE... I am assigning the value to this label in MessageView_ItemDataBound event like this:
Label hdnLblCustomerName = (Label)e.Item.FindControl("hdnLblCustomerName");
hdnLblCustomerName.Value = Convert.ToString(dt.Rows[0]["CustomerName"]);
NOW, In the Client Side , i have written like this:
function MessageViewDoubleClick(sender, args)
{
var dataItem = $get(args.get_id());
var grid = sender;
var MasterTable = grid.get_masterTableView();
var row = MasterTable.get_dataItems()[args.get_itemIndexHierarchical()];
var cell = MasterTable.getCellByColumnUniqueName(row, "CustomerName");
var lblvalue = cell.innerHTML;
}
Till here everything is going right, my label got assigned with the correct value...and now I have to fetch this on the client side
BUT , now the problem is
lblvalue is showing value like this
<span id="MessageView_ctl00_ctl04_hdnLblCustomerName" style="visibility:hidden;">John</span>
but I need only "John" .
Please suggest how to achieve this.
Thanks.
I have a RadGrid like this: (only selective code is shown here for clarity..please bear)
<telerik:RadGrid ID="MessageView" runat="server" AllowPaging="True" PageSize="50"
OnGroupsChanging="MessageView_GroupsChanging" OnNeedDataSource="MessageView_NeedDataSource"
AllowSorting="true" ShowGroupPanel="true" AutoGenerateColumns="False" GridLines="None"
OnItemDataBound="MessageView_ItemDataBound" OnItemCommand="MessageView_ItemCommand"
Width="916px">
<ClientEvents OnRowDblClick="MessageViewDoubleClick"></ClientEvents>
I have a column like this in RadGrid HTML:
<telerik:GridTemplateColumn UniqueName="CustomerName">
<ItemTemplate>
<asp:Label ID="hdnLblCustomerName" Style="visibility: hidden;" runat="server"></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
ON SERVER SIDE... I am assigning the value to this label in MessageView_ItemDataBound event like this:
Label hdnLblCustomerName = (Label)e.Item.FindControl("hdnLblCustomerName");
hdnLblCustomerName.Value = Convert.ToString(dt.Rows[0]["CustomerName"]);
NOW, In the Client Side , i have written like this:
function MessageViewDoubleClick(sender, args)
{
var dataItem = $get(args.get_id());
var grid = sender;
var MasterTable = grid.get_masterTableView();
var row = MasterTable.get_dataItems()[args.get_itemIndexHierarchical()];
var cell = MasterTable.getCellByColumnUniqueName(row, "CustomerName");
var lblvalue = cell.innerHTML;
}
Till here everything is going right, my label got assigned with the correct value...and now I have to fetch this on the client side
BUT , now the problem is
lblvalue is showing value like this
<span id="MessageView_ctl00_ctl04_hdnLblCustomerName" style="visibility:hidden;">John</span>
but I need only "John" .
Please suggest how to achieve this.
Thanks.