Hi Team,
Please find the attached image below.
I am using radgrid to show data from database.I only need show scrolling when the height exceeds 300px when data available.
But the grid maintains the same height 300px even when no data available or with empty space when less data available.
(I dont want to show empty space when no enough data available for Grid)
I used the below code in HTML.
<telerik:RadGrid ID="RadGridWebsiteVisit" runat="server" GridLines="None" AutoGenerateColumns="False"
Width="450px" Skin="Black" OnNeedDataSource="RadGridWebsiteVisit_NeedDataSource"
AllowSorting="True">
<%--<PagerStyle Mode="NumericPages"></PagerStyle>--%>
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="300px" />
</ClientSettings>
<MasterTableView DataKeyNames="Rank">
<RowIndicatorColumn Visible="false">
</RowIndicatorColumn>
<Columns>
<telerik:GridBoundColumn DataField="Rank" UniqueName="Rank" HeaderText="Rank" HeaderStyle-HorizontalAlign="Left"
ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="80px" ItemStyle-Width="80px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BaseURL" HeaderText="Website" ReadOnly="True" ItemStyle-Wrap="true"
UniqueName="BaseURL" HeaderStyle-Width="250px" ItemStyle-Width="300px" HeaderStyle-HorizontalAlign="Left"
ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="UrlCount" HeaderText="Visits" ReadOnly="True"
UniqueName="UrlCount" HeaderStyle-Width="50px" ItemStyle-Width="100px" HeaderStyle-HorizontalAlign="Left"
ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
Please help to solve this urgently.
Thanks,
Dhamodharan.
Please find the attached image below.
I am using radgrid to show data from database.I only need show scrolling when the height exceeds 300px when data available.
But the grid maintains the same height 300px even when no data available or with empty space when less data available.
(I dont want to show empty space when no enough data available for Grid)
I used the below code in HTML.
<telerik:RadGrid ID="RadGridWebsiteVisit" runat="server" GridLines="None" AutoGenerateColumns="False"
Width="450px" Skin="Black" OnNeedDataSource="RadGridWebsiteVisit_NeedDataSource"
AllowSorting="True">
<%--<PagerStyle Mode="NumericPages"></PagerStyle>--%>
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="300px" />
</ClientSettings>
<MasterTableView DataKeyNames="Rank">
<RowIndicatorColumn Visible="false">
</RowIndicatorColumn>
<Columns>
<telerik:GridBoundColumn DataField="Rank" UniqueName="Rank" HeaderText="Rank" HeaderStyle-HorizontalAlign="Left"
ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="80px" ItemStyle-Width="80px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BaseURL" HeaderText="Website" ReadOnly="True" ItemStyle-Wrap="true"
UniqueName="BaseURL" HeaderStyle-Width="250px" ItemStyle-Width="300px" HeaderStyle-HorizontalAlign="Left"
ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="UrlCount" HeaderText="Visits" ReadOnly="True"
UniqueName="UrlCount" HeaderStyle-Width="50px" ItemStyle-Width="100px" HeaderStyle-HorizontalAlign="Left"
ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
Please help to solve this urgently.
Thanks,
Dhamodharan.