Hi guys,
I'm using a grid control with scrolling en paging enabled. Everything works fine except that the grid displays a horizontal scrollbar which is not necessary. Can you tell me how to get rid of the horizontal scrollbar?
I'm using IE 6.0.
| <telerik:RadGrid ID="itemGrid" runat="server" Width="100%" Height="100%" |
| GridLines="None" AllowSorting="True" AllowPaging="True" PageSize="25" AllowMultiRowSelection="True" |
| OnNeedDataSource="itemGrid_NeedDataSource" OnSelectedIndexChanged="itemGrid_SelectedIndexChanged"> |
| <PagerStyle Mode="NextPrevAndNumeric" PagerTextFormat="Change page: {4} | Displaying page {0} of {1}, items {2} to {3} of {5}" /> |
| <MasterTableView AutoGenerateColumns="False" TableLayout="Fixed" ClientDataKeyNames="Id,Iteration" Width="100%"> |
| <Columns> |
| <telerik:GridBoundColumn UniqueName="Id" DataField="Id" Display="False" /> |
| <telerik:GridBoundColumn UniqueName="Status" DataField="Status" Display="False" /> |
| <telerik:GridBoundColumn UniqueName="LockUserId" DataField="LockUserId" Display="False" /> |
| <bisolid:ItemTypeGridColumn HeaderStyle-Width="20" ItemStyle-Width="20" /> |
| <telerik:GridBoundColumn Headertext="Name" UniqueName="Name" DataField="Name" /> |
| <telerik:GridBoundColumn Headertext="Iteration" UniqueName="Iteration" HeaderStyle-Width="70" ItemStyle-Width="70" DataField="Iteration" /> |
| <telerik:GridBoundColumn Headertext="Version" UniqueName="Version" HeaderStyle-Width="70" ItemStyle-Width="70" DataField="Version" /> |
| <telerik:GridBoundColumn Headertext="Status" UniqueName="StatusDescription" HeaderStyle-Width="70" ItemStyle-Width="70" DataField="StatusDescription" /> |
| <telerik:GridBoundColumn Headertext="Date-Time" UniqueName="Timestamp" HeaderStyle-Width="100" ItemStyle-Width="100" DataField="Timestamp" DataFormatString="{0:g}" /> |
| <telerik:GridBoundColumn Headertext="User" UniqueName="Username" HeaderStyle-Width="100" ItemStyle-Width="100" DataField="Username" /> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings EnablePostBackOnRowClick="true" ClientEvents-OnRowSelected="itemGrid_onRowSelected"> |
| <Selecting AllowRowSelect="True" /> |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" /> |
| <ClientEvents OnRowContextMenu="itemGrid_onRowContextMenu" /> |
| </ClientSettings> |
| </telerik:RadGrid> |

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:AccessDataSource ID="AccessDataSource1" DataFile="~/App_Data/Nwind.mdb"
SelectCommand="SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM Customers"runat="server"></asp:AccessDataSource>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%;height:100%;">
<tr style="height:30px;"><td style="height:30px;padding:3px;">
toolbar here
</td></tr>
<tr style="height:30px;"><td style="height:30px;">
menubar here
</td>
</tr>
<tr><td style="background-color:Aqua;">
<div style="height:100%;width:100%;overflow:hidden;background-color:#fff;">
<telerik:RadGrid Height="100%" Width="100%" ID="RadGrid1" runat="server" AllowSorting="True" GridLines="None" DataSourceID="AccessDataSource1" Skin="Vista">
<PagerStyle Mode="NumericPages" />
<MasterTableView Width="100%" />
<HeaderStyle Width="400px" />
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True"></Scrolling>
</ClientSettings>
</telerik:RadGrid>
</div>
</td></tr>
</table>
Thanks,
Tom
public
partial class sportarten : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (Master.FindControl("sportarten") != null)
{
((
HtmlAnchor)Master.FindControl("sportarten")).Attributes["class"] = "selected";
}
fillGrid();
}
}
private void fillGrid()
{
SqlDataAdapter da = null;
DataSet ds = new DataSet();
string query = "";
query =
"SELECT * FROM Sports";
try
{
da =
new SqlDataAdapter(query, ConfigurationManager.ConnectionStrings["ConnectionStringName"].ConnectionString);
DataTable dataTable = new DataTable();
da.Fill(dataTable);
dgSport.DataSource = dataTable;
}
catch (Exception ex)
{
}
finally
{
}
}
protected void dgSport_PageIndexChanged(object source, Telerik.Web.UI.GridPageChangedEventArgs e)
{
fillGrid();
}
protected void dgSport_SortCommand(object source, Telerik.Web.UI.GridSortCommandEventArgs e)
{
fillGrid();
}
protected void dgSport_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
fillGrid();
}
}
RadGrid1_ItemDataBound event for when editing the row,
I need to be able get the value of the original value of the GridBoundColumn. So, in review, when the grid loads the first time, I have a row of data with a gridbouldcolumn set to a specific data value. When clicking edit, to edit that row, I need to reference this original gridbouldcolumn value.<
telerik:RadDatePicker ID="RadDatePicker1" runat="server" SelectedDate = '<%# Eval( "EFF_FROM_DATE") %>'></telerik:RadDatePicker>