We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Issue related to Grid height and width

hello,
i have use syncfusion grid in razor view, but when page(partial view in that i have written the grid code) is render first time at that time height and width property is not set to the grid.when i have navigate to another record by using .EnablePaging() property at that time page is Render ones again at that time it set height and width property to grid.
i have also attach a sample application.please go through it.(click "Grid Demo" link for grid sample)



SheduleDemo_98e6bc01.rar

1 Reply

ES Eswari S Syncfusion Team September 15, 2011 09:53 AM UTC

Hi Shivkumar,

Thank you for your interest in Syncfusion products.

Step #1 : We suspect that the cause of the issue would be the incorrect scripts rendering in _Layout.cshtml . Please refer to the following code snippets:

[_Layout.cshtml]



. . .
. . .
// jquery scripts should be rendered before all scripts. since the controls css and properties are from jquery scripts





Step #2: In order to work with paging actions, create a post method for action and bind the data source to grid as given in the below code.

[Controller]

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Grid(PagingParams args)
{
List lst = new List();
lst.Add(new CustomerClass("Name1", "Address1"));
lst.Add(new CustomerClass("Name1", "Address1"));
. . .

IEnumerable data = lst;
return data.GridActions();

}

Step #3 : Instead of adding reference to each view page,it is enough to add the reference in Views web.config file.Please refer to the following code snippets:

[ Views\web.config ]





. . .
. . .








For your convenience, we have modified your sample and the same can be downloaded from the following link :

SheduleDemo-1562384778.zip


Also, we would request you to check the following online UG link :

http://help.syncfusion.com/ug_93/User%20Interface/ASP.NET%20MVC/Grid/default.htm?turl=Documents%2Fthroughgridbuilder7.htm

Please try this and let us know if you need any further assistance.

Regards,
Eswari.S





Loader.
Live Chat Icon For mobile
Up arrow icon