Hello,
As you'll see on the picture, there is still some room empty. I want to use that to for the grid, so I put grid.height 100%. But nevertheless there is still some room. I've put now a save button under the grid and I put in code:
grd.Behaviors.Paging.PagerAppearance = PagerAppearance.Bottom
grd.Behaviors.Paging.PageSize = 15
grd.Behaviors.Paging.Enabled =
True
So I looks more filled but it is all fixed. How can I achieve that the whole page is filled with the grid?
Kind regards,
Kris
Is your grid inside a table?
check the height grid frame and other controls.
No my grid is not in a table. I will check it.
so, your grid is not any other control [ex- panel]?
can you send me your aspx code ?
<%@ Page Language="VB" MasterPageFile="~/Master.master" AutoEventWireup="false" CodeFile="eventlist.aspx.vb" Inherits="Events_eventlist" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">
<ig:WebDocumentExporter runat="server" ID="dExporter" ExportMode="Download" />
<ig:WebExcelExporter runat="server" ID="eExporter" ExportMode="Download" />
<table width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><th class="title1" colspan="4">Event list</th></tr>
<tr>
<td class="pnladd" style="width: 100px">
<asp:Button ID="btnAdd" runat="server" CssClass="button" Text="Add" Width="100px" />
</td>
<td class="pnledit" style="width: 100px">
<asp:Button ID="btnSave" runat="server" CssClass="button" Text="Save" Width="100px" />
<td class="pnllabel" style="width: 100px">
<asp:Button ID="btnProg" runat="server" CssClass="button" Text="Programme" Width="100px" />
<td class="pnllabel" align="right">
<asp:Button ID="btnExpPDF" runat="server" CssClass="button"
Text="Export PDF" Width="100px" />
<asp:Button ID="btnExportExcel" runat="server" CssClass="button"
Text="Export Excel" Width="100px" />
</tr>
</table>
<ig:WebDataGrid ID="grd" runat="server" AutoGenerateColumns="False"
Height="100%" Width="100%" StyleSetName="Default" DataSourceID="SQLDS">
<EditorProviders>
<ig:TextEditorProvider ID="BasicTxtProv" />
<ig:DatePickerProvider ID="DateProv"></ig:DatePickerProvider>
<ig:NumericEditorProvider ID="NumProv"></ig:NumericEditorProvider>
<ig:DropDownProvider ID="RegionProv">
<EditorControl ID="EditorControl1" runat="server" DisplayMode="DropDownList"
DataSourceID="SQLDSRegions" TextField="Region" ValueField="Region" >
<DropDownItemBinding TextField="Region" ValueField="Region">
</DropDownItemBinding>
</EditorControl>
</ig:DropDownProvider>
<ig:DropDownProvider ID="NotifyProv">
<EditorControl ID="EditorControl2" runat="server" DisplayMode="DropDownList"
DataSourceID="SQLDSNotify" TextField="NotifyMail" ValueField="NotifyMail" >
<DropDownItemBinding TextField="Mail" ValueField="NotifyMailID">
<ig:DropDownProvider ID="Colors1Prov">
<EditorControl ID="EditorControl3" runat="server" DisplayMode="DropDownList"
DataSourceID="SQLDSColors" TextField="FColor" ValueField="FColor" >
<DropDownItemBinding TextField="Color" ValueField="Color">
<ig:DropDownProvider ID="Colors2Prov">
<EditorControl ID="EditorControl4" runat="server" DisplayMode="DropDownList"
DataSourceID="SQLDSColors" TextField="BColor" ValueField="BColor" >
</EditorProviders>
<Columns>
<ig:TemplateDataField Key="Tabs" Width="50px">
<Header Text="Tabs" />
<ItemTemplate>
<a href="eventtabs.aspx?eventid=<%#DataBinder.Eval(Container, "DataItem.EventID")%>">
<img src="../images/tab.png" alt="Edit Event Tabs" style="border:0"/>
</a>
</ItemTemplate>
</ig:TemplateDataField>
<ig:BoundDataField DataFieldName="EventID" Key="EventID" Hidden="True">
<Header Text="EventID" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Programme" Key="Programme" Width="200px">
<Header Text="Programme" />
<ig:BoundDataField DataFieldName="Info" Key="Info" Width="100px">
<Header Text="Info" />
<ig:BoundDataField DataFieldName="DateStart" Key="DateStart" Width="75px">
<Header Text="Start" />
<ig:BoundDataField DataFieldName="DateEnd" Key="DateEnd" Width="75px">
<Header Text="End" />
<ig:BoundDataField DataFieldName="Region" Key="Region" Width="60px">
<Header Text="Region" />
<ig:BoundDataField DataFieldName="Location" Key="Location" Width="100px">
<Header Text="Location" />
<ig:BoundCheckBoxField DataFieldName="Active" Key="Active" Width="65px">
<Header Text="Active" />
</ig:BoundCheckBoxField>
<ig:BoundDataField DataFieldName="Fee" Key="Fee" Width="50px"
DataType="System.Double">
<Header Text="Fee" />
<ig:BoundCheckBoxField DataFieldName="LaptopRequired" Key="LaptopRequired" Width="65px">
<Header Text="Laptop" />
<ig:BoundDataField DataFieldName="NotifyMail" Key="NotifyMail" Width="100px">
<Header Text="NotifyMail" />
<ig:BoundDataField DataFieldName="FColor" Key="FColor" Width="100px">
<Header Text="FColor" />
<ig:BoundDataField DataFieldName="BColor" Key="BColor" Width="100px">
<Header Text="BColor" />
</Columns>
<Behaviors>
<ig:Activation Enabled="true" />
<ig:EditingCore AutoCRUD="True">
<ig:CellEditing Enabled="true">
<ColumnSettings>
<ig:EditingColumnSetting ColumnKey="Programme" EditorID="BasicTxtProv" />
<ig:EditingColumnSetting ColumnKey="Info" EditorID="BasicTxtProv" />
<ig:EditingColumnSetting ColumnKey="DateStart" EditorID="DateProv" />
<ig:EditingColumnSetting ColumnKey="DateEnd" EditorID="DateProv" />
<ig:EditingColumnSetting ColumnKey="Region" EditorID="RegionProv" />
<ig:EditingColumnSetting ColumnKey="Location" EditorID="BasicTxtProv" />
<ig:EditingColumnSetting ColumnKey="NotifyMail" EditorID="NotifyProv" />
<ig:EditingColumnSetting ColumnKey="FColor" EditorID="Colors1Prov" />
<ig:EditingColumnSetting ColumnKey="BColor" EditorID="Colors2Prov" />
<ig:EditingColumnSetting ColumnKey="Fee" EditorID="NumProv" />
</ColumnSettings>
<EditModeActions EnableF2="true" EnableOnActive="true" MouseClick="Single"
EnableOnKeyPress="True" />
</ig:CellEditing>
<ig:RowAdding></ig:RowAdding>
</Behaviors>
</ig:EditingCore>
</ig:WebDataGrid>
<asp:SqlDataSource ID="SQLDS" runat="server"
ConnectionString="<%$ ConnectionStrings:cnevent %>"
ProviderName="<%$ ConnectionStrings:cnevent.ProviderName %>"
SelectCommand="SELECT [EventID], [Programme], [Info], [DateStart], [DateEnd], [Region], [Location], [Active], [Fee], [LaptopRequired], [NotifyMail], [FColor], [BColor] FROM [tblEvents]"
DeleteCommand="DELETE FROM [tblEvents] WHERE [EventID] = ?"
InsertCommand="INSERT INTO [tblEvents] ([EventID], [Programme], [Info], [DateStart], [DateEnd], [Region], [Location], [Active], [Fee], [LaptopRequired], [NotifyMail], [FColor], [BColor]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
UpdateCommand="UPDATE [tblEvents] SET [Programme] = ?, [Info] = ?, [DateStart] = ?, [DateEnd] = ?, [Region] = ?, [Location] = ?, [Active] = ?, [Fee] = ?, [LaptopRequired] = ?, [NotifyMail] = ?, [FColor] = ?, [BColor] = ? WHERE [EventID] = ?">
<DeleteParameters>
<asp:Parameter Name="EventID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Programme" Type="String" />
<asp:Parameter Name="Info" Type="String" />
<asp:Parameter Name="DateStart" Type="DateTime" />
<asp:Parameter Name="DateEnd" Type="DateTime" />
<asp:Parameter Name="Region" Type="String" />
<asp:Parameter Name="Location" Type="String" />
<asp:Parameter Name="Active" Type="Boolean" />
<asp:Parameter Name="Fee" Type="Decimal" />
<asp:Parameter Name="LaptopRequired" Type="Boolean" />
<asp:Parameter Name="NotifyMail" Type="Int32" />
<asp:Parameter Name="FColor" Type="String" />
<asp:Parameter Name="BColor" Type="String" />
</UpdateParameters>
<InsertParameters>
</InsertParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSRegions" runat="server"
SelectCommand="SELECT [Region] FROM [qryEventsRegions]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSNotify" runat="server"
SelectCommand="SELECT [NotifyMailID], [Mail] FROM [qryEventsNotify]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSColors" runat="server"
SelectCommand="SELECT [Color] FROM [qryColors]"></asp:SqlDataSource>
</asp:Content>
Please
check your master page. is there any fixed height is set or not?
one more thing, try increasing the pagesize from 15 to 50. then check whether it covers the whole page or not and where are you getting the scrollbar, in grid or in browser ?
There is no fixed height set.
I increased the pagesize from 15 to 50, ok but I have now 4 scrollbars: 2 in the grid and 2 in the explorer.
can you post the screen the shot?
ok. if you don't see a whitespace that means your % code has no issues,.
Just set the page size to some value so that you don't see a white space and scrollbars and your grid fits to the whole screen.
try setting your page size to 16,17,18... and check which page size suits you best.
hit and trial approch..
hope this will helps you.
-Ani
And what can I do about the scrollbars?
No, I don' get a white space.
increase your pagesize to 50.
scroll down using your browser scrollbar.
check if there is any white space below your grid...
your code files are ok. I don't see any issues related to height.
if you scroll down using browser scroll bar do u see a white space below your grid?