My scollbar appears after the grid is loaded. I add my columns on code behind. When the page is loaded, the grid first display in full size, then it's rezised to 150px height with scollbar. Do anyone now how i can fix this?
Here is my code:
<telerik:RadGrid ID="gridLog" Skin="Outlook" EnableEmbeddedSkins="false" Height="150px" AllowSorting="true" AutoGenerateColumns="false" ImagesPath="Css\Grid" runat="server">
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" />
</ClientSettings>
</telerik:RadGrid>
Private Sub BuildLogGrid()
Dim oDataCol As GridBoundColumn
oDataCol = New GridBoundColumn
gridLog.Columns.Add(oDataCol)
oDataCol.DataField = "logId"
oDataCol.HeaderText = "Tidspunkt"
oDataCol = New GridBoundColumn
gridLog.Columns.Add(oDataCol)
oDataCol.DataField = "logName"
oDataCol.HeaderText = "Name"
oDataCol.HeaderStyle.Width = "750"
oDataCol.ItemStyle.Width = "750"
'set the keys for the datagrid
Dim keys() As String = {"logId"}
gridLog.MasterTableView.ClientDataKeyNames = keys
gridLog.MasterTableView.NoMasterRecordsText = ""
End Sub
Here is my code:
<telerik:RadGrid ID="gridLog" Skin="Outlook" EnableEmbeddedSkins="false" Height="150px" AllowSorting="true" AutoGenerateColumns="false" ImagesPath="Css\Grid" runat="server">
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" />
</ClientSettings>
</telerik:RadGrid>
Private Sub BuildLogGrid()
Dim oDataCol As GridBoundColumn
oDataCol = New GridBoundColumn
gridLog.Columns.Add(oDataCol)
oDataCol.DataField = "logId"
oDataCol.HeaderText = "Tidspunkt"
oDataCol = New GridBoundColumn
gridLog.Columns.Add(oDataCol)
oDataCol.DataField = "logName"
oDataCol.HeaderText = "Name"
oDataCol.HeaderStyle.Width = "750"
oDataCol.ItemStyle.Width = "750"
'set the keys for the datagrid
Dim keys() As String = {"logId"}
gridLog.MasterTableView.ClientDataKeyNames = keys
gridLog.MasterTableView.NoMasterRecordsText = ""
End Sub