Hi,
I have a grid pagination and I am displaying 25 items per page. If the user scrolls down and moves to the next/previous page, how can I reposition the scrollbar so the first item in the table gets visible? Should the grid do this automatically?| <div style="width:100%;height:100%"> |
| <telerik:RadGrid |
| ID="RadGrid" |
| runat="server" |
| AllowPaging="true" |
| PageSize="25" |
| Width="100%" |
| Height="100%" |
| style="border:0px;outline:none" |
| > |
| <MasterTableView TableLayout="Auto" ClientDataKeyNames="Id, Icon, IsPrivate"> |
| <Columns> |
| <telerik:GridBoundColumn DataField="Icon" HeaderText="" HtmlEncode="false" HeaderStyle-Width="26px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Name" HeaderText="Food" HtmlEncode="false" HeaderStyle-Width="100%"></telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings EnableRowHoverStyle="true"> |
| <Selecting AllowRowSelect="true" /> |
| <Scrolling AllowScroll="true" UseStaticHeaders="true" /> |
| <DataBinding Location="Grid.aspx" SelectMethod="Search" FilterParameterType="String" SortParameterType="String"></DataBinding> |
| <ClientEvents OnDataBinding="RadGrid_DataBinding" OnRowClick="RadGrid_RowClick" OnRowDblClick="RadGrid_RowDblClick" OnDataBound="RadGrid_DataBound" /> |
| </ClientSettings> |
| <PagerStyle Mode="Slider" /> |
| </telerik:RadGrid> |
| </div> |
Thanks.
Hi,
I have a Repeater inside a FormView in my page.I am creating a RadComboBox control programmatically and adding it to the Repeater.
protected
void DynamicFieldsRepeater_PreRender(object sender, EventArgs e)
{
Repeater
repeater = (Repeater)sender;
RadComboBox
comboBox = new RadComboBox();
comboBox.ID =
"combo";
comboBox.DataSourceID =
"ObjectDataSource2";
comboBox.DataTextField =
"Name";
comboBox.DataValueField =
"Id";
repeater.Controls.Add(comboBox);
//DropDownList d = new DropDownList();
//d.ID = "dropdown";
//d.DataSourceID =
"ObjectDataSource2";
//d.DataTextField = "Name";
//d.DataValueField = "Id";
// repeater.Controls.Add(dropdown);
}
When I run the page I get this java script error:
'addEventListener' is null on not an object.
The thing is when I use DropDownList instead of RadComboBox,it works fine without error.
I am able to add RadDatePicker,RadTextBox,RadNumerticTextBox without the error, but not RadComboBox.
I am facing the same error when I use PlaceHolder instead of Repeater and try to add RadComboBox to to the placeholder programmatically.
Just to mention that I tried adding the controls in IntemCreated event of the repeater and the same error happend.
Thanks for your help.
Sima
Having these hidden controls at the very beginning of the page (before any other Radinput Controls), has ensured that the controls will render in all browsers I'm testing in (IE6, 7, 8, FF 2, 3, Safari4, Opera 9).
It would certainly be nice if the RadStyleManager (or whatever the magic control behind the scenes is that controls the ordering / inclusion of the controls) would put them in proper order in future versions.
| <%@ Control Language="C#" CodeFile="Menu.ascx.cs" Inherits="UserControls_Menu" %> | |
| <%@ Register Assembly="RadTabStrip.Net2" Namespace="Telerik.WebControls" TagPrefix="telerik" %> | |
| <script runat="server"> | |
| protected void rdt1_TabDataBound(Object sender, EventArgs e) | |
| { | |
| Tab Tab1 = rdt1.FindTabByValue("Home"); | |
| if (Tab1 != null) | |
| { | |
| Tab1.DataBind(); | |
| } | |
| //Tab Tab1 = rdt1.FindTabByValue("NDIRecords"); | |
| //if (Tab1 != null) | |
| //{ | |
| // Tab1.DataBind(); | |
| //} | |
| } | |
| //Pre-Select a RadTabStrip Tab | |
| public void PreSelectTab(String TabStripText) | |
| { | |
| Tab Tab1 = rdt1.FindTabByValue(TabStripText); | |
| if (Tab1 != null) Tab1.Selected = true; | |
| if (Tab1 == null) | |
| { | |
| Tab Tab2 = rdt1.FindTabByValue("Home"); | |
| if (Tab2 != null) Tab2.Selected = true; | |
| } | |
| } | |
| //Clear the selection of all RadTabStrip Items | |
| public void ClearSelection() | |
| { | |
| foreach (Tab tab in rdt1.Tabs) | |
| { | |
| tab.Selected = false; | |
| } | |
| } | |
| </script> | |
| <table width="100%" border="0" cellpadding="0" cellspacing="0"> | |
| <tr> | |
| <td valign="top" background="../RadControls/Tabstrip/Skins/NDI/img/menuBackground.gif" style="width: 67px"> | |
| <img src="../images/Misc/NDI Logo.JPG" alt="Welcome to the CDC NDI Intranet Website." style="cursor:hand; height:53px; width:84px;" | |
| visible="false" border="0" onclick="javascript:location.href='../Default.aspx'" /></td> | |
| <td valign="top" background="../RadControls/Tabstrip/Skins/NDI/img/menuBackground.gif" > | |
| <telerik:RadTabStrip ID="rdt1" runat="server" SelectedIndex="0" Skin="NDI" CausesValidation="false" AutoPostBack="true"> | |
| <Tabs> | |
| <telerik:Tab text="Home" id="Home" Value="Home" tooltip="Home Page" Navigateurl="~/Default.aspx"> | |
| </telerik:Tab > | |
| <telerik:Tab text="NDIRecords" value="NDIRecords" id="NDIrecords" tooltip="NDIRecords" | |
| NavigateUrl="~/Modules/NDIRecords.aspx"> | |
| </telerik:Tab> | |
| <telerik:Tab text="ManualSearch" value="ManualSearch" id="Manualserachrec" tooltip="ManualSearch Records" | |
| NavigateUrl="~/Modules/ManualSearchRec.aspx"> | |
| </telerik:Tab> | |
| </Tabs> | |
| </telerik:RadTabStrip> | |
| </td> | |
| </tr> | |
| </table> |