This question is locked. New answers and comments are not allowed.
I am loading an editable, ajax bound grid for a collection on an object.
Initially, this collection is empty and the grid is used to populate the data.
Since the grid is ajax bound and is empty, the grid attempts to reload the grid via ajax using the ajax Select client event (or if that is not specified, the location that the grid was loaded from), but can't get relevant parameters required since they are stored in data that would exist in the grid.
To prevent this, on first load of the view containing the grid, I use the following:
I handle the behaviour to reload the grid on click of the anchor tag myself.
Is this best practice from Telerik?
Is there another recommended method for displaying an editable ajax grid for an empty collection?
Initially, this collection is empty and the grid is used to populate the data.
Since the grid is ajax bound and is empty, the grid attempts to reload the grid via ajax using the ajax Select client event (or if that is not specified, the location that the grid was loaded from), but can't get relevant parameters required since they are stored in data that would exist in the grid.
To prevent this, on first load of the view containing the grid, I use the following:
if(object.Collection.Count == 0)
{
<p>Nothing in collection.</p>
<a id="#addToCollectionId">Add to collection</a>
}
else
{
//code to display Grid
}I handle the behaviour to reload the grid on click of the anchor tag myself.
Is this best practice from Telerik?
Is there another recommended method for displaying an editable ajax grid for an empty collection?