Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
136 views
i am new to this issues and i need help. problem is: i cant see page  right format like attachment.  i created page with telerik wizard a page: RadGridAutomaticCrudOperations. i didnt add anything,i guess i missing something. what should i do.

page aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadGridAutomaticCrudOperations.aspx.cs"
    Inherits="RadGridAutomaticCrudOperations" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <style type="text/css">
        .MyImageButton
        {
            cursor: hand;
        }
        .EditFormHeader td
        {
            font-size: 14px;
            padding: 4px !important;
            color: #0066cc;
        }
    </style>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" CdnSettings-TelerikCdn="Enabled" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadAjaxManager runat="server"
        DefaultLoadingPanelID="RadAjaxLoadingPanel1" EnableHistory="True">
    </telerik:RadAjaxManager>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" CdnSettings-TelerikCdn="Enabled">
        <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>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
        <telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True"
            AllowSorting="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
            AllowMultiRowEdit="True" AllowPaging="True" DataSourceID="DataSource1" OnItemUpdated="RadGrid1_ItemUpdated"
            AllowFilteringByColumn="True" OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted"
            OnDataBound="RadGrid1_DataBound" CellSpacing="0">
            <pagerstyle mode="NextPrevAndNumeric" />
            <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
            <mastertableview autogeneratecolumns="False" commanditemdisplay="TopAndBottom"
                datakeynames="ProductID" datasourceid="DataSource1" editmode="EditForms"
                horizontalalign="NotSet" width="100%">
                <commanditemsettings exporttopdftext="Export to PDF" />
                <rowindicatorcolumn filtercontrolalttext="Filter RowIndicator column"
                    visible="True">
                </rowindicatorcolumn>
                <expandcollapsecolumn filtercontrolalttext="Filter ExpandColumn column"
                    visible="True">
                </expandcollapsecolumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="ProductID" DataType="System.Int32"
                        Display="False" FilterControlAltText="Filter ProductID column"
                        HeaderText="ProductID" ReadOnly="True" SortExpression="ProductID"
                        UniqueName="ProductID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProductName"
                        FilterControlAltText="Filter ProductName column" HeaderText="ProductName"
                        SortExpression="ProductName" UniqueName="ProductName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SupplierID" DataType="System.Int32"
                        Display="False" FilterControlAltText="Filter SupplierID column"
                        HeaderText="SupplierID" SortExpression="SupplierID" UniqueName="SupplierID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CategoryID" DataType="System.Int32"
                        Display="False" FilterControlAltText="Filter CategoryID column"
                        HeaderText="CategoryID" SortExpression="CategoryID" UniqueName="CategoryID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="QuantityPerUnit" Display="False"
                        FilterControlAltText="Filter QuantityPerUnit column"
                        HeaderText="QuantityPerUnit" SortExpression="QuantityPerUnit"
                        UniqueName="QuantityPerUnit">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitPrice" DataType="System.Decimal"
                        FilterControlAltText="Filter UnitPrice column" HeaderText="UnitPrice"
                        SortExpression="UnitPrice" UniqueName="UnitPrice">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitsInStock" DataType="System.Int16"
                        FilterControlAltText="Filter UnitsInStock column" HeaderText="UnitsInStock"
                        SortExpression="UnitsInStock" UniqueName="UnitsInStock">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitsOnOrder" DataType="System.Int16"
                        Display="False" FilterControlAltText="Filter UnitsOnOrder column"
                        HeaderText="UnitsOnOrder" SortExpression="UnitsOnOrder"
                        UniqueName="UnitsOnOrder">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ReorderLevel" DataType="System.Int16"
                        Display="False" FilterControlAltText="Filter ReorderLevel column"
                        HeaderText="ReorderLevel" SortExpression="ReorderLevel"
                        UniqueName="ReorderLevel">
                    </telerik:GridBoundColumn>
                    <telerik:GridCheckBoxColumn DataField="Discontinued" DataType="System.Boolean"
                        Display="False" FilterControlAltText="Filter Discontinued column"
                        HeaderText="Discontinued" SortExpression="Discontinued"
                        UniqueName="Discontinued">
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridBoundColumn DataField="CategoryName"
                        FilterControlAltText="Filter CategoryName column" HeaderText="CategoryName"
                        SortExpression="CategoryName" UniqueName="CategoryName">
                    </telerik:GridBoundColumn>
                </Columns>
                <editformsettings>
                    <formtableitemstyle wrap="False" />
                    <formtablestyle backcolor="White" cellpadding="2" cellspacing="0"
                        height="110px" />
                    <formmaintablestyle backcolor="White" cellpadding="3" cellspacing="0"
                        width="100%" />
                    <formcaptionstyle cssclass="EditFormHeader" />
                    <FormMainTableStyle BackColor="White" CellPadding="3" CellSpacing="0"
                        GridLines="None" Width="100%" />
                    <FormTableStyle BackColor="White" CellPadding="2" CellSpacing="0"
                        Height="110px" />
                    <formtablealternatingitemstyle wrap="False" />
                    <editcolumn buttontype="ImageButton" canceltext="Cancel edit"
                        uniquename="EditCommandColumn1">
                    </editcolumn>
                    <formtablebuttonrowstyle cssclass="EditFormButtonRow" horizontalalign="Right" />
                </editformsettings>
            </mastertableview>
            <filtermenu enableimagesprites="False">
            </filtermenu>
        </telerik:RadGrid>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        </telerik:RadWindowManager>
    </telerik:RadAjaxPanel>
    <asp:SqlDataSource ConnectionString="<%$ ConnectionStrings:NorthwindOAConnectionString %>"
        ID="DataSource1" runat="server"
        SelectCommand="SELECT * FROM [Alphabetical list of products]"></asp:SqlDataSource>
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Sunset">
    </telerik:RadSkinManager>
    </form>
</body>
</html>
Cuneyt
Top achievements
Rank 1
 answered on 09 Oct 2012
2 answers
77 views
As soon as I applied an IconCssClass to one of my buttons, all of my buttons have move to random locations on the screen and cannot be put back. In Visual Studio, when I click on them, they state that they have margins applied to them when they do not either in the CSS, the markup or the button properties. I have replaced them with <asp:Button> and these appear to work fine.

I have deleted and attempted to create a new <telerik:RadButton> without an icon and automatic margins are automatically applied with no place to delete them, it seems.

It seems that these phantom style rules have been applied to all current and future instances of <telerik:RadButton>
Slav
Telerik team
 answered on 09 Oct 2012
1 answer
74 views
I am using a reg exp validator and I can not get the reg expression exactly how I want it. Below is my Reg Ex.

((#\*){1}) | (([0-9\*]{1,9})+-+([0-9\*]{1,9}))


What I want is for the reg Expression to allow either a # or a * one time OR allow a string of [Numbers or *]-[Numbers or *] 0-9 times.

Some examples would be ...

Ex. 1 = *
Ex. 2 = #
Ex. 3 = 12345678-123456789
Ex. 4 = *-1234
Ex. 5 = 1234-*

Please any help would be great!

Thanks,
Trevor

Princy
Top achievements
Rank 2
 answered on 09 Oct 2012
4 answers
177 views


How could fire GridNeedDataSourceEventArgs though the Javascript

Thanks Advance,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 09 Oct 2012
1 answer
129 views
I've been trying to get a feature similar to this implemented: http://www.telerik.com/community/forums/aspnet-ajax/listbox/onclientselectedindexchanged.aspx

This works fine for one listbox, but after transferring the contents over to the other listbox, the functions do not perform as expected. The checkboxes no longer change, but the selection does. Using the transfer all button to the original side shows that the checkstate actually is being updated.  Moving selections back and forth further screw up the code to the point where I'm not sure what it's doing anymore.

Is there any way to accomplish the feature in the above link and maintaining that functionality across the listbox that the item gets transferred to? I have added items to both the source and destination listbox and confirmed that the function is working individually for the listboxes until a transfer happens.
Bozhidar
Telerik team
 answered on 09 Oct 2012
1 answer
146 views
Hello there,

I am developing a web application using rad controls. I am using radwindow for popup, in one of the radwindow there is a radbutton with other controls like textbox, dropdown. My requirement is to apply ajaxify and show loading panel after radbutton click.

As a solution I have registered radajaxmanager and radajaloadingpanel on master page.

 <telerik:RadAjaxManager ID="rAjaxManagerPopUp" runat="server" >
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="rLoadingPanel" ZIndex="8001" Skin="MyCustomSkin"
        EnableEmbeddedSkins="false" runat="server">
    </telerik:RadAjaxLoadingPanel>

and write this code on aspx.cs

                RadAjaxManager radAjaxManager = Content("rAjaxManagerPopUp") as RadAjaxManager;
                RadAjaxLoadingPanel radAjaxLoadingPanel = Content("rLoadingPanel") as RadAjaxLoadingPanel;
                if (radAjaxManager != null)
                {
                    radAjaxManager.AjaxSettings.AddAjaxSetting(radAjaxManager, pnlPaymentConfirmation);
                    radAjaxManager.AjaxSettings.AddAjaxSetting(radAjaxManager, rBtnSubscribe, radAjaxLoadingPanel);
                    radAjaxManager.AjaxSettings.AddAjaxSetting(rBtnSubscribe, pnlPaymentConfirmation, radAjaxLoadingPanel);
                    radAjaxManager.AjaxSettings.AddAjaxSetting(radAjaxManager, rBtnSaveNSubscribe, radAjaxLoadingPanel);
                    radAjaxManager.AjaxSettings.AddAjaxSetting(rBtnSaveNSubscribe, pnlPaymentConfirmation, radAjaxLoadingPanel);
                }
after these changes I able to show loading panel on Radwindow Popup. But beacuse of these change I am not able to call registered javascript function on aspx.cs
e.g
               String script = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(BillingInfoKeepInEditMode); </script>";
           Page.ClientScript.RegisterStartupScript(this.GetType(), "BillingInfoKeepInEditMode", script);

Please help me to resolved this issue.
its very urgent

Thanks,
Avinash





Andrey
Telerik team
 answered on 09 Oct 2012
1 answer
103 views
Hi there,
i'm new in Telerik framework.
I've a problem with radgrid control, In my grid there are unwanted gray bars.
 Please take a look at attached screenshot (screenshot barre grigie.png).

I've tryed to change many attributes of radgrid but the gray bars are always there!

The portion of rendered html regarding the gray bar is in the second attached file (screenshot barre grigie html code.png)

This is my code:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="StayDay.ascx.cs" Inherits="WebTickets.SubModules.StayDay" %>
<div id="dayStay"style="width:100px;padding:3px;">
    <asp:Panel runat="server" ID="container" meta:resourcekey="containerResource1">
  
  <asp:Label ID="day" runat="server" height="10px" Font-Size="Smaller"
            meta:resourcekey="dayResource1"></asp:Label>
       <br />
        <br /><span class="description">Disponibilità</span>
 
 <telerik:RadGrid ID="rgDays" runat="server" GridLines="None"
            AutoGenerateColumns="False" OnItemDataBound="rgDataBound"
            OnItemCreated="rgItemCreated" CellPadding="0" Width="68px" 
            BorderStyle="None" BorderColor="Transparent"
            meta:resourcekey="rgDaysResource1" BackColor="#FFFFFF">
     <AlternatingItemStyle Width="67px" CssClass="RadGrid_Default" BorderStyle="None" BorderColor="Transparent" />
    <MasterTableView DataKeyNames="Id" ShowHeader="False" BorderWidth="0px" 
         BorderStyle="None" BorderColor="Transparent"
         style="padding:2px" CellPadding="0" CellSpacing="0" Width="68px"
         CssClass="RadGrid_Default">
     <NoRecordsTemplate>
     <asp:Label ID="lblQuantity" runat="server" meta:resourcekey="lblQuantityResource1" ></asp:Label> ingressi
    <asp:HiddenField Id="hfmax" runat="server"/>
    <table width="60px" border="0">
     <tr>
     <td style="height:14px;width:14px"">
     
     <telerik:RadComboBox ID="rTB" runat="server" OnClientSelectedIndexChanging="setTotal" EnableScreenBoundaryDetection="false"
              DropDownWidth="48px"   AllowCustomText="false"  MaxHeight="180px"
             EnableVirtualScrolling="True"   Width="48px" AutoPostBack="false"
             meta:resourcekey="rTBResource1" ChangeTextOnKeyBoardNavigation="false"> <%-- OnClientItemsRequested="ClientLoadItem"OnItemsRequested="LoadItem"OnClientLoad="LoadFirst10"--%>
              <Items>
              <telerik:RadComboBoxItem Text="0" Value="0" />
              </Items>
              </telerik:RadComboBox>
 
  </td>
     </table>
     </NoRecordsTemplate>
    <Columns>
     <telerik:GridTemplateColumn meta:resourcekey="GridTemplateColumnResource1" UniqueName="TemplateColumn">
     <ItemTemplate>
     <table cellspacing="1px" cellpadding="1px">
     <tr>
     <td style="height:12px;width:12px;padding:0px"><asp:Label ID="fromHour"
             runat="server" Text='<%# Eval("fromHour") %>'
             meta:resourcekey="fromHourResource1"></asp:Label>-<asp:Label ID="toHouor"
             runat="server" Text='<%# Eval("toHour") %>' meta:resourcekey="toHouorResource1"></asp:Label></td>
          <td style="height:10px;padding:2px;padding:0px">
          
           <telerik:RadComboBox ID="rTB" Width="40px" runat="server" ChangeTextOnKeyBoardNavigation="false" EnableScreenBoundaryDetection="false"
                  OnClientSelectedIndexChanged="setTotal2" DropDownWidth="20"   MaxHeight="180px"
                   EnableVirtualScrolling="True" AllowCustomText="false" AutoPostBack="false"
                  meta:resourcekey="rTBResource2"><%-- OnItemsRequested="LoadItem"OnClientLoad="LoadFirst10"OnClientItemsRequested="ClientLoadItem"--%>
           <Items>
              <telerik:RadComboBoxItem Text="0" Value="0"/>
              </Items>
               
           </telerik:RadComboBox>
     
          </td></tr>
     </table>
      </ItemTemplate>
     </telerik:GridTemplateColumn> 
     </Columns>
        <ItemStyle Height="12px" Width="95px" />
        <AlternatingItemStyle BackColor="White" BorderWidth="0px" />
    </MasterTableView>
    </telerik:RadGrid>
  </asp:Panel>
</div>


Can some one help me? Thanks.
Davide.



Eyup
Telerik team
 answered on 09 Oct 2012
5 answers
145 views
Hi:

I have the following on a page:
<telerik:RadChart ID="mmpaChart" runat="server" Width="360px"  >
    <PlotArea EmptySeriesMessage-Visible="True">
        <EmptySeriesMessage TextBlock-Text="No data, may need to refresh page" />
    </PlotArea>
</telerik:RadChart>
but it is displaying No data
I have 2011:2.712.40 controls.

Phil
Petar Marchev
Telerik team
 answered on 09 Oct 2012
3 answers
393 views
The following code works and updates the literal control perfectly.  When I add the ajax manager, it doesn't update the control at all.  I have tried probably 20 different things.  I have tried the manager, the ajax panel, and cannot get this to work.  If somebody could take a look at this very simple example and tell me what I am doing wrong, I would much appreciate the help.  The literal control should come back with a message - like thank you, email not valid, etc.

Here is the aspx page.
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <ajaxsettings>
            <telerik:AjaxSetting AjaxControlID="Button1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Button1"
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="txtEmail" />
                    <telerik:AjaxUpdatedControl ControlID="litStatus" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </ajaxsettings>
    </telerik:RadAjaxManager>
 
    <br />
    <br />
    <asp:Button ID="Button1" runat="server" Text="Button" />
    Email: 
    <asp:TextBox ID="txtEmail" runat="server" Width="266px"></asp:TextBox>
    <br />
    <asp:Literal ID="litStatus" runat="server">dddddddd</asp:Literal>
<br />
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
    MinDisplayTime="3000" Skin="Default">
</telerik:RadAjaxLoadingPanel>

Here is the code.
Function AddEmail(ByVal strEmail As String) As Boolean
    Me.txtEmail.Text = ""
    Dim inputEmail As String = strEmail.Trim.ToLower
    Dim bSuccess As Boolean = False
    Dim strRegex As String = "^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" & "\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" & ".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
    'Validate email
    Dim re As New Regex(strRegex)
    If re.IsMatch(inputEmail) Then
 
    Else
        litStatus.Text = "Please enter a valid email to join our mailing list."
        '            litStatus.Text = "yeah are already a member.  If you are not receiving our communications, please check your spam folder."
        Return (False)
    End If
    'Open file and add email
    Dim xmldoc As New XmlDocument
    xmldoc.Load(Server.MapPath("xmlfile.xml"))
 
    'Check to make sure the email doesn't already exist
    Dim m_nodelist As XmlNodeList = xmldoc.SelectNodes("emails/email")
    For Each m_node In m_nodelist
        Dim strEmailNode = m_node.ChildNodes.Item(0).InnerText.ToString.ToLower
        'Get the lastName Element Value
        If strEmailNode = inputEmail Then
            litStatus.Text = "You are already a member.  If you are not receiving our communications, please check your spam folder."
            Return (False)
        End If
    Next
 
    'Append new node and save xml
    Dim newNode As XmlElement = xmldoc.CreateElement("email")
    newNode.InnerText = inputEmail
    xmldoc.DocumentElement.AppendChild(newNode)
    xmldoc.Save(Server.MapPath("xmlfile.xml"))
    litStatus.Text = "Thank you for joining our mailing list."
    AddEmail = True
End Function


Thank You!
Tsvetoslav
Telerik team
 answered on 09 Oct 2012
1 answer
95 views
I am testing in safari. I changed the user agent to "Mozilla/5.0 (iPad; CPU OS 6_0 like MAC OS X) AppleWebkit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A403 Safari/8536.25" which is nothing but  "i06 IPad". When i start debugging, I get the error at 


Type.registerNamespace("Telerik.Web.UI"); 




at
if(!$telerik.isSafari){c.outerHTML=null; 


I got this error when I selected "pause on uncaught exceptions" in safari
I am trying to deubug. But Still I dont any solution or not sure why this is happening. If I change back the user agent to anything else in Safari, it works fine.


Thanks for the help.
Marin
Telerik team
 answered on 09 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?