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

Grid Column with dynamic controls not refreshing while scrolling

5 Answers 113 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Suganya
Top achievements
Rank 1
Suganya asked on 10 Jan 2013, 07:56 PM
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.

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 11 Jan 2013, 08:31 AM
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.

0
Suganya
Top achievements
Rank 1
answered on 16 Jan 2013, 08:36 PM
I am already using CellTemplateSelector to display the dynamic controls, but still have the issue.

Thanks,
Suganya
0
Dimitrina
Telerik team
answered on 17 Jan 2013, 08:57 AM
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.

0
Suganya
Top achievements
Rank 1
answered on 08 Feb 2013, 05:14 PM
Yes...The page has been designed as given in the article, but still doesn't work
0
Dimitrina
Telerik team
answered on 11 Feb 2013, 08:51 AM
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.

Tags
GridView
Asked by
Suganya
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Suganya
Top achievements
Rank 1
Share this question
or