Low Performance : EnableRowVirtualization property of RadGrid

6 posts, 0 answers
  1. Arminder
    Arminder avatar
    6 posts
    Member since:
    Aug 2012

    Posted 27 Mar 2012 Link to this post

    Hello,

    I am using radgrid for my application and it was working fine earlier after that perofrmance was slow. I tried to find that why it is talking long time now even it was working fine earlier. after that i studied from :http://www.telerik.com/help/silverlight/radgridview-performance-tips-tricks.html and found that EnableRowVirtualization="False" is main reason for low performance of application. If we remove this attribute from Telerik Grid control tag, application is working fine.

    But problem is i have to use EnableRowVirtualization property as it is otherwise i will not be able to get all rows in IList<GridViewRow> gridViewRows = telgridview.ChildrenOfType<GridViewRow>(); line.

    Please suggest me how i should proceed to resolver performance issue.

    Thanks
    Arminder Singh


  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 27 Mar 2012 Link to this post

    Hello,

     Working directly with UI elements is not recommended in both WPF and Silverlight - you should avoid it at all costs! If you want better performance for your application you should use MVVM and virtualization. 

    Greetings,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Arminder
    Arminder avatar
    6 posts
    Member since:
    Aug 2012

    Posted 27 Mar 2012 Link to this post

    thanks Vlad,

    I am using MVVM but my requirement is as that i have to verify all information assigned to telerik grid on button click and if there is any invalid information i have to show a red mark for it.

    Please suggest me how i can achieve it.

    Thanks
    Arminder
  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 27 Mar 2012 Link to this post

    Hello,

     If you are using MVVM why you work with UI elements - group rows in this case? You should work directly with your model - not with the grid. 

    Regards,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  5. Arminder
    Arminder avatar
    6 posts
    Member since:
    Aug 2012

    Posted 27 Mar 2012 Link to this post

    again thanks Vlad,

    Let me explain you a scenario.
    1. Suppose we have a silverlight page(It is view if we talk about MVVM) on which we have a telerik grid and two button applied.1 button is to add new record in gird and second is Save information in database through viewmodel and model.
    2.On button click we have to add new row in grid. and we have added 4-5 rows in grid.(Button is applied on view and add new functionality is in ViewModel. it is adding new row in collection which is binding to grid in view)
    3.  next is we clicked on Save button (Button is on view). On save button there are two tasks one is to validate all information(Validation functionality is also available in View) and if there is invalid information then show red mark against that row in grid and set focus on cell for that row where information is invalid. Otherwise pass request to viewmodel for save and so on.

    Please let me know where i am wrong.

    Thanks
    Arminder
  6. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 29 Mar 2012 Link to this post

    Hi Arminder,

    I would kindly offer you to use the standard approach to validation  demonstrated in this online example rather than traversing the visual tree and manipulating the rows.

    Kind regards,
    Pavel Pavlov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top