Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
91 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
104 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
73 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
101 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
300 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
77 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
1 answer
60 views
Does anyone have a good technique for connecting a RadGrid to a SharePoint list while still keeping all the design time features of the RadGrid? I don't. Here's everything I've tried and what sucks about it. BTW, I'm not blaming Telerik. This is more of a VS <--> SP problem.

Using SP Metal, I've create all the classes to connect to my SharePoint data. Now I'm stuck at connecting this to a RadGrid (or even a built in GridView). You have to have a data source to connect to. Logic says that you should use a LinqDataSource. Unfortunately, that control isn't "native" to the SP visual web part template. You'll have to go into the ascx and add <%@ Register Tagprefix="aspweb" Namespace="System.Web.UI.WebControls" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %> so that you can use <aspweb:LinqDataSource />. The RadGrid easily connects to the LinqDataSource, but you can't configure the LinqDataSource to connect DataContext object created with SP Metal. The only thing I can find online is using the Selecting event of the LinqDataSource to populate the data, or not using the LinqDataSource and populate the RadGrid's DataSource in the page Load event, or the RadGrid's NeedDataSource event. All of those options destroy the chance to use the nice design-time editor Telerik has designed for the RadGrid.

I've tried this same thing outside of a SP template and had no problems (aside from an annoying Microsoft.Sharepoint.Sandbox.dll file that keeps getting added to the bin\ folder that you have to delete).

Am I missing something? I doubt I'm the only one trying to display SP list data in a grid and use the editor to do my styling. This is driving me up a wall. I've thought about creating all the user controls outside of a SP template and then trying to load those, or creating my own type of data source to wrap around the Metal classes, but this seems a bit too complicated. Am I doing something wrong, or does anyone have a clean solution to my problem?


Tsvetoslav
Telerik team
 answered on 09 Oct 2012
1 answer
58 views
I am having issue when i click edit button, the previous records are coming grid need to refresh.
Andrey
Telerik team
 answered on 09 Oct 2012
8 answers
501 views
How can I simulate a client-side onClick event for a list item located at the 0 index of the control?  Thanks in advance for assistance.
Plamen
Telerik team
 answered on 09 Oct 2012
3 answers
82 views

I have a 2 treeviews lets say tree1 and tree2.
tree1 has checkbox nodes
I drag and drop the checked nodes from tree1 to tree2.
On tree1_nodedrop, trying to read those checkednodes using Tree1.CheckedNodes() and it is always returning 0.
Earlier it used to work, i'm not sure whether is stop working after SP1 installation or VS2012 installation.

Telerik Current Version: 2012.2.724.40 (2012 Q2 SP1)
Code Editor: Visual Studio 2010
Framework: 4.0
Tree1 ASPX  Code:
<telerik:RadTreeView ID="tree1" runat="server" Skin="Windows7" DataFieldID="ID"

 

 

 

 

DataFieldParentID="ParentID" DataTextField="NodeText" EnableDragAndDrop="true"

 

 

 

 

CheckBoxes="true" CheckChildNodes="true" DataValueField="ValueID">

Code Behind:
Private Sub tree1_NodeDrop(sender As Object, e As Telerik.Web.UI.RadTreeNodeDragDropEventArgs) Handles tree1.NodeDrop
For Each node As RadTreeNode In tree1.CheckedNodes
// do something

 

 

 

Next

 

 

 

End Sub

What am i missing here?

 

Nencho
Telerik team
 answered on 09 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?