Hi,
I have a rad grid displaying on the screen with some rows.When Expand each row i am presenting with three tabs(Detals,compartments,products).See attachment
When I click on Compartmrents tab need to display the grid based on the LoadId.
Presently i am displaying this grid based on shipment id but i need this grid based on the LoadId.
I am facing issue in pasing loadId value to storedprocedure for displaying this grid.
aspx File
GetDischargeDetailWSListByDischargeId(dischargeID);
<telerik:RadPane ID="LoadingPane" runat="server" CssClass="noOverflow" >
<div id="LoadingPanelHeader" class="paneHeader">
<span class="headerPaneText">
<asp:Label ID="lbl_LoadingHeader" runat="server"></asp:Label></span>
</div>
<!------------------------------------
---------LOADING SECTION -----------
------------------------------------->
<telerik:RadAjaxPanel ID="LoadingPanel" runat="server" CssClass="radPaneContent TransferHeader">
</telerik:RadAjaxPanel>
<telerik:RadGrid ID="LoadingRadGrid" OnItemDataBound="LoadingRadGridFormat_OnItemDataBound"
runat="server" AutoGenerateColumns="false" CssClass="TransferGridPanel" Height="275px"
Width="375px" OnNeedDataSource="LoadingRadGrid_NeedDataSource">
<MasterTableView ShowHeadersWhenNoRecords="true">
<NestedViewTemplate>
<telerik:RadTabStrip runat="server" ID="LoadTabStip" MultiPageID="LoadMultipage"
SelectedIndex="0" OnTabClick="LoadTabStip_TabClick" Orientation="HorizontalTop">
<Tabs runat="server">
<telerik:RadTab runat="server" Text="Details" PageViewID="RadPageViewDetails">
</telerik:RadTab>
<telerik:RadTab runat="server" Text="Compartments" PageViewID="RadPageViewCompartments">
</telerik:RadTab>
<telerik:RadTab runat="server" Text="Products" PageViewID="RadPageViewProducts">
</telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage runat="server" ID="LoadMultipage" SelectedIndex="0" RenderSelectedPageOnly="false">
<telerik:RadPageView runat="server" ID="RadPageViewDetails">
<div class="contactWrap">
<table cellpadding="0" cellspacing="0">
<tr>
<td><asp:Label ID="lbl_TerminalId" runat="server" Text='Terminal Id:' Font-Bold="true"></asp:Label></td>
<td><asp:Label ID="lbl_TerminalIdValue" runat="server"></asp:Label> </td>
</tr>
<tr>
<td><asp:Label ID="lbl_TerminalName" runat="server" Text='TerminalName:' Font-Bold="true"></asp:Label></td>
<td><asp:Label ID="lbl_TerminalNameValue" runat="server"></asp:Label> </td>
</tr>
</table>
</div>
</telerik:RadPageView>
<telerik:RadPageView runat="server" ID="RadPageViewCompartments">
<telerik:RadGrid ID="LoadTabRadGrid" runat="server" AutoGenerateColumns="false" CssClass="TransferGridPanel"
Height="233px" Width="475px" >
<MasterTableView ShowHeadersWhenNoRecords="true">
<Columns>
<telerik:GridBoundColumn UniqueName="CompNo" DataField="CompartmentIndex" HeaderText="Comp No.">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="PlannedLoadProd" DataField="PlannedProductName" HeaderText="Planned Product">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ActualLoadProd" DataField="ActualProductName" HeaderText="Actual Product">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="PlannedLoadQty" DataField="PlannedQuantity" HeaderText="Planned Quantity">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ActualLoadQty" DataField="ActualQuantity" HeaderText="Actual Quantity">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadPageView>
</telerik:RadMultiPage>
</NestedViewTemplate>
<Columns>
<telerik:GridBoundColumn UniqueName="LoadId" DataField="Loading_ID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="TerminalId" DataField="Plant_ID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="TerminalName" DataField="TerminalName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="LoadingStartTime" DataField="LoadingStartTime">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="LoadingEndTime" DataField="LoadingEndTime">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="true" />
</ClientSettings>
</telerik:RadGrid>
</telerik:RadPane>
aspx.cs file:
protected void LoadTabStip_TabClick(object sender, RadTabStripEventArgs e)
{
//AddPageView(e.Tab.Text);
e.Tab.PageView.Selected = true;
string selectedtabindex = e.Tab.Text;
Int64 shipmentID = Convert.ToInt64(ShiftTreeView.SelectedNode.Value);
switch (selectedtabindex)
{
case "Details":
{
break;
}
case "Compartments":
{
RadPageView page = (RadPageView)e.Tab.PageView;
RadGrid grdLoad = (RadGrid)page.FindControl("LoadTabRadGrid");
List<LoadingDetailExtraEntity> loadingTabListinstance = new List<LoadingDetailExtraEntity>();
loadingTabListinstance = loadingDetailManager.GetLoadingDetailExtraListByShipmentId(shipmentID);
grdLoad.DataSource = loadingTabListinstance;
grdLoad.DataBind();
//e.Tab.Controls.Add(grdLoad);
break;
}
case "Products":
{
break;
}
}
}
I have a rad grid displaying on the screen with some rows.When Expand each row i am presenting with three tabs(Detals,compartments,products).See attachment
When I click on Compartmrents tab need to display the grid based on the LoadId.
Presently i am displaying this grid based on shipment id but i need this grid based on the LoadId.
I am facing issue in pasing loadId value to storedprocedure for displaying this grid.
aspx File
GetDischargeDetailWSListByDischargeId(dischargeID);
<telerik:RadPane ID="LoadingPane" runat="server" CssClass="noOverflow" >
<div id="LoadingPanelHeader" class="paneHeader">
<span class="headerPaneText">
<asp:Label ID="lbl_LoadingHeader" runat="server"></asp:Label></span>
</div>
<!------------------------------------
---------LOADING SECTION -----------
------------------------------------->
<telerik:RadAjaxPanel ID="LoadingPanel" runat="server" CssClass="radPaneContent TransferHeader">
</telerik:RadAjaxPanel>
<telerik:RadGrid ID="LoadingRadGrid" OnItemDataBound="LoadingRadGridFormat_OnItemDataBound"
runat="server" AutoGenerateColumns="false" CssClass="TransferGridPanel" Height="275px"
Width="375px" OnNeedDataSource="LoadingRadGrid_NeedDataSource">
<MasterTableView ShowHeadersWhenNoRecords="true">
<NestedViewTemplate>
<telerik:RadTabStrip runat="server" ID="LoadTabStip" MultiPageID="LoadMultipage"
SelectedIndex="0" OnTabClick="LoadTabStip_TabClick" Orientation="HorizontalTop">
<Tabs runat="server">
<telerik:RadTab runat="server" Text="Details" PageViewID="RadPageViewDetails">
</telerik:RadTab>
<telerik:RadTab runat="server" Text="Compartments" PageViewID="RadPageViewCompartments">
</telerik:RadTab>
<telerik:RadTab runat="server" Text="Products" PageViewID="RadPageViewProducts">
</telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage runat="server" ID="LoadMultipage" SelectedIndex="0" RenderSelectedPageOnly="false">
<telerik:RadPageView runat="server" ID="RadPageViewDetails">
<div class="contactWrap">
<table cellpadding="0" cellspacing="0">
<tr>
<td><asp:Label ID="lbl_TerminalId" runat="server" Text='Terminal Id:' Font-Bold="true"></asp:Label></td>
<td><asp:Label ID="lbl_TerminalIdValue" runat="server"></asp:Label> </td>
</tr>
<tr>
<td><asp:Label ID="lbl_TerminalName" runat="server" Text='TerminalName:' Font-Bold="true"></asp:Label></td>
<td><asp:Label ID="lbl_TerminalNameValue" runat="server"></asp:Label> </td>
</tr>
</table>
</div>
</telerik:RadPageView>
<telerik:RadPageView runat="server" ID="RadPageViewCompartments">
<telerik:RadGrid ID="LoadTabRadGrid" runat="server" AutoGenerateColumns="false" CssClass="TransferGridPanel"
Height="233px" Width="475px" >
<MasterTableView ShowHeadersWhenNoRecords="true">
<Columns>
<telerik:GridBoundColumn UniqueName="CompNo" DataField="CompartmentIndex" HeaderText="Comp No.">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="PlannedLoadProd" DataField="PlannedProductName" HeaderText="Planned Product">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ActualLoadProd" DataField="ActualProductName" HeaderText="Actual Product">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="PlannedLoadQty" DataField="PlannedQuantity" HeaderText="Planned Quantity">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ActualLoadQty" DataField="ActualQuantity" HeaderText="Actual Quantity">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadPageView>
</telerik:RadMultiPage>
</NestedViewTemplate>
<Columns>
<telerik:GridBoundColumn UniqueName="LoadId" DataField="Loading_ID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="TerminalId" DataField="Plant_ID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="TerminalName" DataField="TerminalName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="LoadingStartTime" DataField="LoadingStartTime">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="LoadingEndTime" DataField="LoadingEndTime">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="true" />
</ClientSettings>
</telerik:RadGrid>
</telerik:RadPane>
aspx.cs file:
protected void LoadTabStip_TabClick(object sender, RadTabStripEventArgs e)
{
//AddPageView(e.Tab.Text);
e.Tab.PageView.Selected = true;
string selectedtabindex = e.Tab.Text;
Int64 shipmentID = Convert.ToInt64(ShiftTreeView.SelectedNode.Value);
switch (selectedtabindex)
{
case "Details":
{
break;
}
case "Compartments":
{
RadPageView page = (RadPageView)e.Tab.PageView;
RadGrid grdLoad = (RadGrid)page.FindControl("LoadTabRadGrid");
List<LoadingDetailExtraEntity> loadingTabListinstance = new List<LoadingDetailExtraEntity>();
loadingTabListinstance = loadingDetailManager.GetLoadingDetailExtraListByShipmentId(shipmentID);
grdLoad.DataSource = loadingTabListinstance;
grdLoad.DataBind();
//e.Tab.Controls.Add(grdLoad);
break;
}
case "Products":
{
break;
}
}
}