Jump to content
Software FX Community

Grid has problem when in user control


John1grid
 Share

Recommended Posts

I set up a grid with master-detail feature.  It is similar to the real estate example "DataBind_MasterDetail.aspx".It works fine in a web page, but my application is based on user controls.When I use the exact same grid and ObjectDataSource code in a user control it does not work correctly.It displays data correctly in the master grid. But when the user clicks the "+" on a row you get the grid's "wait" message repeatedly.  You never get a display of the detail data.I wonder how to fix it or even how to debug what is happening after the user clicks the "+".

John

 *****

 protected override void OnPreRender(EventArgs e)

{

if (PopulateOnPrerender)

{

Grid1.ToolBar.Buttons.ChangePalette.Visible = false;

Grid1.ToolBar.Buttons.ClearFiltering.Visible =

false;Grid1.ToolBar.Buttons.ShowHiddenColumns.Visible = false;

Grid1.ToolBar.Buttons.ToggleHighlighting.Visible =

false;

//lblCompany_ID.Text = UserContext.Session.Company_ID;

//lblWarehouse_ID.Text = UserContext.Session.Warehouse_ID;lblCompany_ID.Text = "1";

lblWarehouse_ID.Text =

"1";lblFinished_MIN.Text = "5/15/2007";

lblFinished_MAX.Text =

"5/25/2007";lbl_UserID.Text = "";lblSortDesc.Text = "y";

}

}

****

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Productivity_Warehouse_ByDay_ViewControl.ascx.cs" Inherits="FastFetchMgr.WebSite3._5.Controls.WH.Productivity_Warehouse_ByDay_ViewControl" %>

<%

@ Register Assembly="GridFX.WebForms" Namespace="GridFX.WebForms" TagPrefix="GridFX" %>

<%

@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms" TagPrefix="chartfx7" %>

<

table style="width: 860px" >

<tr>

<td>

<GridFX:Grid ID="Grid1" runat="server" DataSourceID="MasterDatasource1" DataParameterField="Finished"

Width="98%" Motif="Outlook2007" >

<Columns>

<GridFX:FieldColumn Field="Finished" Title="Day">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="Avg_PickDurationSecPerPickLin" Title="SecPerPickLin">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="Avg_PickDurationSecPerQtyToPick" Title="SecPerQtyToPick">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="Sum_PickDurationSec" Title="SecPickDuration">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="Sum_Ph1SecondsAmortized" Title="Ph1Sec">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="NumPickTicket" Title="PickTicket">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="SumNumPickLin" Title="PickLin">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="SumQtyToPick" Title="ToPick">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="SumQtyPicked" Title="Picked">

</GridFX:FieldColumn>

</Columns>

<DataFields>

<GridFX:DateTimeField DataPath="Finished" IsKey="True">

</GridFX:DateTimeField>

<GridFX:TextField DataPath="Avg_PickDurationSecPerPickLin">

</GridFX:TextField>

<GridFX:TextField DataPath="Avg_PickDurationSecPerQtyToPick">

</GridFX:TextField>

<GridFX:TextField DataPath="Sum_PickDurationSec">

</GridFX:TextField>

<GridFX:TextField DataPath="Sum_Ph1SecondsAmortized">

</GridFX:TextField>

<GridFX:TextField DataPath="NumPickTicket">

</GridFX:TextField>

<GridFX:TextField DataPath="SumNumPickLin">

</GridFX:TextField>

<GridFX:TextField DataPath="SumQtyToPick">

</GridFX:TextField>

<GridFX:TextField DataPath="SumQtyPicked">

</GridFX:TextField>

</DataFields>

<TitleBar Title="Picking Status" Visible="true" Style-HorizontalAlign="Left">

<Image Icon="Box1" />

</TitleBar>

<ItemDetails>

<ContentTemplate>

<GridFX:Grid ID="Grid2" runat="server" DataSourceID="DetailDatasource1" Width="100%">

<Columns>

<GridFX:FieldColumn Field="PickTicket" Title="PickTicket">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="PickDurationSecPerPickLin" Title="SecPerPickLin">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="PickDurationSecPerQtyToPick" Title="SecPerQtyToPick">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="PickDurationSec" Title="SecPickDuration">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="Ph1SecondsAmortized" Title="Ph1Sec">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="NumPickLin" Title="PickLin">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="QtyToPick" Title="ToPick">

</GridFX:FieldColumn>

<GridFX:FieldColumn Field="QtyPicked" Title="Picked">

</GridFX:FieldColumn>

</Columns>

<DataFields>

<GridFX:TextField DataPath="PickTicket">

</GridFX:TextField>

<GridFX:TextField DataPath="PickDurationSecPerPickLin">

</GridFX:TextField>

<GridFX:TextField DataPath="PickDurationSecPerQtyToPick">

</GridFX:TextField>

<GridFX:TextField DataPath="PickDurationSec">

</GridFX:TextField>

<GridFX:TextField DataPath="Ph1SecondsAmortized">

</GridFX:TextField>

<GridFX:TextField DataPath="NumPickLin">

</GridFX:TextField>

<GridFX:TextField DataPath="QtyToPick">

</GridFX:TextField>

<GridFX:TextField DataPath="QtyPicked">

</GridFX:TextField>

</DataFields>

<ToolBar Visible="False">

</ToolBar>

<Border Type="None" />

</GridFX:Grid>

</ContentTemplate>

</ItemDetails>

</GridFX:Grid>

<asp:ObjectDataSource ID="MasterDataSource1" runat="server" TypeName="FastFetchMgr.Library.Manager.MgtPickLineManager"

SelectMethod="GetPickTicketAmortizePh1SumByDay" EnablePaging="false">

<SelectParameters>

<asp:ControlParameter Name="Company_ID" ControlID="lblCompany_ID" PropertyName="Text" />

<asp:ControlParameter Name="Warehouse_ID" ControlID="lblWarehouse_ID" PropertyName="Text" />

<asp:ControlParameter Name="Finished_MIN" ControlID="lblFinished_MIN" PropertyName="Text" />

<asp:ControlParameter Name="Finished_MAX" ControlID="lblFinished_MAX" PropertyName="Text" />

<asp:ControlParameter Name="sSortDesc" ControlID="lblSortDesc" PropertyName="Text" />

</SelectParameters>

</asp:ObjectDataSource>

<asp:ObjectDataSource ID="DetailDataSource1" runat="server" TypeName="FastFetchMgr.Library.Manager.MgtPickLineManager"

SelectMethod="GetPickTicketAmortizePh1OneDay">

<SelectParameters>

<asp:ControlParameter Name="Company_ID" ControlID="lblCompany_ID" PropertyName="Text" />

<asp:ControlParameter Name="Warehouse_ID" ControlID="lblWarehouse_ID" PropertyName="Text" />

<asp:ControlParameter ControlID="Grid1" Name="Finished" PropertyName="DataParameterValue"

Type="DateTime" />

</SelectParameters>

</asp:ObjectDataSource>

</td>

</tr>

<tr>

<td>

 

</td>

</tr>

<tr>

<td>

<asp:Label ID="lblFinished_MAX" runat="server" Visible="False"></asp:Label>

<asp:Label ID="lblWarehouse_ID" runat="server" Visible="False"></asp:Label>

<asp:Label ID="lblFinished_MIN" runat="server" Visible="False"></asp:Label>

<asp:Label ID="lblCompany_ID" runat="server" Visible="False"></asp:Label>

<asp:Label ID="lbl_UserID" runat="server" Visible="False"></asp:Label>

<asp:Label ID="lblSortDesc" runat="server" Visible="False"></asp:Label>

</td></tr>

</

table>

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...