We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Filter Prob.

This is happening only on a particular grid.. when user click on filter it raises an exception System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Data.Index.Sort(Int32 left, Int32 right) at System.Data.Index.Sort(Int32 left, Int32 right) at System.Data.Index.Sort(Int32 left, Int32 right) at System.Data.Index.Sort(Int32 left, Int32 right) at System.Data.Index.InitRecords() at System.Data.Index..ctor(DataTable table, Int32[] indexDesc, DataViewRowState recordStates, IFilter rowFilter) at System.Data.DataTable.GetIndex(Int32[] indexDesc, DataViewRowState recordStates, IFilter rowFilter) at System.Data.DataView.UpdateIndex(Boolean force) at System.Data.DataView.SetIndex(String newSort, DataViewRowState newRowStates, DataFilter newRowFilter) at System.Data.DataView.set_Sort(String value) at Syncfusion.Windows.Forms.Grid.GridFilterBar.WireGrid(GridDataBoundGrid grid, GridStyleInfo style) at Syncfusion.Windows.Forms.Grid.GridFilterBar.WireGrid(GridDataBoundGrid grid) at JPM.EDG.TUI.UICore.Grid.ExtSyncGDBG.barEnableFilter_Click(Object sender, EventArgs e) at Syncfusion.Windows.Forms.Tools.XPMenus.BarItem.OnItemClicked(EventArgs args) at Syncfusion.Windows.Forms.Tools.XPMenus.BarItem.PerformClick() at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid.NotifyItem(BarItem item) at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid.HidePopup(PopupCloseType popupCloseType) at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid.ProcessItemClick(BarItem item) at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.ScrollControl.WmMouseUp(Message& msg) at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg) at Syncfusion.Windows.Forms.Tools.XPMenus.MenuGrid.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Regards Yogi

4 Replies

AD Administrator Syncfusion Team April 18, 2005 01:31 PM

There have been no other reports of a System.Data.Index.Sort exception in either forums or the direct trac incident database. Has the grid been initialize and had focus at the point when you click the menu item? Maybe it is some initialization that has not been fully performed at this point. If you can upload a sample showing the problem or create a direct trac incident with a sample we can try to spot the problem here.


AD Administrator Syncfusion Team April 21, 2005 09:20 AM

Clay, the problem seems to be more frequent now... my strong feeling is it is soemthing to do with data getting inserted very frequently... what i mean to say the grid displayed to user is not a static grid.. rather every 1 second a new datarow is pushed to grid... and during this time if user clicks on filter then an exception is thrown.. Regards Yogi


AD Administrator Syncfusion Team April 21, 2005 10:40 AM

I tried to set up a sample. Here it is. http://www.syncfusion.com/Support/user/uploads/GDBG_FilterBar_AutoUpDate_72ec542e.zip It adds 10 new rows a second and there is a button click that you can do add a filterbar. It worked OK for me. Could this be a threading issue? Are the rows being added from another thread? If so, make sure the CurrencyManager being used was created on teh same thread as the grid. One way to do this is to create a new DataView on the grid''s thread based on the DataTable. Then set the grid''s data source to be this dataview instead of the DataTable. Can you reproduce the problem in this above sample?


AD Administrator Syncfusion Team April 21, 2005 12:52 PM

It looks a .NET framework bug.. we hae double datatype column and for some of the rows the column value is NaN.. so if a row contains thsese values then it throws an exception... Thx for your help Regards Yogi

Loader.
Live Chat Icon For mobile
Up arrow icon