Grid Column with dynamic controls not refreshing while scrolling

6 posts, 0 answers
  1. Suganya
    Suganya avatar
    3 posts
    Member since:
    Jan 2013

    Posted 10 Jan 2013 Link to this post

    Hi,
           I have issue displaying dynamic controls in rad grid view. Following is the scenario. 
    Scenario:      My grid view has four columns email, date, count and nameless column which displays the dynamic control. The user control is built based on button controls. The functionality of the user control  is to send email to the email id it is displayed against in the grid and display the result of email sending process. 
           When the grid is displayed for the first time, the user control will show the Send button with a "arrow" icon . The user can click on that and send the email  
        i) If the email sent succeeds, the icon will be changed to "Check" mark
        ii) If the email sent failed, the icon will be changed to "X" mark.

    Issue:   When there are many rows and the scroll bar appears, the dynamic controls are not displayed properly.. Once I click the "Send" button at the top of the page , it sends email and changes the icon to "Check" mark.. Now when I scroll down, I see the check mark on other rows even though I did not click the button in those rows.  Also when I scroll up and down the user control with the check mark jumps to different rows. It looks like the column with the dynamic control does not refresh properly when we scroll.

    Please let me know how to fix this issue....I have attached the screenshots of my grid.

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 11 Jan 2013 Link to this post

    Hi,

    Since the virtualization of the GridView is turned on by default, it is not recommended to work with the visual elements (i.e. GridViewCell) and their properties. When a row is out of view, it actually does not exist. Please check this help article for a reference.

    Having this in mind, I would suggest you to use a CellTemplateSelector to display the right user control.

    Kind regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Suganya
    Suganya avatar
    3 posts
    Member since:
    Jan 2013

    Posted 16 Jan 2013 Link to this post

    I am already using CellTemplateSelector to display the dynamic controls, but still have the issue.

    Thanks,
    Suganya
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 17 Jan 2013 Link to this post

    Hello,

    Do you work with the bound data item or do you work with the visual elements - i.e. GridViewCells? I would suggest you to check this help article for a reference on a properly defined CellTemplateSelector. Is yours defined similar to it?

    All the best,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Suganya
    Suganya avatar
    3 posts
    Member since:
    Jan 2013

    Posted 08 Feb 2013 Link to this post

    Yes...The page has been designed as given in the article, but still doesn't work
  6. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 11 Feb 2013 Link to this post

    Hello,

    I am sorry but I am not able to reproduce such an issue. May I ask you to isolate the problem in a sample project where we can observe the behavior? You can see a blog post on how to achieve it here.

    Regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top