var
summaryGridView = $find('<%= RadGrid1.ClientID %>').get_masterTableView();
var
rownum = parseInt(getQuerystring("rowindex"));
summaryGridView.selectItem(rownum);
..and it works fine if the row is in pageindex 1, but If I want to dynamically select records from index 2 and above it doesn't work.
Hope I can find solution, Many Thanks!!
Regards,
Reynald.
Hello ,
I'm currently testing Telerik RadGrid control by creating a wrapper class.I’m facing an issue for auto genration of columns in RadGridView with coustom prefix tag .
Here are the steps ,what I have done for testing the control.
1.Have created wrapper of all grid related classes such as RadGrid,RadGridDesigner,20 classes under <columns> and two classes of DetailTables with Prefix "HC" .
2. Have used the <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> in page directive of aspx page.
3.Drag the HCGridView control from the ToolBox and drop inside the aspx page.
4.Below codes are auto generating when I assign the XmlDatasource to HCGridView .
<HC:HCGridView ID="HCGridView1" runat="server"
DataSourceID="XmlDataSourceCulture" GridLines="None" HelpId=""
SecurityApplied="False">
<MasterTableView AutoGenerateColumns="False"
DataSourceID="XmlDataSourceCulture" HelpId="">
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="id" HeaderText="id" SortExpression="id"
UniqueName="id">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="name" HeaderText="name"
SortExpression="name" UniqueName="name">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="value" HeaderText="value"
SortExpression="value" UniqueName="value">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
</HC:HCGridView>
Here issue is that ,it is generating the columns under <Columns></Columns> block with the tag “ telerik” instead of “HC” .
Below error is coming in case of remove <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> from page directive of aspx page.
HCGridView - HCGridView1System.Web.HttpParseException: Telerik.Web.UI.GridColumnCollection must have items of type 'Telerik.Web.UI.GridColumn'. 'telerik.web.ui.gridboundcolumn' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'. ---> System.Web.HttpParseException: Telerik.Web.UI.GridColumnCollection must have items of type 'Telerik.Web.UI.GridColumn'. 'telerik.web.ui.gridboundcolumn' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'. ---> System.Web.HttpException: Telerik.Web.UI.GridColumnCollection must have items of type 'Telerik.Web.UI.GridColumn'. 'telerik.web.ui.gridboundcolumn' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'. at System.Web.UI.CollectionBuilder.GetChildControlType(String tagName, IDictionary attribs) at System.Web.UI.ControlBuilder.CreateChildBuilder(String filter, String tagName, IDictionary attribs, TemplateParser parser, ControlBuilder parentBuilder, String id, Int32 line, VirtualPath virtualPath, Type& childType, Boolean defaultProperty) at System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.UI.DesignTimeTemplateParser.ParseControlsInternal(DesignTimeParseData data, Boolean returnFirst) at System.Web.UI.DesignTimeTemplateParser.ParseControl(DesignTimeParseData data) at System.Web.UI.Design.ControlSerializer.DeserializeControlInternal(String text, IDesignerHost host, Boolean applyTheme) at System.Web.UI.Design.ControlParser.ParseControl(IDesignerHost designerHost, String controlText, Boolean applyTheme) at System.Web.UI.Design.ControlDesigner.CreateClonedControl(IDesignerHost parseTimeDesignerHost, Boolean applyTheme) at System.Web.UI.Design.ControlDesigner.CreateViewControl() at System.Web.UI.Design.ControlDesigner.CreateViewControlInternal() at System.Web.UI.Design.ControlDesigner.get_ViewControl() at Telerik.Web.Design.RadGridDesigner.get_Grid() at Telerik.Web.Design.RadGridDesigner.GetDesignTimeHtml(DesignerRegionCollection regions) at System.Web.UI.Design.ControlDesigner.GetViewRendering(ControlDesigner designer)
How to Auto Generate Columns of all tags with “HC”
Thanks
-Satya

DLThumbnails_ItemDataBound
if
((e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem))
{
// imageRef.ImageUrl = "Handler.ashx?img_id=" + Eval("img_id") + "&" + "imagesize=F";
System.Web.UI.WebControls.
Image imageRef = (System.Web.UI.WebControls.Image)e.Item.FindControl("ImgThumbnails");
imageRef.Attributes.Add(
"onmouseover", "javascript:this.border=1;this.style.borderColor='red';");
imageRef.Attributes.Add(
"onmouseout", "javascript:this.border=0;");
}
I just don't see it in the panel bar
Hello!
We have created a simple web user control which contains a radrotator control that uses an XML file as its datasource. This works fine in IE but when we try to view the page in any other browse (Firefox, Chrome, Opera etc) the page just displays a blank section where the rotator should appear.
The user control is embedded within a page layout file using:
<%@ Register Src="/WebControls/NewsRotator.ascx" TagName="NewsRotator" TagPrefix="CCCControls" %>
<CCCControls:NewsRotator ID="NewsRotator1" runat="server"/>
The code for the user control is:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="NewsRotator.ascx.vb" Inherits="NewsRotator" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<telerik:RadRotator width="100%" Height="180px" ItemHeight="200px" PauseOnMouseOver="false" ItemWidth="100%" FrameDuration="4000" ID="Rotator1" runat="server" ScrollDirection="Up">
<ItemTemplate>
<div class="NewsRotatorContainer">
<div class="NewsRotatorHeader"><h2><%# XPath("Title") %></h2></div>
<div class="NewsRotatorImages">
<img src="<%# XPath("Image") %>" height="127" width="200" alt="" title="" style="border: 0px" />
</div>
<div class="NewsRotatorContent">
<%# XPath("Content") %>
<br /><br />
<a href="<%# XPath("URL") %>" class="orderInfo">Read more »</a>
</div>
</div>
</ItemTemplate>
</telerik:RadRotator>
With a code behind file with the following code:
Partial Class NewsRotator
Inherits System.Web.UI.UserControl
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim newsSource As New XmlDataSource()
newsSource.DataFile = "/WebControls/Rotator.xml"
If InStr(UCase(Request.Url.ToString()), "CYMRAEG") > 0 Then
newsSource.XPath = "NewsItems/Language[@name ='cymraeg']/NewsItem"
Else
newsSource.XPath = "NewsItems/Language[@name ='english']/NewsItem"
End If
Me.Rotator1.DataSource = newsSource
Me.Rotator1.DataBind()
End Sub
End Class
Any ideas why the control is displaying blank in any other browser other that IE??
Cheers!
