rvillamilj Posted December 26, 2007 Report Share Posted December 26, 2007 Hi, I just downloaded and have been learning how to use the Grid FX control, so far it looks pretty good. My biggest need is grouping, and I haven't been able to get it to work, when I try to collapse or expand the group I get a popup with the message: There was a problem while processing your request. The specific error message was: Exception type: System.InvalidCastExceptionMessage: Unable to cast object of type 'GridFX.WebForms.GridItem' to type 'GridFX.WebForms.GridItemGroup'.Stack Trace: at GridFX.WebForms.CellContainerCommandArgs`1.a(Object A_0) This is my markup: <GridFX:Grid ID="selectedGrid" runat="server" Motif="xPExplorer" Palette="xPExplorer"> <DataFields> <GridFX:TextField DataPath="salutation_id" UniqueID="salID" Title="Salutation"> <Grouping Enabled="true"></Grouping> </GridFX:TextField> <GridFX:TextField DataPath="EmailAddress" Title="Email" UniqueID="email"></GridFX:TextField> </DataFields> <Border Type="none" /> <TitleBar Visible="false"></TitleBar> <ToolBar Visible="false"></ToolBar> <Grouping Enabled="True"> <RootLevel Expanded="false" Field="salID"></RootLevel> </Grouping></GridFX:Grid> I'm databinding the grid to a List<T> and when I don't do the grouping it works great. If I enable the FloatingBar I can collapse/expand the group using one of the buttons for this, but I'm looking to disable the floating bar and just use the + or - sign. Thanks! Link to comment Share on other sites More sharing options...
StephenP Posted December 30, 2007 Report Share Posted December 30, 2007 Hi, thanks so much for using Grid FX. We will work hard to ensure your experience is a great one. I could not reproduce your problem here. Could you send me the code you use for binding to the List? Link to comment Share on other sites More sharing options...
rvillamilj Posted December 31, 2007 Author Report Share Posted December 31, 2007 Hi, thanks, this is the code where I build a list and databind it to my grid. The grid I want to group is selectedGrid. I'm building a proof of concept for work, so this code is pretty basic, but it's crucial to be able to determine if we can use this functionality of the grid before we decide to purchase GridFX or Infragistics, any help is highly appreciated! protected void OnAddSelectedClick(object sender, EventArgs e) { List<ProductOffering> selected = new List<ProductOffering>(); foreach (GridViewRow row in availableGrid.Rows) { ProductOffering po = new ProductOffering(); po.SolomonGR = row.Cells[1].Text; po.OfferingName = row.Cells[3].Text; po.CRMID = Int32.Parse(row.Cells[4].Text); selected.Add(po); } selectedGrid.DataSource = selected; selectedGrid.DataBind(); } Link to comment Share on other sites More sharing options...
rvillamilj Posted December 31, 2007 Author Report Share Posted December 31, 2007 Another thing that may help you help me is that I can't modify the grid on the designer since I get this error message, I've tried removing the grid then readding it without any options and I always get: Error Creating Control - selectedGrid Exception has been thrown by the target of an invocation. I'm thinking it could be related to the assemblies registered in my aspx page, this is what gets auto added when I add a GridFX control: <%@ Register Assembly="GridFX.WebForms" Namespace="GridFX.WebForms" TagPrefix="chartfx7" %><%@ Register Assembly="GridFX.WebForms" Namespace="GridFX.WebForms" TagPrefix="GridFX" %> And these are the dlls in my Bin folder: ChartFX.Base.dll ChartFX.WebForms.Adornments.dll ChartFX.WebForms.Base.dll ChartFX.WebForms.Dhtml.dll ChartFX.WebForms.dll ChartFX.WebForms.Gauge.dll GridFX.WebForms.dll GridFX.WebForms.dll.refresh GridFX.WebForms.xml Thanks! Ricardo V. Link to comment Share on other sites More sharing options...
rvillamilj Posted January 3, 2008 Author Report Share Posted January 3, 2008 Hi, any updates? Thanks! Link to comment Share on other sites More sharing options...
AngelR Posted January 3, 2008 Report Share Posted January 3, 2008 Please contact us at support@online.softwarefx.com (remove online) and send us a screenshot showing the error. It might help us find out what is causing the problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.