| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title></title> |
| <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| <Scripts> |
| <%--Needed for JavaScript IntelliSense in VS2010--%> |
| <%--For VS2008 replace RadScriptManager with ScriptManager--%> |
| <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" /> |
| <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> |
| </Scripts> |
| </telerik:RadScriptManager> |
| <script type="text/javascript"> |
| //Put your Java Script code here. |
| </script> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| </telerik:RadAjaxManager> |
| <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Outlook"> |
| </telerik:RadSkinManager> |
| <div> |
| <telerik:RadListView ID="RadListView1" runat="server" |
| DataSourceID="AccessDataSource1" Skin="Office2007"> |
| <AlternatingItemTemplate> |
| <div class="rlvA"> |
| <img src="images/book.png" /> <asp:Label ID="Field1Label" runat="server" Text='<%# Eval("Field1") %>' /> |
| </div> |
| </AlternatingItemTemplate> |
| <ItemTemplate> |
| <div class="rlvI"> |
| <img src="images/book.png" /> <asp:Label ID="Field1Label" runat="server" Text='<%# Eval("Field1") %>' /> |
| </div> |
| </ItemTemplate> |
| <EmptyDataTemplate> |
| <div class="RadListView RadListView_Office2007"> |
| <div class="rlvEmpty"> |
| There are no items to be displayed.</div> |
| </div> |
| </EmptyDataTemplate> |
| <LayoutTemplate> |
| <div class="RadListView RadListView_Office2007"> |
| <div ID="itemPlaceholder" runat="server"> |
| </div> |
| </div> |
| </LayoutTemplate> |
| <SelectedItemTemplate> |
| <div class="rlvISel"> |
| <asp:Label ID="Field1Label" runat="server" Text='<%# Eval("Field1") %>' /> |
| </div> |
| </SelectedItemTemplate> |
| </telerik:RadListView> |
| <asp:AccessDataSource ID="AccessDataSource1" runat="server" |
| DataFile="~/App_Data/Database.mdb" SelectCommand="SELECT [Field1] FROM [NAMES]"> |
| </asp:AccessDataSource> |
| <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="InsertNewItem()" /> |
| <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
| <script type="text/javascript"> |
| function InsertNewItem() { |
| alert("What params am I supposed to pass in order to have the listview insert a row for me?"); |
| var listView = $find("<%= RadListView1.ClientID %>"); |
| listView.insertItem(); |
| } |
| </script> |
| </telerik:RadCodeBlock> |
| </div> |
| </form> |
| </body> |
| </html> |
HI there.
I have a big problem with my Radcombobox rendering while using URL rewrite.
<rules>
<rule name="RewriteASPX">
<match url="(.*)"/>
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
<add input="{REQUEST_FILENAME}" pattern=".*Telerik\.Web\.UI\.*" negate="true"/>
</conditions>
<action type="Rewrite" url="{R:1}.aspx"/>
</rule>
</rules>
as soon as I delete my rewriting everything goes well.
thanks.
We have taken advantage of using the Tooltip in a user control to display our page help. The problem is we would like to add "View Page Help" while hovering over the image ("HelpImg") w/o it effecting the RadToolTip content. We have attempted to set the ​AlternateText and it will then replace the RadToolTip user control content with that message instead of displaying the help.
<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" /><uc1:PageHelp ID="PageHelp" runat="server" /><asp:Image ID="HelpImg" runat="server" ImageUrl="~/images/Menu/help_icon.png" style="cursor: pointer;" alttext="View Page Help" />Page Help.ascx
<telerik:RadToolTip runat="server" ID="RadToolTip1" Width="400px" ShowEvent="OnClick" RelativeTo="Element" Animation="Resize" TargetControlID="HelpImg" IsClientID="false" HideEvent="ManualClose" Position="TopRight"> <table> <tr><td class="TitleBar" style="width: 400px; text-align: center;"><asp:Label ID="PageTitle" runat="server"></asp:Label></td></tr> <tr><td style="text-align: justify;"><asp:Label ID="PageDesc" runat="server" Text="Label"></asp:Label></td></tr> <tr><td> </td></tr> <tr><td class="TitleBar" style="width: 400px; text-align: center;">Page Help</td></tr> <tr><td style="text-align: justify;"><asp:Label ID="PageHelp" runat="server" Text="Label"></asp:Label></td></tr> </table></telerik:RadToolTip>
Hi. I am trying to validate a MaskedTextBox in Asp.net using a RegularExpressionValidator control. The validation works on a normal textbox, but I can't get it to work on the MaskedTextBox. I'm getting the error message Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Here is my code:
<telerik:RadMaskedTextBox ID="txtFederalTaxID" runat="server" Mask="##-#######" CssClass="field" SelectionOnFocus="SelectAll"> </telerik:RadMaskedTextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator28" runat="server" ErrorMessage="*" ControlToValidate="txtFederalTaxID" InitialValue="" ValidationGroup="Terms"></asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtFederalTaxID" runat="server" ValidationExpression="^(?!(\d)\1+$|(?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)|9(?=0)){5}\d$|(?:0(?=9)|1(?=0)|2(?=1)|3(?=2)|4(?=3)|5(?=4)|6(?=5)|7(?=6)|8(?=7)|9(?=8)){5}\d$)\d{9}$" ErrorMessage="Invalid!" Width="20px"></asp:RegularExpressionValidator>
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using Telerik.Web.UI; using MachinaWeb.Services; using MachinaWeb.CommonClasses; public partial class Configuration_Companies : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { HiddenFieldIdCultura.Value = ((SessionInformation)Session["sessionData"]).IdCultura.ToString(); HiddenFieldIdAzienda.Value = ((SessionInformation)Session["sessionData"]).IdAzienda.ToString(); BO_Azienda bo_azienda = new BO_Azienda(((SessionInformation)Session["sessionData"]).IdAzienda); LabelNomeAzienda.Text = bo_azienda.NomeAzienda; LabelIntestazioneAzienda.Text = bo_azienda.Intestazione; } protected void Repeater1_PreRender(object sender, EventArgs e) { foreach (RepeaterItem item in Repeater1.Items) { //Dinamically generate DataSource and associate it to Repeater Item ObjectDataSource ods = new ObjectDataSource(); ods.TypeName = "MachinaWeb.Services.BO_ConfigurazioneProgramma_Parametro"; ods.SelectMethod = "getAll"; ods.UpdateMethod = "updateParametro"; ods.SelectParameters.Add("_idCultura", DbType.Int64, HiddenFieldIdCultura.Value); ods.SelectParameters.Add("_idAzienda", DbType.Int64, HiddenFieldIdAzienda.Value); ods.SelectParameters.Add("_idGruppoParametro", DbType.Int64, ((HiddenField)item.FindControl("HiddenFieldIdGruppo")).Value); RadGrid radGrid = (RadGrid)item.FindControl("RadGridParametriConfigurazione"); radGrid.DataSource = ods; radGrid.DataBind(); } } protected void RadGridParametriConfigurazione_UpdateCommand(object sender, GridCommandEventArgs e) { ObjectDataSourceForUpdate.SelectParameters["_idCultura"].DefaultValue = HiddenFieldIdCultura.Value; ObjectDataSourceForUpdate.SelectParameters["_idAzienda"].DefaultValue = HiddenFieldIdAzienda.Value; ObjectDataSourceForUpdate.SelectParameters["_idGruppoParametro"].DefaultValue = ((Label)e.Item.FindControl("LabelTipoParametro")).Text; ((RadGrid)sender).DataSource = ObjectDataSourceForUpdate; } protected void RadGridParametriConfigurazione_ItemDataBound(object source, GridItemEventArgs e) { if (!(e.Item is GridDataInsertItem) && e.Item.IsInEditMode) //item is about to be edit { long tipoParametro = long.Parse(((HiddenField)e.Item.FindControl("HiddenFieldTipoControllo")).Value); //HiddenFieldQuery.Value = ((HiddenField)e.Item.FindControl("HiddenFieldQueryRiga")).Value; try { switch (tipoParametro) { case 1: //CheckBox ((RadComboBox)e.Item.FindControl("RadComboBoxValore")).Visible = false; ((TextBox)e.Item.FindControl("TextBoxDescrizione")).Visible = false; ((CheckBox)e.Item.FindControl("CheckBoxAbilitatoE")).Visible = true; break; case 2: //CheckBox-ComboBox ((RadComboBox)e.Item.FindControl("RadComboBoxValore")).Visible = true; ((TextBox)e.Item.FindControl("TextBoxDescrizione")).Visible = false; ((CheckBox)e.Item.FindControl("CheckBoxAbilitatoE")).Visible = true; break; case 3: //TextBox ((RadComboBox)e.Item.FindControl("RadComboBoxValore")).Visible = false; ((TextBox)e.Item.FindControl("TextBoxDescrizione")).Visible = true; ((CheckBox)e.Item.FindControl("CheckBoxAbilitatoE")).Visible = false; break; case 4: //ComboBox ((RadComboBox)e.Item.FindControl("RadComboBoxValore")).Visible = true; ((TextBox)e.Item.FindControl("TextBoxDescrizione")).Visible = false; ((CheckBox)e.Item.FindControl("CheckBoxAbilitatoE")).Visible = false; break; case 5: //CheckBox-TextBox ((RadComboBox)e.Item.FindControl("RadComboBoxValore")).Visible = false; ((TextBox)e.Item.FindControl("TextBoxDescrizione")).Visible = true; ((CheckBox)e.Item.FindControl("CheckBoxAbilitatoE")).Visible = true; break; } } catch (NullReferenceException) { } } } protected void HiddenFieldQueryRiga_ValueChanged(object sender, EventArgs e) { } } <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Aziende.aspx.cs" Inherits="Configuration_Companies" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderBody" runat="Server"> <asp:Label ID="LabelIntestazione" runat="server" Text="LabelIntestazione" Font-Names="Arial" Font-Size="13px" Font-Bold="True"></asp:Label> <table style="font-family: Arial; font-size: 13px; margin-top: 10px;"> <tr> <td colspan="2"> <b> <asp:Label ID="LabelIntestazioniDatiAzienda" runat="server" Text="Label"></asp:Label> </b> </td> </tr> <tr> <td> <asp:Label ID="LabelNomeAziendaTxt" runat="server" Text="LabelNomeAzienda"></asp:Label> </td> <td> <asp:Label ID="LabelNomeAzienda" runat="server" Text="Label"></asp:Label> </td> </tr> <tr> <td> <asp:Label ID="LabelIntestazioneAziendaTxt" runat="server" Text="Label"></asp:Label> </td> <td> <asp:Label ID="LabelIntestazioneAzienda" runat="server" Text="Label"></asp:Label> </td> </tr> </table> <br /> <table width="100%;"> <tr> <td> <div style="width: 7cm;"> </div> </td> <td style="text-align: right;"> <asp:Label ID="LabelGruppo" runat="server" Text="Label" Font-Names="Arial" Font-Size="11pt"></asp:Label> <telerik:RadComboBox ID="RadComboBoxGruppo" runat="server" DataSourceID="ObjectDataSourceGruppiParametriComboBox" DataTextField="NomeGruppo" DataValueField="IdGruppo" AutoPostBack="True" AppendDataBoundItems="True" Width="300px"> <Items> <telerik:RadComboBoxItem runat="server" Text="---" Value="-1" /> </Items> </telerik:RadComboBox> <asp:ObjectDataSource ID="ObjectDataSourceGruppiParametriComboBox" runat="server" SelectMethod="getAll" TypeName="MachinaWeb.Services.BO_ConfigurazioneProgramma_GruppoParametri"> <SelectParameters> <asp:ControlParameter ControlID="HiddenFieldIdCultura" Name="_idCultura" PropertyName="Value" Type="Int64" /> </SelectParameters> </asp:ObjectDataSource> </td> </tr> </table> <asp:Repeater ID="Repeater1" runat="server" DataSourceID="ObjectDataSourceGruppiParametri" OnPreRender="Repeater1_PreRender"> <HeaderTemplate> </HeaderTemplate> <FooterTemplate> </FooterTemplate> <ItemTemplate> <div id="IntestazioneGruppo" style="background-color: Orange; border: 1px solid black; text-align: center; margin-bottom: 11px;"> <%# Eval("NomeGruppo") %> </div> </b> <telerik:RadGrid ID="RadGridParametriConfigurazione" runat="server" EnableEmbeddedSkins="False" GridLines="None" Skin="MachinaWeb" AllowPaging="true" PageSize="15" AllowAutomaticUpdates="True" EnableAjaxSkinRendering="False" OnItemDataBound="RadGridParametriConfigurazione_ItemDataBound" OnUpdateCommand="RadGridParametriConfigurazione_UpdateCommand"> <MasterTableView AutoGenerateColumns="False" EditMode="InPlace" DataKeyNames="IdParametro"> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridTemplateColumn Visible="false"> <EditItemTemplate> <asp:Label ID="LabelTipoParametro" runat="server" Text='<%# Bind("IdTipoParametro") %>'></asp:Label> <%--Used only for update datasource--%> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridEditCommandColumn ButtonType="ImageButton" CancelImageUrl="~/Images/ImagesGrid/Cancel.gif" EditImageUrl="~/Images/ImagesGrid/Edit.gif" UpdateImageUrl="~/Images/ImagesGrid/Update.gif" InsertImageUrl="~/Images/ImagesGrid/Update.gif" UniqueName="EditCommandColumn" ItemStyle-Width="40px" /> <telerik:GridBoundColumn DataField="IdParametro" DataType="System.Int64" HeaderText="IdParametro" SortExpression="IdParametro" UniqueName="IdParametro" ReadOnly="true" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="IdCultura" DataType="System.Int64" HeaderText="IdCultura" SortExpression="IdCultura" UniqueName="IdCultura" ReadOnly="true" Visible="false"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn Resizable="false" ItemStyle-Width="270px"> <HeaderTemplate> <asp:Label ID="LabelDescrizioneParametro" runat="server" Text="Parametro"></asp:Label> </HeaderTemplate> <ItemTemplate> <asp:Label ID="LabelDescrizioneParametroI" runat="server" Text='<%# Bind("DescrizioneParametro") %>' Width="270px"></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:Label ID="LabelDescrizioneParametroE" runat="server" Text='<%# Bind("DescrizioneParametro") %>' Width="270px"></asp:Label> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn Resizable="false" ItemStyle-Width="270px"> <HeaderTemplate> <asp:Label ID="LabelUnificata" runat="server" Text="Valore"></asp:Label> </HeaderTemplate> <ItemTemplate> <asp:Label ID="LabelDescrizioneI" runat="server" Text='<%# Bind("ValoreTextBoxComboBox") %> ' Width="270px"></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="TextBoxDescrizione" runat="server" Text='<%# Bind("DescrizioneTextBox") %>' Width="270px"></asp:TextBox> <telerik:RadComboBox ID="RadComboBoxValore" runat="server" Width="270px" DataSourceID="ObjectDataSourceRadComboBoxValore" DataTextField="Descrizione" DataValueField="Valore" SelectedValue='<%# Bind("ValoreComboBox") %>'> </telerik:RadComboBox> <asp:HiddenField ID="HiddenFieldQueryRiga" runat="server" Value='<%# Bind("QueryComboBox") %>' /> <asp:Label ID="LabelHidden1" runat="server" Text='<%# Bind("QueryComboBox") %>' /> <asp:HiddenField ID="HiddenFieldTipoControllo" runat="server" Value='<%# Bind("IdTipoParametro") %>' /> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn Resizable="false" ItemStyle-Width="30px"> <HeaderTemplate> <asp:Label ID="LabelAbilitato" runat="server" Text="Abilitato"></asp:Label> </HeaderTemplate> <ItemTemplate> <asp:CheckBox ID="CheckBoxAbilitatoI" runat="server" Checked='<%# Bind("Abilitato") %>' Enabled="false" Width="30px" /> </ItemTemplate> <EditItemTemplate> <asp:CheckBox ID="CheckBoxAbilitatoE" runat="server" Checked='<%# Bind("Abilitato") %>' Width="30px" /> </EditItemTemplate> </telerik:GridTemplateColumn> </Columns> <EditFormSettings> <EditColumn> </EditColumn> </EditFormSettings> </MasterTableView> </telerik:RadGrid> <asp:HiddenField ID="HiddenFieldIdGruppo" runat="server" Value='<%# DataBinder.Eval(Container.DataItem,"IdGruppo")%>' /> </ItemTemplate> <SeparatorTemplate> <div style="margin-bottom: 20px;"> </div> </SeparatorTemplate> </asp:Repeater> <asp:ObjectDataSource ID="ObjectDataSourceGruppiParametri" runat="server" SelectMethod="getAll" TypeName="MachinaWeb.Services.BO_ConfigurazioneProgramma_GruppoParametri"> <SelectParameters> <asp:ControlParameter ControlID="HiddenFieldIdCultura" Name="_idCultura" PropertyName="Value" Type="Int64" /> <asp:ControlParameter ControlID="RadComboBoxGruppo" Name="_idGruppoSelezionato" PropertyName="SelectedValue" Type="Int64" /> </SelectParameters> </asp:ObjectDataSource> <%--Prova combo dinamico in repeater--%> <asp:ObjectDataSource ID="ObjectDataSourceRadComboBoxValore" runat="server" SelectMethod="valoriComboBox" TypeName="MachinaWeb.Services.BO_Query"> <SelectParameters> <asp:ControlParameter ControlID="HiddenFieldQuery" Name="_query" DbType="String" PropertyName="Value" /> <asp:ControlParameter ControlID="HiddenFieldIdCultura" Name="_idCultura" Type="Int64" PropertyName="Value" /> </SelectParameters> </asp:ObjectDataSource> <asp:HiddenField ID="HiddenFieldQuery" runat="server" /> <%--Prova combo dinamico in repeater--%> <asp:ObjectDataSource ID="ObjectDataSourceForUpdate" runat="server" SelectMethod="getAll" TypeName="MachinaWeb.Services.BO_ConfigurazioneProgramma_Parametro" UpdateMethod="updateParametro"> <SelectParameters> <asp:Parameter Name="_idGruppoParametro" Type="Int64" DefaultValue="" /> <asp:ControlParameter ControlID="HiddenFieldIdAzienda" Name="_idAzienda" PropertyName="Value" Type="Int64" /> <asp:ControlParameter ControlID="HiddenFieldIdCultura" Name="_idCultura" PropertyName="Value" Type="Int64" /> </SelectParameters> <UpdateParameters> <asp:ControlParameter ControlID="HiddenFieldIdAzienda" Name="_idAzienda" PropertyName="Value" Type="Int64" /> <asp:ControlParameter ControlID="HiddenFieldIdCultura" Name="_idCultura" PropertyName="Value" Type="Int64" /> <asp:Parameter Name="Abilitato" Type="Boolean" /> <asp:Parameter Name="IdTipoParametro" Type="Int64" /> <asp:Parameter Name="DescrizioneParametro" Type="String" /> <asp:Parameter Name="DescrizioneTextBox" Type="String" /> <asp:Parameter Name="ValoreComboBox" Type="String" /> <asp:Parameter Name="IdParametro" Type="Int64" /> </UpdateParameters> </asp:ObjectDataSource> <asp:HiddenField ID="HiddenFieldIdCultura" runat="server" /> <asp:HiddenField ID="HiddenFieldIdAzienda" runat="server" /> </asp:Content> Hi,
I am using a 16x16 png on my top level menu, this looks very small but when I tried a larger 24x24 one then the menu behaved strangely when hovering (the menu height increased, hinting that the image is too large.) What is the recommended image size for a standard size menu?
Hi
I would to like the export the datasource of the HTMLChart to Excel (XLS) format.
Can you someone help me in exporting to Excel(.xls)?
Thanks in Advance