Hello
I'm getting value of a cell in selected row in RadGrid. I have enable Client-Side Row Selection and PostBackOnRowClick.
And from code-behind, I get the value of the cell with this code snippet in ItemCommand event:
And it did work.
But when I put my grid in to a RadDock, then SelectedItems always return 0.
I don't know why?
Can you help me explain this problem?
Thank you.
Thanh Dang
I'm getting value of a cell in selected row in RadGrid. I have enable Client-Side Row Selection and PostBackOnRowClick.
<telerik:RadGrid ID="RgdOffer" runat="server" CellSpacing="0" EnableEmbeddedSkins="False" GridLines="None" onitemcommand="RgdOffer_ItemCommand" onitemdatabound="RgdOffer_ItemDataBound" Skin="GPF" CssClass="shadow"> <ClientSettings EnableRowHoverStyle="True" AllowColumnsReorder="True" EnablePostBackOnRowClick="True" ReorderColumnsOnClient="True"> <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" /> </ClientSettings>And from code-behind, I get the value of the cell with this code snippet in ItemCommand event:
if (e.CommandName == "RowClick" && e.Item is GridDataItem) { // String to store OfferNo string strOfferNo = null; // Get OfferNo of selected Offer foreach (GridDataItem item in RgdOffer.SelectedItems) { strOfferNo = item["OfferNo"].Text; }And it did work.
But when I put my grid in to a RadDock, then SelectedItems always return 0.
I don't know why?
Can you help me explain this problem?
Thank you.
Thanh Dang