Hi
Currently I am working on ASP.NET (.NET Framework 4.5) web application (using vb.net).We are using standard Microsoft asp.GridView control.I need to add filtering Excel stile to the grid. Latest requirements:1. Grid on the stand alone .aspx page (no master page)2. Data source for the Grid: DataTable with binding on the Server Side (code behind)3. Allow paging. 4. Allow filtering (Excel style). Some columns without filter.5. Allow sorting6. Allow scrolling 7. 2 command buttons. Button click should execute Server Side (code behind) procedure. One button opens a new window/tab. The second one opens next page in the same window.8. 2 hyperlinks. Hyperlink click should execute Server Side (code behind) procedure. One opens a new window/tab. The second one opens next page in the same window.9. Click on the row, but not on the button or hyperlink, should not execute post back or any other process.10. CSS styles
I am evaluating a WebDataGrid. Is it possible to provide working sample with required features.
Thank you,Igor
Hello,
Thank you for your post.
Here you can find all samples that you need about webDataGrid: http://www.infragistics.com/samples/aspnet/data-grid/overview. I will provide you the links that you need.
1. Data source for the Grid: DataTable with binding on the Server Side (code behind): http://www.infragistics.com/samples/aspnet/data-grid/binding-to-datatable.
2. Allow paging: http://www.infragistics.com/samples/aspnet/data-grid/paging-client-events.
3. Allow filtering (Excel style): http://www.infragistics.com/samples/aspnet/data-grid/filtering-excel-style.
4. Allow sorting: http://www.infragistics.com/samples/aspnet/data-grid/column-sorting-client-events.
5. Allow scrolling: http://www.infragistics.com/samples/aspnet/data-grid/configuring-virtual-scrolling.
6. Click on the row should not execute post back: http://www.infragistics.com/samples/aspnet/data-grid/row-selectors.
7. Css styling guide: http://www.infragistics.com/community/blogs/engineering/archive/2010/08/25/webdatagrid-css-styling-guide.aspx.
If you have further questions, please feel free to contact us.
Hi Aleksandar,
Thank you for the reply.I have following questions:Filtering: Filter Icons do not indicate if a column is filtered.Looks like you have open case:http://www.infragistics.com/community/forums/t/65667.aspxPlease let me know if this problem was resolved.
Paging: I am using: <ig:Paging PagerMode="NumericFirstLast" PageSize="20" PagerAppearance="Bottom" Enabled="true" />If grid has more pages that could fit in the footer, I don’t see << or >> and there is no way to navigate to the last page.Is there a Page Mode that make available <<,<,>,>> ?
Filtering:
It seems that this is not implemented nowhere. You can change the style for current cell in one of the events for the grid. You can see the implementation of client side filtering events here: http://www.infragistics.com/samples/aspnet/data-grid/filtering-client-events.
Paging:
You can see the implementation of this approach here: http://www.infragistics.com/samples/aspnet/data-grid/paging-custom-pager-template.
Thank you for the reply.
Since we are evaluating this grid, we need this functionality to work.Is it possible to open case with dev team and check if they have a solution or when this will be implemented?
I checked provided sample: http://www.infragistics.com/samples/aspnet/data-grid/filtering-client-events. Here is the problem: AfterFilterAppliedImageUrl is not working.I have:AfterFilterAppliedImageUrl which is set by default to igg_FilterApplied.gif and BeforeFilterAppliedImageUrl which is set by default to igg_Filter.gif
Please advice,Igor
Hello Igor,
I made an sample for you that showing how you can change the filter icon.
You can find the attachment below.
This properties(AfterFilterAppliedImageUrl, BeforeFilterAppliedImageUrl ) doesn't exist for the grid, that's why this is not working for you.
AfterFilterAppliedImageUrl
Unfortunately this example doesn’t work in my application. I do my testing in IE 11.
After I added <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
I am getting following in Immediate WindowException was thrown at line 4, column 9009 in http://code.jquery.com/jquery-1.9.1.min.js0x800a139e - JavaScript runtime error: SyntaxErrorException was thrown at line 4, column 9238 in http://code.jquery.com/jquery-1.9.1.min.js0x800a139e - JavaScript runtime error: SyntaxError
When I use filter, it takes long time to filter and now I don’t see the executing circle. Instead page looks like nothing going on the page and in a couple of seconds I am getting the result (I have a DataTable with 500 rows as a source). Icon is the same; user does not see what column was filtered. And I am getting following in the Immediate Window:Exception was thrown at line 4150, column 69 in http://localhost/ESP/ScriptResource.axd?d=e-W-7ZtXJUPg2BQFuJyg5tvnAvDkZxLHcrmEg7_StVoznSDy5Ow_cXAXG-BrSyWfm-pucCuT-2nUWbbLN3xkMKWRvrgwAkNpaIYaAk_IvyBXuCR5yNN15FTURDKi1pY0MgKdOYiRvK1TnqTom_vpc6PaZwhAZVUeDj9reo3Gkk2cmFaRLYzf7t8uEjAkkPFJ0&t=ffffffff8139d8760x800a139e - JavaScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.
Also I am getting exactly the same in Immediate Window when I use custom paging control from the sample that you recommended:http://www.infragistics.com/samples/aspnet/data-grid/paging-custom-pager-template. After one run my Immediate Window look:Auto-attach to process '[15924] w3wp.exe' on machine 'IGOR' succeeded.Exception was thrown at line 4, column 9009 in http://code.jquery.com/jquery-1.9.1.min.js0x800a139e - JavaScript runtime error: SyntaxErrorException was thrown at line 4, column 9238 in http://code.jquery.com/jquery-1.9.1.min.js0x800a139e - JavaScript runtime error: SyntaxErrorException was thrown at line 4150, column 69 in http://localhost/ESP/ScriptResource.axd?d=e-W-7ZtXJUPg2BQFuJyg5tvnAvDkZxLHcrmEg7_StVoznSDy5Ow_cXAXG-BrSyWfm-pucCuT-2nUWbbLN3xkMKWRvrgwAkNpaIYaAk_IvyBXuCR5yNN15FTURDKi1pY0MgKdOYiRvK1TnqTom_vpc6PaZwhAZVUeDj9reo3Gkk2cmFaRLYzf7t8uEjAkkPFJ0&t=ffffffff8139d8760x800a139e - JavaScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.Exception was thrown at line 4150, column 69 in http://localhost/ESP/ScriptResource.axd?d=e-W-7ZtXJUPg2BQFuJyg5tvnAvDkZxLHcrmEg7_StVoznSDy5Ow_cXAXG-BrSyWfm-pucCuT-2nUWbbLN3xkMKWRvrgwAkNpaIYaAk_IvyBXuCR5yNN15FTURDKi1pY0MgKdOYiRvK1TnqTom_vpc6PaZwhAZVUeDj9reo3Gkk2cmFaRLYzf7t8uEjAkkPFJ0&t=ffffffff8139d8760x800a139e - JavaScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.Exception was thrown at line 4150, column 69 in http://localhost/ESP/ScriptResource.axd?d=e-W-7ZtXJUPg2BQFuJyg5tvnAvDkZxLHcrmEg7_StVoznSDy5Ow_cXAXG-BrSyWfm-pucCuT-2nUWbbLN3xkMKWRvrgwAkNpaIYaAk_IvyBXuCR5yNN15FTURDKi1pY0MgKdOYiRvK1TnqTom_vpc6PaZwhAZVUeDj9reo3Gkk2cmFaRLYzf7t8uEjAkkPFJ0&t=ffffffff8139d8760x800a139e - JavaScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.
Also, when I navigate to the second page and click on the button: <ig:TemplateDataField Key="SELECT" Width="90px" CssClass="TextAlignCenter"> <ItemTemplate> <asp:Button Text="Select" ID="btnSelect" runat="server" CssClass="btnGrid" CommandName="Select" /> </ItemTemplate> </ig:TemplateDataField>
In the event ItemCommand Private Sub WDG_ItemCommand(sender As Object, e As Infragistics.Web.UI.GridControls.HandleCommandEventArgs) Handles WDG.ItemCommand If e.CommandName = "Select" Then Dim button As Button = TryCast(sender, Button) 'get the template container Dim container As TemplateContainer = TryCast(button.Parent, TemplateContainer) Dim item As GridRecordItem = TryCast(container.Item, GridRecordItem) 'get the row's data key through the grid record Dim dataKeyIndex As Integer = item.Row.DataKey(0) Dim country As String = WDG.Rows(dataKeyIndex).DataItem("Country") Response.Redirect("https://www.google.com/") End If End Sub
I am getting dataKeyIndex = 21. In this grid I have 20 rows on the page: PageSize="20"
On the line Dim country As String = WDG.Rows(dataKeyIndex).DataItem("Country")
I am getting following error:
ERROR MESSAGE: Object reference not set to an instance of an object.
ERROR STACKTRACE: at ESP.TestInfragisticsGrid.WDG_ItemCommand(Object sender, HandleCommandEventArgs e) in C:\VS2012_TFS\ESP\ESP_DEV\ESPSolution-DEV-2.0\ESP\Test\TestInfragisticsGrid.aspx.vb:line 238 at Infragistics.Web.UI.GridControls.WebDataGrid.OnItemCommand(Object sender, HandleCommandEventArgs e) at Infragistics.Web.UI.GridControls.WebDataGrid.OnBubbleEvent(Object source, EventArgs args) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at Infragistics.Web.UI.TemplateContainer.OnBubbleEvent(Object source, EventArgs args) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--------------------------------------------------------------------------------
Another question about fixing:Is it possible not to show fixing icons and always fix first column, so user can’t change fixing and first column will by always fixed?
Is it possible to provide working sample (we use vb.net) with all features that we need and custom paging control that you suggested? Please include all references in the project. (all references - copy local true)
Please advice.
Everything works great for me. The icon is removed correctly when you try to sort and I tested it with 500 rows and there was no delay's. For custom paging I was test the sample and it works correctly too.
It will be highly appreciate if you can send me an sample that reproducing this exception's that you mentioned.
Best Regards,Aleksandar KamenovEntry-level Software DeveloperInfragistics, Inc.
Hi Aleksandr,
Thank you for reply.
I created small project to reproduce the problems and copied all messages from Immediate Window to ImmediateWindowMessages.txt
I am getting '0x800a139e - JavaScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.' messages every time when sort, filter, and go to the next page.
Also, I noticed that in IE 11 grid is very slow and when filtering by date field, grid is really slow of frozen.
Please take a look at filtering icon: it’s the same after filtering.
And when navigate to the next page and click on the button I am getting the same error from the last post.
Also, please advice about my question from the last post about fixing.
Thank you,
Igor
I have investigated this issues, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behaviors in our internal tracking system with a Development ID of 227964 and 228004. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Thank you for the update.
I don’t see the "Development Issues" tab when viewing this case on the page
http://www.infragistics.com/community/forums/t/108007.aspx
Please point out how to find it.
Is it possible to speed up this case?