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

How to tell # records in datasource

Thread ID:

Created:

Updated:

Platform:

Replies:

11269 Mar 1,2004 05:11 PM UTC Mar 2,2004 04:21 PM UTC WinForms 8
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 1, 2004 05:11 PM UTC

Hi, I am applying a row filter to a child grid based on the contents of the parent grid. How can I check to see if records exist in the child grid before displaying it? Can I open a dataview using the filter as criteria and check the recordcount? An example would be very helpful. Thanks

Administrator [Syncfusion]
Replied On March 1, 2004 06:06 PM UTC

If you have set the rowfilter on your dataview with code like: this.dataView1.RowFilter = "????something"; then this.dataView1.Count will give you the visible record count in the dataview.

Administrator [Syncfusion]
Replied On March 1, 2004 11:44 PM UTC

Hi, The reason I''m asking is that I get an error when trying to drop down a child grid that has no records, but is supposed to allow new records to be added. The error I get is ''there is no row at position 1". It seems that when I add a new record to the child grid where other records already exist and then got to a different record in the parent and again drop down the child grid where there are no records it gives me this error. I''ve attached the code if you wouldn''t mind taking a look. To reproduce: 1. open file called test_ice2.xml 2. click on first child grid in first parent record 3. add a new record to this grid but do not click out of the new record so the pencil icon remains on this new record 4. click on the first child grid in the last parent record. You should get the error ''there is now row at positon ..." Can you tell me how to solve this bug? >If you have set the rowfilter on your dataview with code like: > >this.dataView1.RowFilter = "????something"; > > >then this.dataView1.Count will give you the visible record count in the dataview. Test21704_2212.zip

Administrator [Syncfusion]
Replied On March 1, 2004 11:48 PM UTC

Here is an attached file with the file to open testfile_4364.zip

Administrator [Syncfusion]
Replied On March 2, 2004 12:19 AM UTC

Hi Clay, I think I have this fixed, but I have a more serious problem. Sometimes when I click on the first child grid and it contains no records the grid opens as a transparent box - ui corruption. I cannot figure out why this would happen. I''ve already submitted a direct trac incident with no luck. I really need to get this resovled. I have attached a screen shot of what I''m talking about. It is not easily reproduced. >Here is an attached file with the file to open > >testfile_4364.zip > > screenshot_3714.zip

Administrator [Syncfusion]
Replied On March 2, 2004 06:14 AM UTC

I am not sure what your picture should look like..... Is the problem that you would expect to see no dropdown at all if the child grid is empty? If so, have you tried setting e.Cancel = true in CurrentCellShowingDropDown if the datasource for the grid being dropped is empty? Check the output window to see if any exceptions are being thrown. You also might want to set the debugger to stop on on any exception to try to get a callstack if one is being thrown.

Administrator [Syncfusion]
Replied On March 2, 2004 11:03 AM UTC

Hi Clay, No, the problem is that the grid drops down and is transparent - you can see the records in the grid behind the child grid and no new record is displayed. I''ve again attached the screenshot so you can see this. The outline of the dropped down grid shows but the rest is see-through. Then when I click on the transparent portion the record shows up and the grid is opaque as it should be. I need the grid to drop down and display the new record. I''ve checked for exceptions and I''m not getting any. I''ve been trying to figure out the problem for several days now and I''m stuck. I really need help with this - could it be a bug in this version of the grid? Thanks, CB >I am not sure what your picture should look like..... > >Is the problem that you would expect to see no dropdown at all if the child grid is empty? If so, have you tried setting e.Cancel = true in CurrentCellShowingDropDown if the datasource for the grid being dropped is empty? > >Check the output window to see if any exceptions are being thrown. You also might want to set the debugger to stop on on any exception to try to get a callstack if one is being thrown. >

Administrator [Syncfusion]
Replied On March 2, 2004 11:10 AM UTC

Here is the screenshot. IF you look closely you will see the child grid on the third parent record is dropped down and you can see the horizontal scroll bar at the bottom. But the rest is transparent and you can see the parent records that would be behind the drop down. It should look normal - opaque and show one new record. When I click on the transparent portion the grid then appears normally with the new record. screenshot2_7472.zip

Administrator [Syncfusion]
Replied On March 2, 2004 04:21 PM UTC

Jay has been working on this problem for you in Direct Trac. I think he posted a suggestion that handled the problem for him in your sample code that he has.

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

;