|
Rank: Member Groups: Member
Joined: 3/11/2009 Posts: 24
|
I want to show all empty rows on grid. Ex. If I have 3 records on the table and my grid is defined to show 10 rows, I want to show the other 7 rows empty. Also I want that the columns width change based on a percentage value. Total page width=100% -> 1st Column 10%, 2nd column 40%, 3rd Column 20%, 4th Column 30%.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, To show empty rows, you would simply add empty rows into your data source object before you hand it over to the Grid. For example, the following code will create 2 data rows and 1 empty row:
Code: C#
grid1.DataSource = new object[]{row1, row2, null};
Grid1.DataBind();
Note the thrid array element is null. That will create an empty row in the Grid. The Grid column will not take percentage width. You will need to calculate that by yourself and then give each column a pixel width. Thanks!
|
|
Rank: Member Groups: Member
Joined: 3/11/2009 Posts: 24
|
Then what is the grid.pagesize property for?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, It's the number of items (rows) displayed per page: http://doc.essentialobjects.com/library/1/eo.web.grid.pagesize.aspxThe value only has effect when there are more items than the set value. For example, if PageSize is set to 10 and you have 15 items, it will be displayed as two pages. It does not automatically fill the last page with empty rows. Thanks
|
|