.
Hello,
I have a form where i put 2 related RadGrid.
The first RadGrid is the parent which contain the list of my SKUs.
My DataKeyNames is composed of 3 elements: Style, Color and Size which is my primary key.
My second RadGrid is the child of the first one.
So, once i click on any row on the first Grid, i want to display the list of my related POs in my second Grid.
I have done it before with one value and it worked fine. By my only problem, i don't know how to pass my 3 values. I tried to use in my ObjectDataSource PropertyName="SelectedValue" but it didn't work.
Can anyone help me ?
Thank you
Paul
Here's my ASPX code:
<
script language='javascript'>
function
RowSelected()
{
window["<%= rgPOs.ClientID %>"].AjaxRequest("<%= rgPOs.UniqueID %>", "");
}
</script>
<radG:RadGrid id="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True"
EnableAJAX="True"
GridLines="None" DataSourceID="ObjectDataSource1" Skin="Web20"
OnItemDataBound="RadGrid1_ItemDataBound" AutoGenerateColumns="False">
<clientsettings allowexpandcollapse="True">
<ClientEvents OnRowSelected="RowSelected" />
<Selecting AllowRowSelect="True"></Selecting>
</clientsettings>
<mastertableview datasourceid="ObjectDataSource1" pagesize="20"
DataKeyNames="Style,Color,Size">
<AlternatingItemStyle BackColor="Gainsboro" Wrap="True" Font-Italic="False" Font-Strikeout="False" Font-Underline="False" Font-Overline="False" Font-Bold="False"></AlternatingItemStyle>
<Columns>
<radG:GridBoundColumn DataField="Style" UniqueName="Style" HeaderText="Style"></radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Color" UniqueName="Color" HeaderText="Color"></radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Size" UniqueName="Size" HeaderText="Size"></radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Quantity_Ordered" UniqueName="Quantity_Ordered" HeaderText="Ordered">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Quantity_In_Production" UniqueName="Quantity_In_Production" HeaderText="In Production">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Quantity_Produced" UniqueName="Quantity_Produced" HeaderText="Produced">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Quantity_Shipped" UniqueName="Quantity_Shipped" HeaderText="Shipped">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Quantity_To_Produce" UniqueName="Quantity_To_Produce" HeaderText="Units To Produce">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Balance_To_Produce" UniqueName="Balance_To_Produce" HeaderText="Balance To Produce">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
<radg:GridTemplateColumn UniqueName="TemplateEditColumn">
<ItemTemplate>
<asp:HyperLink ID="ViewPO" runat="server" Text="View POs"></asp:HyperLink>
</ItemTemplate>
</radg:GridTemplateColumn>
<radg:GridTemplateColumn UniqueName="TemplateEditColumn">
<ItemTemplate>
<asp:HyperLink ID="ProductionStatus" runat="server" Text="Production status"></asp:HyperLink>
</ItemTemplate>
</radg:GridTemplateColumn>
<radg:GridTemplateColumn UniqueName="TemplateEditColumn">
<ItemTemplate>
<asp:HyperLink ID="Move2Production" runat="server" Text="Move to production"></asp:HyperLink>
</ItemTemplate>
</radg:GridTemplateColumn>
<radg:GridTemplateColumn UniqueName="TemplateEditColumn">
<ItemTemplate>
<asp:HyperLink ID="Move2Produced" runat="server" Text="Move to produced"></asp:HyperLink>
</ItemTemplate>
</radg:GridTemplateColumn>
</Columns>
<ExpandCollapseColumn>
<HeaderStyle Width="19px"></HeaderStyle>
</ExpandCollapseColumn>
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
</mastertableview>
</radG:RadGrid>
<!-- -------------------------------------------------------------------- -->
<!-- List of POs -->
<!-- -------------------------------------------------------------------- -->
<radG:RadGrid id="rgPOs" runat="server" AllowPaging="True" AllowSorting="True"
EnableAJAX="True" DataSourceID="ObjectDataSource2" ShowStatusBar="true"
GridLines="None" Skin="Web20">
<clientsettings>
<Selecting AllowRowSelect="True"></Selecting>
</clientsettings>
<MasterTableView pagesize="20" autogeneratecolumns="False" DataKeyNames="PO_No">
<AlternatingItemStyle BackColor="Gainsboro" Wrap="True" Font-Italic="False" Font-Strikeout="False" Font-Underline="False" Font-Overline="False" Font-Bold="False"></AlternatingItemStyle>
<Columns>
<radG:GridBoundColumn DataField="PO_No" UniqueName="PO_No" HeaderText="PO #"></radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Quantity_Ordered" UniqueName="Quantity_Ordered" HeaderText="Units Ordered">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Quantity_In_Production" UniqueName="Quantity_In_Production" HeaderText="Units in Production">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Quantity_Produced" UniqueName="Quantity_Produced" HeaderText="Units Produced">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Quantity_To_Produce" UniqueName="Quantity_To_Produce" HeaderText="Units To Produce">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Balance_To_Produce" UniqueName="Balance_To_Produce" HeaderText="Balance To Produce">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Estimated_Completed_Date" UniqueName="Estimated_Completed_Date" HeaderText="ECD" DataFormatString = "{0:dd-MM-yyyy}" >
<ItemStyle width="70px"></ItemStyle>
</radG:GridBoundColumn>
<radG:GridBoundColumn DataField="Days_In_Production" UniqueName="Days_In_Production" HeaderText="Days in Production">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
</radG:GridBoundColumn>
</Columns>
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
</mastertableview>
</radG:RadGrid>
<!-- -------------------------------------------------------------------- -->
<!-- Data source -->
<!-- -------------------------------------------------------------------- -->
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="FetchSKUByStage"
TypeName="PO_Tracking_WS.Service">
<SelectParameters>
<asp:Parameter DefaultValue="02,04" Name="p_stage" Type="String" />
<asp:Parameter DefaultValue="2" Name="p_indicator" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server"
SelectMethod="FetchSKUInALLPOs" TypeName="PO_Tracking_WS.Service">
<SelectParameters>
<asp:ControlParameter ControlID="RadGrid1" Name="p_style" PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="RadGrid1" Name="p_color" PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="RadGrid1" Name="p_size" PropertyName="SelectedValue" Type="String" />
<asp:Parameter DefaultValue="2" Name="p_indicator" Type="Int32" />
<asp:Parameter DefaultValue="04" Name="p_stage" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>


| <telerik:RadPageView ID="ReportPage" runat="server"> |
| <asp:Panel ID="Panel" runat="server"> |
| <telerik:RadAjaxManager ID="AjaxManager" runat="server" UpdatePanelsRenderMode="Inline" |
| ClientEvents-OnRequestStart="mngRequestStarted"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="TabStrip"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="TabStrip" /> |
| <telerik:AjaxUpdatedControl ControlID="MultiplePageViews" LoadingPanelID="AjaxLoadingPanel" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToExcel" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToWord" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToCsv" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="ReportGrid"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="Panel" LoadingPanelID="LoadingPanel2" /> |
| <telerik:AjaxUpdatedControl ControlID="ReportGrid" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToExcel" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToWord" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToCsv" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="ReportCatalogue"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="FiltersTable" LoadingPanelID="LoadingPanel2" /> |
| <telerik:AjaxUpdatedControl ControlID="ReportGrid" LoadingPanelID="LoadingPanel2" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToExcel" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToWord" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToCsv" /> |
| <telerik:AjaxUpdatedControl ControlID="Panel" LoadingPanelID="LoadingPanel2" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="GenerateReportButton"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="ReportGrid" LoadingPanelID="LoadingPanel2" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToExcel" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToWord" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToCsv" /> |
| <telerik:AjaxUpdatedControl ControlID="Panel" LoadingPanelID="LoadingPanel2" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="ExportToExcel"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="ReportGrid" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToExcel" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="ExportToWord"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="ReportGrid" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToWord" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="ExportToCsv"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="ReportGrid" /> |
| <telerik:AjaxUpdatedControl ControlID="ExportToCsv" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="Panel"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="Splitter" /> |
| <telerik:AjaxUpdatedControl ControlID="ReportCatalogue" /> |
| <telerik:AjaxUpdatedControl ControlID="ReportGrid" /> |
| <telerik:AjaxUpdatedControl ControlID="FiltersTable" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| <ClientEvents OnRequestStart="mngRequestStarted" /> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel ID="LoadingPanel2" runat="server" Transparency="30" |
| BackColor="#E0E0E0"> |
| <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading3.gif") %>' |
| style="margin-top: 40px;" /> |
| </telerik:RadAjaxLoadingPanel> |
| <telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel" runat="server" Height="75px" |
| Width="75px" Transparency="25"> |
| <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading3.gif") %>' /> |
| </telerik:RadAjaxLoadingPanel> |
| <telerik:RadSplitter ID="Splitter" runat="server" Height="95%" Width="100%" SplitBarsSize="10" > |
| <telerik:RadPane ID="ReportCataloguePane" runat="server" Width="200" Scrolling="Both"> |
| <telerik:RadPanelBar runat="server" ID="ReportCatalogue" ExpandMode="SingleExpandedItem" |
| AllowCollapseAllItems="true" OnItemClick="TecaReportCatalogue_ItemClicked" Skin="Vista" |
| Width="100%" Font-Names="Calibri" Font-Size="Smaller" Font-Bold="True" CausesValidation="false"> |
| <CollapseAnimation Duration="100" Type="None" /> |
| <ExpandAnimation Duration="100" Type="None" /> |
| </telerik:RadPanelBar> |
| </telerik:RadPane> |
| <telerik:RadSplitBar ID="SplitBar1" runat="server" CollapseMode="Forward" CollapseExpandPaneText ="Reports Catalogue"></telerik:RadSplitBar> |
| <telerik:RadPane ID="GridPane" runat="server"> |
| <telerik:RadGrid ID="ReportGrid" runat="server" GridLines="None" Skin="Vista" |
| Height="99.5%" Visible="False" AllowSorting="True" OnNeedDataSource="TecaReportGrid_NeedDataSource" |
| ShowGroupPanel="True" Font-Names="Calibri" Font-Size="Smaller" AllowPaging="True" |
| PagerStyle-Mode="NextPrevNumericAndAdvanced" PageSize="14" EnableAjaxSkinRendering="true"> |
| <MasterTableView> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| </MasterTableView> |
| <ClientSettings AllowDragToGroup="True"> |
| <Scrolling AllowScroll="True" /> |
| </ClientSettings> |
| <PagerStyle Mode="NextPrevNumericAndAdvanced" /> |
| <FilterMenu EnableTheming="True" Skin="Vista"> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </FilterMenu> |
| </telerik:RadGrid> |
| </telerik:RadPane> |
| <telerik:RadSplitBar ID="SplitBar2" runat="server" CollapseMode="Backward" CollapseExpandPaneText ="Report Filters"></telerik:RadSplitBar> |
| <telerik:RadPane ID="FilterPane" runat="server" Width="200" Scrolling="Both"> |
| <table id="FiltersTable" runat="server" class="FilterStyle"> |
| <tr id="FiscalYearRow" runat="server" visible="false"> |
| <td> |
| <asp:Label runat="server" Text="Fiscal Year" ID="FiscalYearLabel" Visible="False"></asp:Label></td> |
| <td> |
| <asp:ListBox ID="FiscalYearListBox" runat="server" AutoPostBack="false" Visible="False" |
| CssClass="FilterStyle"></asp:ListBox></td> |
| </tr> |
| (some other asp controls are table format all have visible set to FALSE and are updated onclick of panel bar item click accordingly) |
| </table> |
| </telerik:RadPane> |
| </telerik:RadSplitter> |
| </asp:Panel> |
| </telerik:RadPageView> |
