Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
957 views
Hi,

I am relative new to Telerik RadControls, in fact I just started this week, I created several user controls, some of them use RadAjaxManager, if I try to use two of these controls in the same aspx page I got the error:


Only one instance of a RadAjaxManager can be added to the page!

 

What should I do?  

TIA

Princy
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
89 views
In rad asynchronous upload what is th maximum size of file can upload.
And in what location uploaded files are saved (in bytes)
Jayesh Goyani
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
156 views
Hi all,

How to customize text 14 items in 2 pages in RadGrid to 14 item(s) in 2 page(s)?

Thanks
Amit Choudhary
Shinu
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
184 views

I have an dropdown list and a div. This div contains two usercontrols.
Based on the value selected in the dropdown i want to Display only one usercontrol in the div.
How should I achieve it. please tell what are the settings i will have to do in the RadAjaxManager and all the required things that i need to make?

For example

  <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Telerik" Visible="true"
            InitialDelayTime="40" />
  <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"  >
   <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="selUserControl"  EventName="OnSelectedIndexChanged">
     <UpdatedControls>
      <telerik:AjaxUpdatedControl ControlID="divUserControlSection" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
    </telerik:AjaxSetting>
    </AjaxSettings>
  </telerik:RadAjaxManagerProxy>
 <div>
  <div>
      <telerik:RadComboBox ID="selUserControl" CausesValidation="false" runat="server"
                        AppendDataBoundItems="false"  DataTextField="Text" DataValueField="Value"
                        OnSelectedIndexChanged="selUserControl_SelectedIndexChanged" AutoPostBack="true">
    </telerik:RadComboBox>
  </div>
  <div class="label-container" id="objectTypeSection" runat="server">
   <uc:UserControl1 id="usercontrol1" runat="server">
   <uc:UserControl2 id="usercontrol2" runat="server">
  </div> 
 </div> 
   
   

Princy
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
151 views
Hi All,

Is their any radtextbox that allows users to enter only negative values and zero.

Please let me know.
Princy
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
94 views
I had a RadMenu on the page and other controls that were working just fine.  I added a RadGrid and it started hosing things up.

It overlaps the other controls to start with, but I spaced it out some more and that appears to be ok, although I need to test some more with different screen configurations.  But there is a positioning issue there.

The other issue was regarding an interaction with the menu.  When the page first loaded, the menu looked fine.  After I selected a row in the grid however, the contents of the two top level menu items that had children were duplicated 10 more times in each one.  I checked, and the post back was occurring just once for the row selection, and it was properly marked as a post back.

I wasn't tying the grid to the menu in any way.  However, on a hunch, I set the FilterMenu Enabled property to False on the grid.  This seems to have remedied the problem, although I don't know why it would automatically be doing anything with that menu.
Shinu
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
166 views
I have  RadGrid that has multiple headers. I use GridTemplateColumns to get this effect. I want to colorize a certain row in this header. When I set that row's background color what happens is that just the text cell gets the color and not the entire row cell. Please see attached for desired effect. The inner table won't accept the color right.
Shinu
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
101 views
Hi,

I'm following the example for Insert/Update/Delete at database level with queries
http://www.telerik.com/help/aspnet/grid/grdinsertupdatedeleteatdatabaselevel.html

during the insert section, I received the following error:
Unable to cast object of type 'Telerik.Web.UI.GridDataInsertItem' to type 'Telerik.Web.UI.GridEditFormInsertItem'.

the following contains my code behind.

protected

 

 

void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)

{

try

{

//Get the GridEditFormInsertItem of the RadGrid

GridEditFormInsertItem insertedItem = (GridEditFormInsertItem)e.Item;

RadComboBox RadCombobox = insertedItem.FindControl("RadComboBoxArea") as RadComboBox;

string strArea = RadCombobox.SelectedItem.Text; //Area

 RadCombobox = insertedItem.FindControl(

 

 

"RadComboBoxFMT") as RadComboBox

string strFMT = RadCombobox.SelectedItem.Text; //FMT or Asset

RadCombobox = insertedItem.FindControl( 

"RadComboBoxField") as RadComboBox

string strField = RadCombobox.SelectedItem.Text; //Field

 RadCombobox = insertedItem.FindControl(

 

 

"RadComboBoxWell") as RadComboBox;  

string strWell = RadCombobox.SelectedItem.Text; //Well 

RadCombobox = insertedItem.FindControl( 

"RadComboBoxUnloadType") as RadComboBox;  

string strUnloadType = RadCombobox.SelectedItem.Text; //Unload Type  

 

RadDatePicker EventStartDateTime = (RadDatePicker)insertedItem["EventStartDateTime"].Controls[0]; //Events start date time  

 

string strEventStartDateTime = EventStartDateTime.SelectedDate.ToString();  

RadDatePicker EventEndDateTime = (RadDatePicker)insertedItem["EventEndDateTime"].Controls[0]; //Events end date time

string strEventEndDateTime = EventEndDateTime.SelectedDate.ToString();

string CountofEvents = (insertedItem["CountofEvents"].Controls[0] as RadNumericTextBox).Text; //Count of Events

string SalesLinePressure = (insertedItem["SalesLinePressure"].Controls[0] as RadNumericTextBox).Text; //Sales Line Pressure

string ShutInPressure = (insertedItem["ShutInPressure"].Controls[0] as RadNumericTextBox).Text; //Shut In Pressure

string FOpHierarchyID = (insertedItem["FOpHierarchy_ID"].Controls[0] as TextBox).Text; //FOpHierarchy

 }

 

catch (Exception ex)

 {

RadGrid1.Controls.Add( 

new LiteralControl("Unable to insert Event. Reason: " + ex.Message));

 

e.Canceled =

 

true;

 

}

}

Please assist.
thanks,
Minh Bui

Shinu
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
98 views
I am having a problem with autocomplete functionality of the RadComboBox when the combobox receives focus by tabbing into it. Everything works fine if you click into the combobox to give it focus. I was able to reproduce this problem using the following autocomplete demo:

http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/autocompleteclientside/defaultcs.aspx

First, unselect the Allow custom text option button. If you then click on the Autocomplete Separator combobox and hit TAB to send focus to the main combobox and type the letter 'a', nothing happens. When you type any other letter, for example 'z', the first 'a' entry is selected, in this case 'alejandra@telerik.com'.

I reproduced using IE 8. I have not looked into other browsers.

We have several forms in our application where the user will tab through and enter values. This autocomplete bug will surely be an issue for them. Thanks.

Damian Martinez
Harris Computer Systems
Thad
Top achievements
Rank 2
 answered on 08 Aug 2011
4 answers
152 views
Hi,
I build an aspx page which contains only one RadTabStrip and its RadMultiPage.

In the page_load event (in the behind code), I build dynamically the RadTabStrip and the RadMultiPage
protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            string[] arguments = Session[SessionParameterName.LISTDOCTOVISU] as string[];
            for (int i = 0; i < arguments.Length; i++)
            {
                AddTab(arguments[i]);
                AddPageView(RadTabStripDocView.Tabs[i]);
            }
        }      
    }

For each value the named Session field, i create a RadTab and a PageView, like in the live demo example.
I also implemented the function AddTab and AddPageView
private void AddTab(string codeDoc)
    {
        RadTab tab = new RadTab();
        tab.Text = codeDoc;
        tab.Attributes.Add("CodeDoc", codeDoc);
        tab.Value = codeDoc;
        RadTabStripDocView.Tabs.Add(tab);
    }
 
    private void AddPageView(RadTab tab)
    {
        RadPageView pageView = new RadPageView();
        pageView.ID = "PageView_ID_" + tab.Value;
        pageView.Attributes.Add("CodeDoc", tab.Value);
        RadMultiPageDocView.PageViews.Add(pageView);
        tab.PageViewID = pageView.ID;
    }

and the event PageViewCreate on the RadMultiPage
protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
    {
        string codeDoc = e.PageView.Attributes["CodeDoc"];
        if (!string.IsNullOrEmpty(codeDoc))
        {
            string userControlName = "usercontrol/ViewerDocument.ascx";
            ViewerDocument userControl = Page.LoadControl(userControlName) as ViewerDocument;
            userControl.ID = e.PageView.ID + "_ViewerDocument";
            userControl.CodeDoc = e.PageView.Attributes["CodeDoc"];
            e.PageView.Controls.Add(userControl);
        }
    }


My user control content:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ViewerDocument.ascx.cs"
    Inherits="Class_iWebAsp.usercontrol.ViewerDocument" %>
<telerik:RadCodeBlock runat="server" ID="PreviewDocumentForMultiDocCodeBlock">
    <script type="text/javascript">       
    </script>
</telerik:RadCodeBlock>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadToolBarPaging">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadSplitter1" LoadingPanelID="RadAjaxLoadingPanel1"  />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
<telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%"
    Orientation="Horizontal">
    <telerik:RadPane ID="RadPaneToolBarPaging" runat="server" Scrolling="None" Height="35px"
        Width="100%">
        <telerik:RadToolBar ID="RadToolBarPaging" runat="server" AutoPostBack="true" OnButtonClick="RadToolBarPaging_buttonClick"
            Width="100%">
            <Items>
                <telerik:RadToolBarButton ImageUrl="../images_toolbar/arrow_first.gif" Value="first">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton ImageUrl="../images_toolbar/arrow_prev.gif" Value="prev">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton IsSeparator="true">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton PostBack="false" Value="info">
                    <ItemTemplate>
                        <asp:Label ID="LabelInfo" runat="server" Text="Page 1/1"></asp:Label>
                    </ItemTemplate>
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton IsSeparator="true">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton ImageUrl="../images_toolbar/arrow_next.gif" Value="next">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton ImageUrl="../images_toolbar/arrow_last.gif" Value="last">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton IsSeparator="true" />
                <telerik:RadToolBarButton ImageUrl="../images_toolbar/zoom_arriere_16x.png" Value="zoommois"
                    PostBack="false">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton ImageUrl="../images_toolbar/zoom_avant_16x.png" Value="zoomplus"
                    PostBack="false">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton IsSeparator="true">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton ImageUrl="../Icons/pdf.jpg" Value="saveas" Target="_blank"
                    PostBack="false" ToolTip="Télécharger(version PDF)">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton ImageUrl="../Images/saveas.gif" Value="saveasOri" Target="_blank"
                    PostBack="false" ToolTip="Télécharger(vesion original)">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton ImageUrl="../Images/print.gif" Value="print" PostBack="false"
                    Visible="false" ToolTip="Imprimer">
                </telerik:RadToolBarButton>
            </Items>
        </telerik:RadToolBar>
    </telerik:RadPane>
    <telerik:RadPane ID="RadPanePreviewDoc" runat="server">
        qsfhklqjfqklsfqklfjqlfjqlkf
    </telerik:RadPane>
</telerik:RadSplitter>
<asp:HiddenField ID="HiddenFieldPageNumber" runat="server" Value="1" />
<asp:HiddenField ID="HiddenFieldPageTotal" runat="server" Value="1" />

So When I click on the RadToolBarButton the ajax Postback is well fired, the second times is a not an ajax postback it's a simple postback, the RadAjaxManager is not on ajaxrequest, and my usercontrols disappear.

Could you help me?
Pavlina
Telerik team
 answered on 08 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?