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

Clientside databind/repaint does not repaint edit&delete buttons

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
staron
Top achievements
Rank 1
staron asked on 27 Jul 2009, 08:42 AM
Hi,
We are using clientside databinding to populate our grids. To avoid "flickering" on load, the grid is bound to an empty datatable on serverside page load. However; when the grid gets databound&repainted on clientside, the rows don't get edit&delete buttons. There is just an empty whitespace where the buttons should be.

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 30 Jul 2009, 07:27 AM
Hello Ronny,

RadGrid needs this empty rows that are created on server to populate them properly later when bound on client-side. There are certain columns that will be generated properly if there are no rows initially, but edit/delete will not. You can workaround this by handling client OnRowDataBound event and create the control manually for the cells.

However in order to avoid the flickering effect you can use another approach on ItemCreated server event if you hide all GridDataItems. For example:
protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)  
    {  
        if (e.Item is GridDataItem)  
        {  
            e.Item.Display = false;  
        }  
    } 


Please refer to this help article for more details:
http://www.telerik.com/help/aspnet-ajax/client-side-binding.html

Regards,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
staron
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or