or
Hi,
I want to have grid dimensions height=100% and width=100% so that my grid fits to any container that i put.
But if i allow scrolling grid immediately collapses. I have tried "Changing grid ScrollHeight at runtime to fill its container height" in grid document also but it didnot solve my problem.
I try all possible page directives( like
<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
)
Thanks for your help
| protected void SearchGrid_ItemCreated(object sender, GridItemEventArgs e) { if (e.Item is GridPagerItem) { //These control the footer of the grid where the page change can be displayed |
| Label ChangePageSizeLabel = (Label)e.Item.FindControl("ChangePageSizeLabel"); |
| //Created a "First Page" button |
| LinkButton btnFirst = new LinkButton(); |
| btnFirst.Text = "«"; |
| btnFirst.CommandName = "Page"; |
| btnFirst.CommandArgument = "First"; |
| //Add the button to the control |
| ChangePageSizeLabel.Parent.Parent.Controls.AddAt(0, btnFirst); } } |
| // Create a list of items to filter by (for the the main search grid) |
| string strItemsToFilter = ""; |
| foreach (ITEM item in GridToDS) |
| { |
| strItemsToFilter += "([UniqueObjectID] <> '" + item.UniqueObjectID + "') AND "; |
| } |
| // Remove " AND " from the filtered items list |
| if (strItemsToFilter.Length > 0) |
| strItemsToFilter = strItemsToFilter.Substring(0, strItemsToFilter.Length - 5); |
| grdFROM.Columns.FindByUniqueName("UniqueObjectID").CurrentFilterValue = strItemsToFilter; |
| grdFROM.Rebind(); |