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

Checkbox / Filtering Performance

1 Answer 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 02 Jun 2014, 07:11 PM

Hi,

I have two questions here.

I am using a RADGRID and when ME.LOADComplete event is happening I run a procedure which will filter the RAD Grid - roughly about 200 rows by default from the SQL View, it then goes down to about 20 results. The query takes less than 0 seconds to run on SQL Management studio. It takes about 1-2 seconds to display the page and filter the view.

In a different window, I am returning a view which has about 17,000 rows in it and takes about 4 seconds to run in SQL Management Studio but then it takes about 14 seconds to display and filter the page. It takes about 8 seconds to load without being filtered. Both RADGRIDs has the data source set in the ASPX page but I was wondering is there not a more efficient way to filter it first and then if the user changes the filter, it will apply accordingly? The number of results would be about 400 or so. I was thinking I need to use OnNeedDataSource and filter directly from SQL instead of the programmatically way of
rgCompanyTickets.MasterTableView.FilterExpression = strFilter
rgCompanyTickets.Rebind()

My other issue is that, in the RADGRID I have added a new column so the user can check the box and when the user presses a button on the screen, it displays a  RadWindow which says enter comment and click a button so that it can update the db. The issue I am facing is that when the page gets loaded from the first button click is that it is removing the state the checkboxes are in. So when I press the 2nd button, it doesn't know what rows I have selected before the post back. I believe the reason why it is doing this is due to me using the rebind statement during the filter process.

Do you know guys have any solutions or ideas about this?

<telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" AllowFiltering="False" >
        <ItemTemplate>
          <asp:CheckBox ID="CheckBox1" runat="server"
          />
        </ItemTemplate>
        <HeaderTemplate>
          <asp:CheckBox ID="headerChkbox" runat="server"
      />
        </HeaderTemplate>
      </telerik:GridTemplateColumn>



Thanks,
Alex


1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Jun 2014, 05:44 AM
Hi Alex,

Thе demo linked below illustrates the optimized performance techniques incorporated in the ASP.NET 3.5 build of RadGrid. The control takes advantage of the new LINQ syntax introduced in ASP.NET 3.5 and performs aggregate calculations or executes sorting/filtering/paging operations by means of native LINQ expressions. 
http://demos.telerik.com/aspnet-ajax/grid/examples/performance/linq/defaultcs.aspx

You can also go through the articles mentioned under the Performance section here.

Then about the checkbox state it wont persist after a postback. Take a look at this article which discuss about
Persisting CheckBox control state in GridTemplateColumn on rebind

Thanks,
Princy
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or