I am using MVCGrid in our project. There is a requirement wherein we want to have scroll bars in the grid when the number of items exceed 4 rows. Also there should only be 4 records displayed in the grid at a time. Please let me know a simple way to implement this. If there are more than 4 rows, then only the scroll bar should appear.
Following is the grid default set. But that is not working for me.
GridDefaults gridDefAccSrvcHist = new GridDefaults()
{
Paging = false,
ItemsPerPage = 4,
Sorting = true,
NoResultsMessage = "Sorry, no results were found"
};
MVCGridDefinitionTable.Add("State",
new MVCGridBuilder(gridDefAccSrvcHist)
.AddColumns(cols =>
{
// Add your columns here
cols.Add("NEW_VALUE").WithHeaderText("New Val")
.WithValueExpression(i => i.NEW_VALUE)
.WithFiltering(true)
.WithVisibility(true);
I am using MVCGrid in our project. There is a requirement wherein we want to have scroll bars in the grid when the number of items exceed 4 rows. Also there should only be 4 records displayed in the grid at a time. Please let me know a simple way to implement this. If there are more than 4 rows, then only the scroll bar should appear.
Following is the grid default set. But that is not working for me.
GridDefaults gridDefAccSrvcHist = new GridDefaults() { Paging = false, ItemsPerPage = 4, Sorting = true, NoResultsMessage = "Sorry, no results were found" };
MVCGridDefinitionTable.Add("State", new MVCGridBuilder(gridDefAccSrvcHist)
.AddColumns(cols =>
{
// Add your columns here
cols.Add("NEW_VALUE").WithHeaderText("New Val")
.WithValueExpression(i => i.NEW_VALUE)
.WithFiltering(true)
.WithVisibility(true);
Any help will be highly appreciable.