in

Software FX Community

Discuss and find help for all Software FX products.

Installation - Error Creating Control - Unable to cast object of type System.Web.UI.UserControl

Last post 04-16-2008 9:51 AM by PDyer. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 08-15-2007 5:08 PM

    Installation - Error Creating Control - Unable to cast object of type System.Web.UI.UserControl

    I just installed GridFX (1.0.2734.17954) and when I try to add it to a User Control the following error appears:

    Error Creating Control - Unable to cast object of type System.Web.UI.UserControl to type System.Web.UI.Page

    I am able to add it to an .aspx page but my application requires User Controls.

    Any ideas?

    Thanks

     

     

  • 08-16-2007 10:10 AM In reply to

    Re: Installation - Error Creating Control - Unable to cast object of type System.Web.UI.UserControl

    Thank you very much for your interest in Grid FX. I have confirmed this issue to be a bug. It has been submitted to our development team to be fixed. As soon as development updates the bug report; I will then relay this information back to you and provide you with a Hotfix or Service Pack.

    Regards.

    --
    Let's Ride Bikes
  • 03-20-2008 6:14 PM In reply to

    Re: Installation - Error Creating Control - Unable to cast object of type System.Web.UI.UserControl

    I am using Grid Fx for the first time. I use Visual Studio 2008.

    When I drag a grid to a user control (*.aspx.cs) I get:
    Error Creating Control - Grid
    Failed to create desinger 'GridFX.WebFOrms.Grid,GridFX.WebForms,Version 1.0.2799.23418 etc.

    Is this still an unresolved bug?

  • 03-24-2008 9:18 AM In reply to

    Re: Installation - Error Creating Control - Unable to cast object of type System.Web.UI.UserControl

    No, that bug was resolved long ago.  If you look, the date was march 2007.  I got a little confused myself :)

    Your situation is likely due to the dlls missing or being incorrect.  Plus I noticed you have an earlier version of the product.  I recommend going to http://support.softwarefx.com/ProductBase.aspx?Product=GridFX10 and updating to the latest service pack.  Once your dlls are updated, try creating a user control and dragging a Grid onto it.  Let me know how it goes.

     Thanks for using Grid FX!

    Stephen Potter
    Developer, Grid FX
  • 04-10-2008 10:04 AM In reply to

    Re: Installation - Error Creating Control - Unable to cast object of type System.Web.UI.UserControl

    I downloaded and installed a new grid version.

    When I put a grid on a web form or user control I get the error:

    Error Creating Control - Grid1
    Failed to create designer 'GridFX.WebForms.Grid, GridFX.WebForms, Version=1.0.2986.27353, Culture-neutral, PublicKeyToken=a1878e2052c08dce

  • 04-10-2008 10:18 AM In reply to

    Re: Installation - Error Creating Control - Unable to cast object of type System.Web.UI.UserControl

    1. I downloaded and installed a new grid version.

    When I put a grid on a web form or user control I get the error:

    Error Creating Control - Grid1
    Failed to create designer 'GridFX.WebForms.Grid, GridFX.WebForms, Version=1.0.2986.27353, Culture-neutral, PublicKeyToken=a1878e2052c08dce

    2. I ran anyway with this grid definition:

    <GridFX:Grid ID="Grid1" runat="server" Width="550" DataSourceInCode="True" OnDataSourceSelecting="Grid1_DataSourceSelecting">
              <DataFields>
               <GridFX:TextField DataPath="MPL_UserID" Title="User">
               </GridFX:TextField>
               <GridFX:NumberField DataPath="QtyPickedPerSecond">
               </GridFX:NumberField>
               <GridFX:DateTimeField DataPath="StartDate">
               </GridFX:DateTimeField>
              </DataFields>
    </GridFX:Grid>

    and this code:

     protected void Grid1_DataSourceSelecting(object sender, GridFX.WebForms.DataSourceSelectingEventArgs e)
            {
                DateTime QtyPickedPerSec_FromDate = DateTime.Parse("3/19/2008");
                DateTime QtyPickedPerSec_ToDate = DateTime.Parse("4/19/2008");
                String SelectedUserid = "Bate";
                Grid1.DataSource = FastFetchMgr.Library.Manager.MgtPickLineManager.GetQtyPickedPerSecondByDateList(SelectedUserid, UserContext.Session.Warehouse_ID, QtyPickedPerSec_FromDate, QtyPickedPerSec_ToDate);
                Grid1.DataBind();
            }

    But got this run time error:

    Type must be one of the .NET numeric types.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: Type must be one of the .NET numeric types.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:


    [ArgumentException: Type must be one of the .NET numeric types.]
       GridFX.WebForms.Number.a(Type A_0) +117
       GridFX.WebForms.NumberField.m() +35
       GridFX.WebForms.NumberFormatter.o() +64
       GridFX.WebForms.NumberFormatter.e() +47
       GridFX.WebForms.NumberFormatter.get_Decimals() +25
       GridFX.WebForms.NumberFormatter.m() +43
       GridFX.WebForms.NumberFormatter.a(Object A_0, IFieldControl A_1) +253
       GridFX.WebForms.DataField.a(Object A_0, IFieldControl A_1) +164
       GridFX.WebForms.DataField.b(Object A_0, IFieldControl A_1) +155
       GridFX.WebForms.DataField.e(IFieldControl A_0) +60
       df.a() +62
       l5.w() +45
       GridFX.WebForms.OutputCell.e() +48
       GridFX.WebForms.OutputCell.get_Text() +25
       l5.j() +25
       lr.a(HtmlTextWriter A_0) +47
       df.a(HtmlTextWriter A_0) +477
       l5.a(HtmlTextWriter A_0) +163
       GridFX.WebForms.OutputCell.i(HtmlTextWriter A_0) +43
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       GridFX.WebForms.OutputCell.RenderControl(HtmlTextWriter writer) +36
       GridFX.WebForms.Grid.a(HtmlTextWriter A_0) +402
       GridFX.WebForms.Grid.h(HtmlTextWriter A_0) +1274
       GridFX.WebForms.Grid.g(HtmlTextWriter A_0) +972
       GridFX.WebForms.Grid.f(HtmlTextWriter A_0) +3142
       GridFX.WebForms.Grid.c(HtmlTextWriter A_0) +98
       GridFX.WebForms.Grid.j(HtmlTextWriter A_0) +353
       GridFX.WebForms.Grid.k(HtmlTextWriter A_0) +480
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       GridFX.WebForms.Grid.RenderControl(HtmlTextWriter writer) +36
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.Control.Render(HtmlTextWriter writer) +7
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +7
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.Control.Render(HtmlTextWriter writer) +7
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +7
       Telerik.WebControls.RadPane.RenderContents(HtmlTextWriter writer) +439
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       Telerik.WebControls.RadSplitter.RenderContents(HtmlTextWriter writer) +287
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +59
       System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +68
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +37
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.Control.Render(HtmlTextWriter writer) +7
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.Page.Render(HtmlTextWriter writer) +26
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       Telerik.WebControls.RadAjaxManager.AJAX_Page_Render(HtmlTextWriter output, Control container) +171
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +98
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.Page.Render(HtmlTextWriter writer) +26
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2558

  • 04-10-2008 12:17 PM In reply to

    Re: Installation - Error Creating Control - Unable to cast object of type System.Web.UI.UserControl

    Okay, your installation problems are still baffling.  I think I need to follow up with you in person.  Also, your issue with NumberFields is strange.  The Numberfield can bind to any numeric type, int, double, long, etc.  Are all the DataPaths for the Grid's NumberFields pointing to actual number values in the data source?

     

    Also, your code in the DataSourceSelecting event is wrong.  Could you change it to

    protected void Grid1_DataSourceSelecting(object sender, GridFX.WebForms.DataSourceSelectingEventArgs e)
            {
                DateTime QtyPickedPerSec_FromDate = DateTime.Parse("3/19/2008");
                DateTime QtyPickedPerSec_ToDate = DateTime.Parse("4/19/2008");
                String SelectedUserid = "Bate";
                e.DataSource = FastFetchMgr.Library.Manager.MgtPickLineManager.GetQtyPickedPerSecondByDateList(SelectedUserid, UserContext.Session.Warehouse_ID, QtyPickedPerSec_FromDate, QtyPickedPerSec_ToDate);
            }

     You don't need the grid.DataSource set and DataBind call.  That could possible be a source of trouble.

     Could you please email me directly at stephenp at softwarefx.com with a number I could contact you at?  It would be much easier for us to figure this stuff out in person.

    Stephen Potter
    Developer, Grid FX
  • 04-15-2008 3:51 PM In reply to

    Re: Installation - Error Creating Control - Unable to cast object of type System.Web.UI.UserControl

    I use Visual Studio 2008.  I am a new user of GridFX.  This grid is not yet very useful to me because the same type problems reported earlier continue.

    Almost every time I use the designer to put a grid on a user control or a web form I get an error message:

    "Error Creating Control - Unable to cast object of type 'GridFX.WebForms.Grid' to type 'GridFX.WebForms.Grid'

    On the same page or user control I can put html code in the source view and then I see a grid with no errors in design view.
    However when I try to use the smart tag in the designer to modify grid properties, as soon as I change a property I always get a "DataFields" error and then the grid will not respond any more in design view.

     

  • 04-16-2008 9:51 AM In reply to

    • PDyer
    • Top 25 Contributor
    • Joined on 02-22-2007

    Re: Installation - Error Creating Control - Unable to cast object of type System.Web.UI.UserControl

    Due to the nature of your inquire, our technical support would like to perform test with your configuration.
    Please send us an email to Support@Softwarecom, you should include your serial number so we could properly document your .

    Best regards
    _________
    PDyer / SFX
Page 1 of 1 (9 items)
Copyright 2008 Software FX, Inc.