Page 1 of 1

?Sequential Fetch Mode? + DevExpress Grid PROBLEM.

Posted: Fri 08 May 2009 14:36
by Tatyana
Dear Devart Suppot Team, we have some problems ?Sequential Fetch Mode? used with DevExpress Grid.

We want: "When client needs to fetch more records (for example, user scrolls a grid), another request to server is performed."

We use Devart 5.0.1.0 with DevExpress Grid v8.3.

we want to use ?Sequential Fetch Mode?, so we done everything as described in documentation. We created a typed dataset and a tables in it. We set tables properties in order to use ?Sequential Fetch Mode?.
dataset1.table1.FetchAll = false;//by default
dataset1.table1.QueryRecordCount = true;
dataset1.table1.MaxRecords = 0; //by default

I do:
calling dataset1.table1.active = true;

I see:
1) dataset1.table1.RecordCount = 1383
dataset1.table1.Rows.Count = 1103
2) The sql text (SelectCommand.CommandText) of this table executed in SQLNavigator returns 1383 rows.

Question 1 : why so many records retrieved at once in the beginning? It slows down the functionality very much =(


In another example
I do:
calling dataset1.table2.active = true;
I see:
1) dataset1.table1.RecordCount = 1478
2) dataset1.table1.Rows.Count = 1478

Question 2: why all records are fetched??? All records are fetched!

I do:
calling dataset1.table1.active = true;
I?m on the first record. Grid shows the number of records 1383 (Rows.Count = 1103 RecordCount = 1383). I start scrolling through the records in the grid. When I reach record number 1280 the grid shows that the number of records is 1381 (Rows.Count = 1381 RecordCount = 1381). That? it. I see only 1381 record in the grid. But really there are 1383 records should be.

Question 3: Why it finally shows wrong number of records.

I do:
calling dataset1.table1.active = true;
I?m on the first record. Grid shows the number of records 1383 (Rows.Count = 1103 RecordCount = 1383). I open the filter (the pop up list of all values of some column). As far as I understand now all records should be fetched by the grid in order to form distinct list of values of this column. What I see after this action is Rows.Count = 1381 RecordCount = 1381. Again the same problem as in the previous example.

Question 4: Why it finally shows wrong number of records.

Is there some special things that I should check?
________
Lenders Mortgage Insurance Advice

I am also using DevExpress

Posted: Fri 08 May 2009 15:29
by degas
Tatyana

Hi, i am also using DevExpress components and i am having problems with the XtraGrid. I cannot seem to make it work with the Embbedded Navigator. The records get selected but when i press "end edit", the changes are not posted.
Could you please give me a simple example? I really need help over here.

Thanks a lot

Posted: Fri 08 May 2009 18:56
by degas
Tatyana

I have managed to update the record but i have to write an eventhandler for the EmbeddedNavigator_ButtonClick event?

Code: Select all

private void gridControl1_EmbeddedNavigator_ButtonClick(object sender, NavigatorButtonClickEventArgs e)
        {
            if(e.Button.ButtonType == NavigatorButtonType.EndEdit)odsGasoducto.Update();
        }

Do you have to do the same?
Thanks

Re: I am also using DevExpress

Posted: Tue 12 May 2009 09:26
by Tatyana
degas wrote:The records get selected but when i press "end edit", the changes are not posted.
This is correct. Help for EndEdit Button of the EmbeddedNavigator says: "... the button used to post the edited record to the associated datasource." So it posts data to the datasource (oracle table), but not to the server.
________
Mywebcamhookup

solved

Posted: Tue 12 May 2009 15:49
by degas
Thanks for answering my question.

I have managed to post the changes to the db, by setting the CacheUpdates to false. This way any change, gets posted to the underlaying database? I think this is not the default behaviour but this is the only one that worked for me.
I read the help and you are rigth, so how do you post the data to the database?
This is my first WinForms project but i have a lot of experience in ASPNet and DevArtLinq, so feel free to ask me, i will be more than happy to help you
my mail is [email protected]

Dear Devart Team

Posted: Thu 14 May 2009 08:55
by Tatyana
Sorry, what about my questions about Sequential Fetch Mode?

It is a bug?
________
CROP INSURANCE FORUM

Posted: Thu 14 May 2009 12:26
by Shalex
1. The number of rows retrieved in the beginning is defined by the control you use. If DevExpress Grid requests the 1103 record, we give this record to it with all previous records from the table.

2. This is the same issue. For example, System.Windows.Forms.DataGrid (not DataGridView) requests all records always. This behaviour is a control stuff.
Does this problem persist with the System.Windows.Forms.DataGridView control?

3. Probably, this problem is caused by the different (1383 and 1381) results obtained from the [select count(*)...] and [select * ...] commands. The first command is used to get the RecordCount value, the second is used by the reader that fetches the records from the database. Please use the OracleMonitor component to find these commands in your case (please post them). It should help to clarify the situation.