or

| ... |
| <FormTemplate> |
| <asp:Label ID="Label1" runat="server" Text="TEMPLATE APPEAR HERE"></asp:Label> |
| </FormTemplate> |
| ... |
| <CommandItemTemplate> |
| <div align="left"> |
| <asp:LinkButton ID="initInsertLinkButton" runat="server" CommandName="InitInsert">Add new |
| </asp:LinkButton> |
| <asp:LinkButton ID="editSelectedLinkButton" runat="server" CommandName="EditSelected">Edit Selected |
| </asp:LinkButton> |
| <asp:LinkButton ID="copyLinkButton" runat="server" CommandName="CopyCommand"></asp:LinkButton> |
| </div> |
| </CommandItemTemplate> |
<telerik:GridTemplateColumn> <ItemTemplate> <obout:ImageZoom ID="ImageZoom_Suche" runat="server" StyleFolder="styles/simple" ImageUrl='<%# Eval("Partnumber", "~/Images/{0}.jpg") %>' BigImageUrl='<%# Eval("Partnumber", "~/Images/{0}.jpg") %>' Position="IMAGE_CENTER" ShowLoading="false" /> </ItemTemplate> <ItemStyle Width="50px" Height="50px" HorizontalAlign="Center" /> </telerik:GridTemplateColumn>
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Groups.aspx.vb" Inherits="EmployeeTaxes.Groups" MasterPageFile="~/MasterPages/Backend.Master" EnableEventValidation="false" ViewStateEncryptionMode="Never" ValidateRequest="false" MaintainScrollPositionOnPostback="true" %> <asp:Content ID="Groups" runat="server" ContentPlaceHolderID="ContentPlaceHolder1"> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function OnClientClose_EDITOR(radWindow) { window["<%= RadAjaxManager1.ClientID %>"].AjaxRequestWithTarget("<%=DataGrid.UniqueID%>", "RebindDataGrid"); } function refreshGrid(arg) { if (!arg) { $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind"); } else { $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate"); } } function RowDblClick(sender, eventArgs) { window.radopen("EditGroups.aspx?GroupID=" + eventArgs.getDataKeyValue("GroupID"), "Search"); } </script> </telerik:RadCodeBlock> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="MainDiv"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="MainDiv" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <div id="MainDiv" runat="server"> <telerik:RadMultiPage ID="RadMultiPage1" SelectedIndex="0" runat="server" Width="100%"> <telerik:RadPageView ID="PageView0" runat="server" Width="100%"> <telerik:RadWindowManager ID="TitleWindow" runat="server" Visible="true" Behavior="Move,Maximize,Close" Modal="true"> <Windows> <telerik:RadWindow Width="970" Height="550" VisibleStatusbar="false" NavigateUrl="Window.aspx" ID="Search" runat="server" VisibleOnPageLoad="false" Behavior="Move,Maximize,Close" /> </Windows> </telerik:RadWindowManager> <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Visible="true" Behavior="Maximize,Close" Modal="true"> <Windows> <telerik:RadWindow Width="400" Height="250" VisibleStatusbar="false" NavigateUrl="Window.aspx" ID="RadWindow1" runat="server" VisibleOnPageLoad="false" /> </Windows> </telerik:RadWindowManager> <telerik:RadWindowManager ID="TitleWindow1" runat="server" Visible="true" Behavior="Move,Maximize,Close" Modal="true"> <Windows> <telerik:RadWindow Width="780" Height="550" VisibleStatusbar="false" NavigateUrl="Window.aspx" ID="Search1" runat="server" VisibleOnPageLoad="false" Behavior="Move,Maximize,Close" /> </Windows> </telerik:RadWindowManager> <div align="center"> <telerik:RadGrid ID="DataGrid" runat="server" ShowStatusBar="True" AllowFilteringByColumn="True" Width="100%" AllowAutomaticUpdates="false" AllowAutomaticInserts="false" AllowAutomaticDeletes="false" AllowPaging="True" PageSize="10"> <MasterTableView Dir="RTL" AutoGenerateColumns="False" AllowSorting="true" CommandItemDisplay="Top" AllowAutomaticUpdates="false" AllowAutomaticInserts="false" AllowAutomaticDeletes="false" ClientDataKeyNames="GroupID" DataKeyNames="GroupID" EditFormSettings-EditFormType="Template"> <HeaderStyle HorizontalAlign="Center" /> <FilterItemStyle HorizontalAlign="Center" /> <NoRecordsTemplate> No Records Found. </NoRecordsTemplate> <CommandItemTemplate> <asp:ImageButton ID="btnAdd" CommandName="Insert" ImageUrl="~/images/button_Client.jpg" runat="server" CausesValidation="false" Style="cursor: hand" AlternateText=" " /> </CommandItemTemplate> <Columns> <telerik:GridButtonColumn UniqueName="Edit" CommandName="Edit" ButtonType="ImageButton" ImageUrl="~/images/icon_edit.gif" Text="" HeaderText=""> <HeaderStyle Width="35px" HorizontalAlign="center" /> </telerik:GridButtonColumn> <telerik:GridBoundColumn DataField="GroupID" Visible="false" HeaderText="GroupID" SortExpression="GroupID" UniqueName="GroupID" /> <telerik:GridBoundColumn DataField="GroupName" HeaderText=" " SortExpression="GroupName" UniqueName="GroupName" /> </Columns> <PagerStyle Mode="NextPrevNumericAndAdvanced" PageButtonCount="20" /> </MasterTableView> <ClientSettings AllowColumnsReorder="True" EnableRowHoverStyle="true"> <Selecting AllowRowSelect="true" /> <ClientEvents OnRowDblClick="RowDblClick" /> </ClientSettings> </telerik:RadGrid> </div> </telerik:RadPageView> </telerik:RadMultiPage> </div> </asp:Content>
Hi,
I couldn't find any help on this. I was wondering if there's a client-side event I can use that will change the bar's color in a Bar chart on client mouse over. Thanks.
Han
<telerik:RadListView ID="ProductListView" runat="server" AllowPaging="true" DataSourceID="ProductObjectDataSource" Skin="Sitefinity"> <AlternatingItemTemplate> <div id="prdcontainer"> <div id="prdimg"> <a href='<%# Eval("CLICK2COMPARE_URL") %>' class="pdctimg"> <telerik:RadBinaryImage ID="img" runat="server" DataValue='<%# Bind("PDCT_IMG_BIN") %>' Height="100px" Width="100px" ResizeMode="Fit" /> </a> </div> <div id="prdinfo"> <a href='<%# Eval("CLICK2COMPARE_URL") %>' class="prdname"> <asp:Label ID="name" runat="server" CssClass="prdname" Text='<%# Bind("PDCT_NAME") %>'></asp:Label></a> <br /> <asp:Label ID="prddesc" runat="server" CssClass="prddesc" Text='<%# Bind("PDCT_DESC") %>'></asp:Label> <br /> <asp:Label ID="prdmaxrank" runat="server" CssClass="prdmaxrank" Text='<%# Bind("MAX_RANK") %>'></asp:Label> <br /> <asp:Label ID="prdminprice" runat="server" CssClass="prdminprice" Text='<%# Bind("MIN_PRICE") %>'></asp:Label> </div> <div id="prdpricecontainer"> <div id="prdprice"> <asp:Label ID="prdprice" runat="server" CssClass="prdprice" Text='<%# Bind("PRICE_RANGE") %>'></asp:Label> </div> <div id="prdgo"> <asp:Label ID="lblNumPdct" runat="server" CssClass="numpdct" Text='<%# Bind("NUM_PDCT") %>'></asp:Label> <br /> <asp:Label ID="lblNumStores" runat="server" CssClass="numstores" Text='<%# Bind("NUM_STORES") %>'></asp:Label> <br /> <asp:Button ID="btnGo" runat="server" Text="Compare Prices" CommandName='<%# Bind("PDCT_ID") %>' CommandArgument='<%# Bind("CLICK2COMPARE_URL") %>' OnCommand="ProductClick" CausesValidation="False" /> </div> </div> <div id="prdoptions"> </div> </div> </AlternatingItemTemplate> <ItemTemplate> <div id="prdcontainer"> <div id="prdimg"> <a href='<%# Eval("CLICK2COMPARE_URL") %>' class="pdctimg"> <telerik:RadBinaryImage ID="img" runat="server" DataValue='<%# Bind("PDCT_IMG_BIN") %>' Height="100px" Width="100px" ResizeMode="Fit" /> </a> </div> <div id="prdinfo"> <a href='<%# Eval("CLICK2COMPARE_URL") %>' class="prdname"> <asp:Label ID="name" runat="server" CssClass="prdname" Text='<%# Bind("PDCT_NAME") %>'></asp:Label></a> <br /> <asp:Label ID="prddesc" runat="server" CssClass="prddesc" Text='<%# Bind("PDCT_DESC") %>'></asp:Label> <br /> <asp:Label ID="prdmaxrank" runat="server" CssClass="prdmaxrank" Text='<%# Bind("MAX_RANK") %>'></asp:Label> <br /> <asp:Label ID="prdminprice" runat="server" CssClass="prdminprice" Text='<%# Bind("MIN_PRICE") %>'></asp:Label> </div> <div id="prdpricecontainer"> <div id="prdprice"> <asp:Label ID="prdprice" runat="server" CssClass="prdprice" Text='<%# Bind("PRICE_RANGE") %>'></asp:Label> </div> <div id="prdgo"> <asp:Label ID="lblNumPdct" runat="server" CssClass="numpdct" Text='<%# Bind("NUM_PDCT") %>'></asp:Label> <br /> <asp:Label ID="lblNumStores" runat="server" CssClass="numstores" Text='<%# Bind("NUM_STORES") %>'></asp:Label> <br /> <asp:Button ID="btnGo" runat="server" Text="Compare Prices" CommandName='<%# Bind("PDCT_ID") %>' CommandArgument='<%# Bind("CLICK2COMPARE_URL") %>' OnCommand="ProductClick" CausesValidation="False" /> </div> </div> <div id="prdoptions"> </div> </div> </ItemTemplate> <EmptyDataTemplate> <div class="RadListView RadListView_Sitefinity"> <div class="rlvEmpty"> Your search did not match any products. <br /> <br /> Suggestions: <ul> <li>Make sure all words are spelled correctly.</li> <li>Try different keywords.</li> <li>Try more general keywords.</li> </ul> </div> </div> </EmptyDataTemplate> <LayoutTemplate> <div id="productlistviewcontainer" runat="server" class="RadListView RadListView_Sitefinity"> <ol> <li id="itemPlaceholder" runat="server"></li> </ol> <telerik:RadDataPager ID="RadDataPager1" runat="server"> <Fields> <telerik:RadDataPagerButtonField FieldType="Numeric" /> </Fields> </telerik:RadDataPager> </div> </LayoutTemplate> </telerik:RadListView>Event Type: Warning Event Source: ASP.NET 2.0.50727.0 Event Category: Web Event Event ID: 1310 Date: 13/08/2010 Time: 4:55:43 PM User: N/A Computer: MAGICMINDSTEST Description: Event code: 3006 Event message: A parser error has occurred. Event time: 13/08/2010 4:55:43 PM Event time (UTC): 13/08/2010 6:55:43 AM Event ID: 4f20e6dc0d9d4e6988bed1fb68e38331 Event sequence: 53 Event occurrence: 2 Event detail code: 0 Application information: Application domain: /LM/W3SVC/1073077206/Root-5-129261559167671250 Trust level: Full Application Virtual Path: / Application Path: C:\Projects\Overlord\WebSites\Overlord\ Machine name: MAGICMINDSTEST Process information: Process ID: 9996 Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE Exception information: Exception type: HttpParseException Exception message: Method 'get_ProductListViewControl' in type 'Overlord.Product.Views.Search' from assembly 'Product.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. Request information: Request path: /Product/Search.aspx User host address: 127.0.0.1 User: Is authenticated: False Authentication Type: Thread account name: NT AUTHORITY\NETWORK SERVICE Thread information: Thread ID: 12 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: False Stack trace: at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseReader(StreamReader reader, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.UI.TemplateParser.Parse(ICollection referencedAssemblies, VirtualPath virtualPath) at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Custom event details: For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. <?xml version="1.0" encoding="utf-8"?><root> <Products> <Product> <Items ItemID="1" ItemNo="1232"> <Description ManufactureDate="2010/05/26" ID="11"></Description> </Items> <Items ItemID="2" ItemNo="1231"> <Description ManufactureDate="2010/05/12" ID="12"></Description> </Items> <Items ItemID="3" ItemNo="1270"> <Description ManufactureDate="2010/05/1" ID="21"></Description> </Items> <Items ItemID="4" ItemNo="1129"> <Description ManufactureDate="2010/05/4" ID="30"></Description> </Items> </Product> </Products></root>Imports Telerik.Web.UIImports System.XmlImports System.IOPublic Class Test Inherits System.Web.UI.Page Dim xmlDoc As New System.Xml.XmlDocument() Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load DefineGridStructure() Dim Grid1 As RadGrid = CType(PlaceHolder1.FindControl("RadGrid1"), RadGrid) RadAjaxManager1.AjaxSettings.AddAjaxSetting(Grid1, Grid1) If Not IsPostBack Then Grid1.SelectedIndexes.Add(1, 0, 0) Grid1.DataBind() ' Grid1.MasterTableView.Items(0).Expanded = True Else End If Grid1.DataBind() End Sub Private Sub DefineGridStructure() Dim RadGrid1 As RadGrid = New RadGrid RadGrid1.ID = "RadGrid1" xmlDoc.Load(Server.MapPath("test.xml")) xmlDoc.SelectSingleNode("//Product").Attributes.RemoveAll() Dim ndlSingleParentNode As XmlNodeList = xmlDoc.SelectNodes("//Product/node() [descendant::node()][position()=1]") Dim ndl As XmlNodeList = xmlDoc.SelectNodes("//Product/node()[descendant::node()]") RadGrid1.DataSource = ConvertXmlNodeListToDataTable(ndlSingleParentNode, ndl, RadGrid1) RadGrid1.DataBind() Me.PlaceHolder1.Controls.Add(RadGrid1) ' Dim ndList As System.Xml.XmlNodeList = xmlDoc.SelectNodes("//Product/node()") End Sub Private Function ConvertXmlNodeListToDataTable(ByVal ndlProduct As XmlNodeList, ByVal ndl As XmlNodeList, ByVal RadGrid1 As RadGrid) As Object Dim dt As DataTable = New DataTable() Dim TempColumn As Integer = 0 For Each ndSubChild As XmlNode In ndlProduct For attrCoun As Integer = 0 To ndSubChild.Attributes.Count - 1 Step 1 TempColumn = TempColumn + 1 Dim dc As DataColumn = New DataColumn(ndSubChild.Attributes(attrCoun).Name, System.Type.GetType("System.String")) If dt.Columns.Contains(ndSubChild.Attributes(attrCoun).Name) Then dt.Columns.Add(dc.ColumnName = dc.ColumnName + TempColumn.ToString()) Else dt.Columns.Add(dc) End If Next Next Dim ColumnsCount As Integer = dt.Columns.Count Dim ndCount As Integer = 0 For ndlCount As Integer = 0 To ndl.Count - 1 Step 1 Dim dr As DataRow = dt.NewRow() For ndCount = 0 To ColumnsCount - 1 Step 1 If Not ndl(ndlCount).Attributes(ndCount).Value = "" Then dr(ndCount) = ndl(ndlCount).Attributes(ndCount).Value Else dr(ndCount) = ndl(ndlCount).Attributes(ndCount).Value End If Next dt.Rows.Add(dr) Next Dim tableView As GridTableView = New GridTableView(RadGrid1) Dim childGrid As New RadGrid() Dim boundColumn As GridBoundColumn For ndlCount As Integer = 0 To ndl.Count - 1 Step 1 Dim dsChild As New DataSet Dim attrCount As Integer = 0 If ndl(ndlCount).ChildNodes.Count > 0 Then 'Dim gridtempCol As GridTemplateColumn = New GridTemplateColumn() 'gridtempCol.DataField = "test" 'gridtempCol.HeaderText = "test" 'gridtempCol.ItemTemplate.InstantiateIn(childGrid) 'RadGrid1.MasterTableView.TemplateControl.LoadTemplate(gridtempCol.ToString()) Dim ndSelect As XmlNodeList = xmlDoc.SelectNodes("//Product/node()[@RowID=" & ndlCount + 1 & "]") Dim ndSelectNode As XmlNode = xmlDoc.SelectSingleNode("//Product/node()[@RowID=" & ndlCount + 1 & "]") tableView.AutoGenerateColumns = False 'dsChild.ReadXml(New StringReader(ndSelectNode.InnerXml)) 'childGrid.DataSource = dsChild 'childGrid.DataBind() For Each tableViewNode As XmlNode In ndl(ndlCount).ChildNodes For attrCount = 0 To tableViewNode.Attributes.Count - 1 Step 1 boundColumn = New GridBoundColumn boundColumn.DataField = tableViewNode.Attributes(attrCount).Name boundColumn.AllowSorting = True boundColumn.ShowSortIcon = True boundColumn.HeaderText = tableViewNode.Attributes(attrCount).Name tableView.Columns.Add(boundColumn) Next tableView.DataBind() Next ' tableView.DataSource = dsChild End If Next ' tableView.Controls.Add(childGrid) RadGrid1.MasterTableView.DetailTables.Add(tableView) RadGrid1.DataBind() Session.Add("dt", dt) Session.Add("ctrlListing", RadGrid1) Return dt End FunctionEnd Class