or
| /// <summary> |
| /// A data control to reference a method in the current page instance. |
| /// </summary> |
| public class PageMethodDataSource:ObjectDataSource |
| { |
| public PageMethodDataSource() |
| { |
| ObjectCreating += OnObjectCreating; |
| } |
| protected override void OnInit(System.EventArgs e) |
| { |
| base.OnInit(e); |
| TypeName = Page.GetType().BaseType.ToString(); |
| } |
| void OnObjectCreating(object sender, ObjectDataSourceEventArgs e) |
| { |
| e.ObjectInstance = Page; |
| } |
| } |
| div.RadMenu_internalweb .rmItem .rmLink:hover .rmText { |
| background-image: url('http://stylebuilder.telerik.com//ImageHandler.ashx?mode=get&Skin=internalweb&Control=Menu&Suite=aspnet-ajax&file=internalwebsprite.png'); |
| background-position: 100% -26px; |
| padding-left: 0px; |
| height: 25px; |
| margin-top: 0px; |
| padding-right: 28px; |
| background-color: transparent; |
| } |
| Private rlvResults As RadListView |
| Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init |
| Me.BuildListView() |
| End Sub |
| Protected Sub BuildListView() |
| Me.rlvResults = New RadListView() |
| With Me.rlvResults |
| .AllowCustomPaging = False |
| .AllowCustomSorting = False |
| .AlternatingItemTemplate = New GooWayTemplates.AlternatingItemTemplate() |
| .EditItemTemplate = New GooWayTemplates.EditItemTemplate() |
| .InsertItemTemplate = New GooWayTemplates.EditItemTemplate() |
| .ItemTemplate = New GooWayTemplates.ItemTemplate() |
| .EmptyDataTemplate = New GooWayTemplates.EmptyDataTemplate() |
| .LayoutTemplate = New GooWayTemplates.LayoutTemplate() |
| .SelectedItemTemplate = New GooWayTemplates.ItemTemplate() |
| .ItemPlaceholderID = "itemPlaceholder" |
| AddHandler .NeedDataSource, AddressOf rlvResults_NeedDataSource |
| .AllowPaging = True |
| End With |
| Me.placeHListView.Controls.Add(Me.rlvResults) |
| End Sub |
| <%@ Page Title="" Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="WebApplication1.Default2" %> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head id="Head1" runat="server"> |
| <title>Titolo</title> |
| <telerik:RadStyleSheetManager ID="RadStyleSheetManagerMain" runat="server" /> |
| </head> |
| <body id="bodyBackgroundImage" runat="server"> |
| <center> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManagerMain" runat="server"> |
| <Scripts> |
| <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> |
| <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> |
| </Scripts> |
| </telerik:RadScriptManager> |
| <telerik:RadAjaxManager ID="RadAjaxManagerMain" runat="server" /> |
| <table class="bodytable" width="950" cellpadding="0" cellspacing="0" border="0"> |
| <!-- HEADER --> |
| <tr> |
| <td> |
| <table width="100%" border="0" cellpadding="0" cellspacing="0" class="headertable"> |
| <tr> |
| <td> |
| <!--height="88"--> |
| <table width="100%" class="headertable" border="0" cellpadding="0" cellspacing="0"> |
| <tr> |
| <td align="left"> |
| </td> |
| </tr> |
| <tr> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <table id="TableMenu" width="100%" cellspacing="0" cellpadding="0" border="0" class="maintitletable" |
| runat="server"> |
| <tr style="height: 33px;"> |
| <td width="20%"> |
| </td> |
| <td width="10%"> |
| </td> |
| <td align="right"> |
| <!-- HOME --> |
| <a id="A1" href="~/Default.aspx" runat="server">Home</a> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <!-- BODY --> |
| <tr> |
| <td class="bodytable"> |
| <table border="0" cellpadding="0" cellspacing="0"> |
| <tr> |
| <td id="leftColumn"> |
| <div class="rightmain"> |
| </div> |
| <!-- Menu condiviso--> |
| </td> |
| <td> |
| |
| </td> |
| <td id="centercolumn"> |
| <div class="centermain"> |
| <table> |
| <tr> |
| <td> |
| Field 1 |
| </td> |
| <td colspan="2"> |
| <telerik:RadTextBox ID="RadTextBoxId1" runat="server" EmptyMessage="Text 1" |
| Width="280px" Enabled="False" > |
| </telerik:RadTextBox> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| Field 2 |
| </td> |
| <td colspan="2"> |
| <telerik:RadTextBox ID="RadTextBoxId2" runat="server" EmptyMessage="Text 2" |
| Width="280px" Enabled="False"> |
| </telerik:RadTextBox> |
| </td> |
| </tr> |
| <tr> |
| <td > |
| Field 3 |
| </td> |
| <td colspan="2"> |
| <telerik:RadTextBox ID="RadTextBoxId3" runat="server" EmptyMessage="Text 3" |
| Width="280px" Enabled="False"> |
| </telerik:RadTextBox> |
| </td> |
| </tr> |
| <tr> |
| <td style="width:280px;" > |
| Date (*) |
| </td> |
| <td colspan="2"> |
| <telerik:RadDatePicker ID="RadDatePickerDataInserimento" runat="server" Calendar-CultureInfo="Italian (Italy)" |
| Calendar-RangeMaxDate="06/06/2079 00:00:00" Calendar-RangeMinDate="01/01/1900 00:00:00" |
| MaxDate="06/06/2079 00:00:00" MinDate="01/01/1900 00:00:00" Width="280px" > |
| <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy" MaxDate="06/06/2079 00:00:00" MinDate="01/01/1900 00:00:00" /> |
| </telerik:RadDatePicker> |
| <asp:CustomValidator ID="CustomValidatorDataInserimento" runat="server" |
| ValidationGroup="ButtonConferma" ErrorMessage="Error" |
| OnServerValidate="CustomValidatorDatInserimento_ServerValidate"> |
| </asp:CustomValidator> |
| </td> |
| </tr> |
| <tr> |
| <td /> |
| <td colspan="2"> |
| <asp:Button ID="ButtonConferma" runat="server" Text="Click" OnClick="ButtonConferma_Click" CausesValidation="true" ValidationGroup="ButtonConferma" /> |
| </td> |
| </tr> |
| </table> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <!-- footer --> |
| <tr> |
| <td> |
| <div> |
| <table width="100%" border="0" cellpadding="0" cellspacing="0" class="footertable"> |
| <tr> |
| <td class="footertable"> |
|   |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <hr /> |
| </td> |
| </tr> |
| <tr> |
| <td class="footertable"> |
| <strong>Footer</strong> |
| </td> |
| </tr> |
| </table> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </form> |
| </center> |
| </body> |
| </html> |
| using System; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| namespace WebApplication1 |
| { |
| public partial class Default2 : Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| } |
| protected void ButtonConferma_Click(object sender, EventArgs e) |
| { |
| } |
| protected void CustomValidatorDatInserimento_ServerValidate(object source, ServerValidateEventArgs args) |
| { |
| args.IsValid = false; |
| } |
| } |
| } |
| foreach (ValueMapping mapping in ValueMappings) |
| { |
| RadComboBoxItem comboItem = new RadComboBoxItem(mapping.DisplayValue, mapping.DataValue); |
| this.Items.Add(comboItem); |
| } |
| RadComboBoxItem item = |
| this.FindItemByValue(value); |
| if (item != null) |
| { |
| item.Selected = true; |
| } |

| <HeaderTemplate> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td style="width:90px; vertical-align:top; text-align:left;"><%= ((SessionState.Language == Natr.Classes.Language.Spanish) ? "No. de Stock" : "Stock Number")%></td> |
| <td style="width:320px; vertical-align:top; text-align:left;"><%= ((SessionState.Language == Natr.Classes.Language.Spanish) ? "Descripción" : "Product Name")%></td> |
| <td style="width:50px; vertical-align:top; text-align:left;"><%= ((SessionState.Language == Natr.Classes.Language.Spanish) ? "Costo" : "Price")%></td> |
| </tr> |
| </table> |
| </HeaderTemplate> |
Working HeaderTemplate:
| <HeaderTemplate> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td style="width:90px; vertical-align:top; text-align:left;">Stock Number</td> |
| <td style="width:320px; vertical-align:top; text-align:left;">Product Name</td> |
| <td style="width:50px; vertical-align:top; text-align:left;">Price</td> |
| </tr> |
| </table> |
| </HeaderTemplate> |
| <table class="string-group-list"><tbody id="TestGroupedInputTable"><tr> |
| <th>One Header</th> |
| <th>Two Header</th> |
| <th>Three Header</th> |
| <td><button class="sgl-button" onclick="sglAddNew('TestGroupedInput', 3);" name="TestGroupedInputAddNew" type="button" id="TestGroupedInputAddNew">Add New</button></td> |
| </tr> |
| <tr id="TestGroupedInputRow0"> |
| <td><input type="text" class="sgl-input rfdDecorated" value="a" id="TestGroupedInputInput0_0" name="TestGroupedInputInput0_0"></td> |
| <td><input type="text" class="sgl-input rfdDecorated" value="s" id="TestGroupedInputInput0_1" name="TestGroupedInputInput0_1"></td> |
| <td><input type="text" class="sgl-input rfdDecorated" value="2" id="TestGroupedInputInput0_2" name="TestGroupedInputInput0_2"></td> |
| <td><button class="sgl-button" onclick="sglDelRow('TestGroupedInput','TestGroupedInputRow0');" name="TestGroupedInputDelete0" type="button" id="TestGroupedInputDelete0">Delete</button></td> |
| </tr> |
| </tbody></table> |