This is a migrated thread and some comments may be shown as answers.

[Solved] Grid Paging Problem When Caching is Enabled

4 Answers 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
hedere
Top achievements
Rank 1
hedere asked on 21 Oct 2009, 02:12 PM
Hi

when you filter objects always the page count is 300 000
how can this be updated when user filters the data

4 Answers, 1 is accepted

Sort by
0
hedere
Top achievements
Rank 1
answered on 25 Oct 2009, 04:19 PM
i need a problem for this situation

can you pls help me about this
0
Yavor
Telerik team
answered on 26 Oct 2009, 09:14 AM
Hi hedere,

The number comes from the following code snippet:

void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
        {
            e.Arguments.TotalRowCount = 300000;

            if (CheckBox3.Checked)
            {
                if (Cache["MyData"] != null)
                {
                    e.Result = Cache["MyData"];
                }
            }

            retrieveWatch.Reset();
            retrieveWatch.Start();
        }

You can alter the 300000 number accordingly, to eliminate this behavior.
I hope this information helps.

Kind regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
hedere
Top achievements
Rank 1
answered on 26 Oct 2009, 09:43 PM
Yavor thanks for your reply

i tried to set the number with query.count() propery but
e.Arguments.TotalRowCount = query.count();

it always takes the count of total date returned from the linqdatasource how can i achive that the filtered data count from the radGrid?

Is there a way to take filtered data count from radGrid?


0
Yavor
Telerik team
answered on 30 Oct 2009, 07:04 AM
Hi hedere,

The other options are to either determine manually how many items are returned from the datasource, for example by re-querying the datasource with the filter expression. Or, you can set the AutoPage property for the LinqDataSource to true, so that the linq datasource can automatically determine the number of items it retrieves.
I hope this information helps.

Kind regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
hedere
Top achievements
Rank 1
Answers by
hedere
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or