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

RadGrid Doesn't Render On Expand

2 Answers 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pete
Top achievements
Rank 1
Pete asked on 24 Nov 2011, 05:28 PM
Hey,

Working on dynamically creating and filling RadGrids in the code rather than in the front-end for an ASP project using a VB backend. Got some really useful advice so far, but today I was trying to get a CommandItemTemplate working on a detail table, and I've encountered a rather large problem... whenever I click to expand the grid the whole grid just doesn't render. All I get is a thin line instead of the grid. It renders fine when I first load it, it renders fine when I try to add a new record, but on ExpandCollapse it just seemingly disappears.

I'm assuming that something is preventing the data from binding, or the radgrid from rendering, but I have no idea what it is. I had the same problem earlier on InitInsert and the way I got around it was to simply run the code to render the grid again from the beginning, and then it appeared with the ability to insert a new record. If I do the same thing with this however it appears again in it's non-expanded state.

Any help would be appreciated.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 25 Nov 2011, 05:47 AM
Hello Pete,

This is a data binding issue. Make sure that you are binding the RadGrid with advanced data binding using its NeedDataSource event. Check the following demo which explains the same.
Grid / Programmatic Binding

-Shinu.
0
Pete
Top achievements
Rank 1
answered on 28 Nov 2011, 11:33 AM
Fantastic! Thanks Shinu, that demo was exactly what I needed. Even though it doesn't seem to work now it did on Friday when I updated my code and now the grid doesn't keep disappearing when I click buttons, which is fantastic. Now I just have one more query remaining, which I figured I'd post as a separate topic.

Thanks again,
Tags
Grid
Asked by
Pete
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Pete
Top achievements
Rank 1
Share this question
or