Number of Columns are more than 10

Apr 24, 2014 at 4:14 PM
![Image](Hi,
I'm displaying the data from the database. Database has more than 10 columns its like about 50 columns are there. My question is, the size of the grid(table) is more than the size of the container in page. this is giving me many difficulties like if there if date column with filter at the end of the grid . when i click on the filter icon the dropdown menu of the filter is getting displayed in the container to see this dropdown menu of the filter i have to scroll to complete left. Is there any way that i can try to fit the table (grid) with in the container(say page). i want to display the table (grid) with in the container. it should exceed a page. container should have scroll button but not the page .
I guess this made sense. please try to help me.)
Coordinator
Apr 26, 2014 at 6:49 AM
Hi,

This issue was fixed, Try to update grid package to http://www.nuget.org/packages/Grid.Mvc/3.1.0-ci1028
Apr 30, 2014 at 3:18 AM
Thank You . :)
Jun 25, 2014 at 9:28 AM
Hi its still not working on me I only have 4 columns but it wont fit on my webpage. Please help me sir @Bukharin. Please reply immediately. Thank you so much!
Here is a link to a snapshot of my silly work:
http://animobile.info/upload/1/hello101.JPG
http://animobile.info/upload/1/hello101.JPG
http://animobile.info/upload/1/hello101.JPG
Coordinator
Jun 25, 2014 at 9:33 AM
Hi,

It's not a grid.mvc problem. You have a too long word and you need to cut them at server side (for example first/last N symbols)

CSS hack:
td.grid-cell {
       word-break: break-all;
}
Jun 25, 2014 at 9:36 AM
Edited Jun 25, 2014 at 9:37 AM
@Html.Grid(Model).Columns(columns =>
{
columns.Add(mvcDB => mvcDB.Backup_Location)
        .Titled("Backup_Location")
        .SetWidth(1);

columns.Add(mvcDB => mvcDB.Backup_taken, "Backup_taken")
        .Titled("Backup_taken")
       /* .SortInitialDirection(GridSortDirection.Descending)*/
        .Format("{0:MM/dd/yyyy}")
        .SetWidth(40);

columns.Add(mvcDB => mvcDB.Restore_Database_Name)
        .Titled("Restore_Database_Name")
        .ThenSortByDescending(mvcDB => mvcDB.Date_Restored);


columns.Add(mvcDB => mvcDB.Date_Restored);  
}).WithPaging(5)



Here is my current code where can i insert that here? I'm so sorry Im only new with ASP MVC Sir @Bukharin
Coordinator
Jun 25, 2014 at 9:38 AM
You need to register this style in your CSS files, referenced on page with the grid