I have a rad grid with check boxes.
I have a rad combo box that controls what data is returned to the grid.
I have a button that processes the checked items.
The first time the data is loaded, selected items are present and processed.
If I change the combo box selection, the data loaded is correct but the selected items always returns an empty list.
The Grid
The Data Source
The JavaScript
I have a rad combo box that controls what data is returned to the grid.
I have a button that processes the checked items.
The first time the data is loaded, selected items are present and processed.
If I change the combo box selection, the data loaded is correct but the selected items always returns an empty list.
The Grid
<MasterTableView CommandItemDisplay="Top" AllowCustomPaging="True" AllowPaging="True" TableLayout="Fixed" ClientDataKeyNames="AssetId,MacId" PagerStyle-PageSizes="25;50;75;100"> <CommandItemSettings ShowAddNewRecordButton="False"></CommandItemSettings> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True"> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True"> </ExpandCollapseColumn> <Columns> <telerik:GridClientSelectColumn HeaderStyle-Width="3em" UniqueName="ClientSelectColumn"> <HeaderStyle Width="3em" /> </telerik:GridClientSelectColumn> <telerik:GridBoundColumn DataField="MacId" HeaderText="Mac Id" UniqueName="MacId"> <HeaderStyle Width="75px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PoleId" HeaderText="Pole" SortExpression="PoleId" UniqueName="PoleId" HeaderStyle-Wrap="false" HeaderStyle-Width="75px"> </telerik:GridBoundColumn>The Data Source
<asp:LinqDataSource ID="StatusDataSource" runat="server" ContextTypeName="EnterpriseWeb.DataContracts.Diagnostics.DiagnosticsDataContext" EntityTypeName="" OrderBy="Weight" Select="new (StatusId, Description, ShowByDefault)" TableName="StatusCodeRows" OnSelected="StatusDataSource_Selected"></asp:LinqDataSource>The JavaScript
var Items = MasterTableView.get_selectedItems();if (Items.length > 0){ var SelectedAssetIds = []; $.each(Items, function (i, Item) { SelectedAssetIds.push(Item.getDataKeyValue("AssetId")); }); var List = SelectedAssetIds.join("|"); OpenRadWindow(BaseUrl + "Html/WorkOrders/WorkOrdersCreatepage.aspx?InstallationId=" + InstallationId + "&Assets=" + List, "WorkOrderCreateWindow");}