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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filterbar shows 1 row instead of 2

Thread ID:

Created:

Updated:

Platform:

Replies:

20756 Oct 25,2004 11:38 AM UTC Oct 26,2004 03:58 PM UTC WinForms 11
loading
Tags: GridControl
Jose Luis Melo
Asked On October 25, 2004 11:38 AM UTC

Hi, I have a databoundgrid with a filterbar. After selecting a datatable to the grid, I scroll down and select a value from the filterbar (this value is only in the next two rows after the filterbar), and the grid is filtered. The problem is that there are two rows with the value I selected in the filterbar and only one row appears in the grid !! The Vscrool bar still visible but not enabled. And when I scrollup or down the following exception happens, and the Vscrollbar disappears: System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Windows.Forms.ScrollBarWrapper.SendScrollMessage(ScrollEventType et) catched at Syncfusion.Windows.Forms.ScrollBarWrapper.SendScrollMessage(ScrollEventType et) in :line 0 System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Windows.Forms.ScrollBarWrapper.SendScrollMessage(ScrollEventType et) catched at Syncfusion.Windows.Forms.ScrollBarWrapper.SendScrollMessage(ScrollEventType et) in :line 0 Can you think of anything why this happens ? and what is this exception about and where can I catch it ? Thanks, Jose Melo

Jose Luis Melo
Replied On October 25, 2004 11:41 AM UTC

>The Vscrool bar still visible but not enabled. >And when I scrollup or down the following exception happens, and the Vscrollbar disappears: ... > and the two rows appear, but only after the scrolling and exception.

Administrator [Syncfusion]
Replied On October 25, 2004 12:18 PM UTC

I suspect the row not showing is due to the exception. Can you see this problem in our grid\samples\databound\FilterBar sample? If so, what steps do you do to get the exception? If you do not scroll down to the bottom, does the problem occur? Can you post a sample showing this problem?

Jose Luis Melo
Replied On October 25, 2004 12:31 PM UTC

>Can you see this problem in our grid\samples\databound\FilterBar sample? If so, what steps do you do to get the exception? No, in your bar this problem doesn''t happen. > >If you do not scroll down to the bottom, does the problem occur? If I don''t scroll: the problem doesnt happen If I scroll just a little or until the end of the table: the problem happen > >Can you post a sample showing this problem? I''m trying to make a sample so you can see it... What email do I sent the sample to? Thanks, Jose Melo

Administrator [Syncfusion]
Replied On October 25, 2004 02:59 PM UTC

You can attach it directly to this thread by clicking the disk icon. Or, if you do not want to attach it here, you can create a Direct Trac support incident and attach it there. Since the problem does not happen when you don''t scroll, you might try resetting the TopRowIndex and the grid.Binder.CurrentPosition before the Filter takes effect to see if this will avoid this problem. Try catching the grid.CurrentCellChanging event, and if grid.CurrentCell.RowIndex = 1, then try setting grid.TowRowIndex = 2 and grid.Binder.CurrentPosition = 0 in that event.

Jose Luis Melo
Replied On October 25, 2004 03:50 PM UTC

Ok, the sample is here... i''m using grids v1.6.1.8. MGVCliente_4061.zip 1-run application 2-login form: press ok 3-main form: from the top buttons, press the last button on the right 4-openned form: select the 11 element of the left tree - "Guias de Remessa" 5-Scroll down the grid 6-Go to the "Id GT" column and filter it by "GT2002", "GT2003", ... almost every values happens, and you the filter only shows one row, when was suposed to show 2 or more rows. 7-If you scroll now up or down, the exception will happen in your output debug window in the .NET IDE. If you select the scroll to the top and filter the grid, this wont happen... All files or references you need will be in MGVCliente\MGVCliente\bin. Reseting the toprowindex and currentposition didn''t solve. Thanks.

Administrator [Syncfusion]
Replied On October 25, 2004 04:36 PM UTC

I could not run you sample far enough to see the problem. In step three, when I click that last button on the right, two first chance exceptions are thrown and are caught by your code (as not being numric). Then when I click on teh 11th item in teh list, I see an empty grid with only the filter row showing. From your instructions, I thought I should see a grid with many rows in it. Did you try your sample on a clean machine?

Jose Luis Melo
Replied On October 26, 2004 12:31 PM UTC

Here is a new one... MGVCliente_3800.zip I ran this sample in a machine with syncfusion 16.1.8 and .NET IDE, and went ok. I open the solution, update the references (in the \bin folder) SecurityGUI.dll and Seguranca.dll to the project. Then I run and all the step are ok.

Administrator [Syncfusion]
Replied On October 26, 2004 02:04 PM UTC

I can run this sample. Thanks. But I do not see the problem. Here is what I see when I filter on GT2002. When I filter on other values, it seems to work as expected as well. forum_3778.zip Are you using the prebuilt release 1.6.1.8 DLLs? That is what I am using. Have you tried rebuilding your entire project to see if that will make the problem go away? If you submit a Direct Trac support incident, I can send you the exact DLL''s that I used.

Jose Luis Melo
Replied On October 26, 2004 02:27 PM UTC

Did you do the scroll in step 5? ReOrder the grid by the Id GT column and scroll down until one row (with GT2002) disapear, and the other one (with GT2002) is in the beggining of the grid. And now filter it by the GT2002... if it doesn''t happen must be the Dlls. >Are you using the prebuilt release 1.6.1.8 DLLs? That is what I am using. Yes, I using the ones installed in \Syncfusion\Essential Suite\Assemblies\Syncfusion.Grid.dll, Shared and Tools >Have you tried rebuilding your entire project to see if that will make the problem go away? Yes, I rebuilt it several times. Even running in non debug mode the problem still happen. Even running in other machines than mine... the problem still happen. >If you submit a Direct Trac support incident, I can send you the exact DLL''s that I used. Ok... i will do that... so I can test with your dlls... Thanks again.

Administrator [Syncfusion]
Replied On October 26, 2004 02:46 PM UTC

Sorry. No I did not scroll. What is happening is that top scrollable grid row is being slipped under the filter bar itself. This does not happen in later relases as we reset the current cell now after a filter. I was able to avoid it in your code by handling the filterbar FilterChanged event and explicitly setting the top row there.

'' after creating the filter bar
 AddHandler theFilterBar.FilterBarTextChanged, AddressOf filter_Changed

''the handler
Private Sub filter_Changed(ByVal sender As Object, ByVal e As GridFilterBarTextChangedEventArgs)
            Me.gridEntidades.TopRowIndex = 1
End Sub

Jose Luis Melo
Replied On October 26, 2004 03:58 PM UTC

Ok, I think it is working just fine... Thanks a lot for your help and your time. Jose Melo

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;