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

RadGrid problems, if not visible on initial load

2 Answers 257 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 29 Dec 2010, 06:18 PM
I have a page with an UpdatePanel containing a couple of dropdowns, a retrieve button, and a RadGrid. The idea is that the user would select a set of data using the dropdowns, and click the retrieve button.  This would then populate the grid, and the user would then be able to add/edit/delete the displayed data.

Simple enough, but there was a problem.  The user could click on the "Add New Record" button at the top of the grid, which would display the the insert record control, when the selection criteria in the dropdowns had not been set.  Clicking its "Inert" button would generate errors, because there were no selected values in the dropdowns.

My fast fix was to set "theGrid.Visible = False", and to make the grid visible only after the partial postback on the retrieve button.  With this change, the insert record worked, but the edit existing record did not.  When I clicked on the button in the GridEditCommandColumn, the little busy spinner spun, but the edit control was never displayed.  It looks as if the grid isn't being properly initialized, if it's not visible on initial page load.

In any case, changing it to "theGrid.Enabled = False" made everything work fine.

2 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 03 Jan 2011, 02:49 PM
Hi Jeff,

Could you please try set RadGrid.Display = "None" instead of using "Visible" property. Test this approach and let me know if this makes any difference.


Kind regards,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Jeff
Top achievements
Rank 1
answered on 03 Jan 2011, 08:02 PM
RadGrid doesn't have a Display property or method.

I tried 
RadGrid.Style["display"] = "none"
and
RadGrid.Style["display"] = "block"
and that seems to work OK.
Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Jeff
Top achievements
Rank 1
Share this question
or