Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
102 views
I have a RadAjaxManager, which should update a label on click of a button (simplest of tasks I assume.)
<telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Height="75px" Width="75px">

<asp:Label runat="server" ID="lblTest" Text="appears here"/><br/>
<asp:Button runat="server" OnClick="btnTest_OnClick" ID="btnTest" Text="Test"/>
        <telerik:RadAjaxManager runat="server" ID="AjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="btnTest">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="lblTest" LoadingPanelID="AjaxLoadingPanel1"/>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

and in the code behing

        protected void btnTest_OnClick(object sender, EventArgs e)
        {
            lblTest.Text = "12324";
        }

No matther how many times I try, the label could not get updated.
I've used fiddler and part of the response is something like below:

31|updatePanel|lblTestPanel|<span id="lblTest">12324</span>|53|updatePanel|AjaxManager1SU|<span id="AjaxManager1" style="display:none;"></span>


Am I missing anything?



Coax
Top achievements
Rank 1
 answered on 03 Jul 2012
2 answers
183 views
I am using an AutoCompleteExtender for a search textbox and the results go far enough down the page to interfere with a RadGrid. It appears that the z-index of the header on the RadGrid is too high as my autocomplete results appear under the header but over the rest of the RadGrid. Any ideas on how to lay my autocomplete results over the RadGrid header?
License
Top achievements
Rank 1
 answered on 02 Jul 2012
3 answers
111 views

My site has the need to close a menu if the mouse leaves the window (its very close to the left edge, so its easily left open).

As we have multiple menu's on our page, there is the unlikely possibility that more tha none could be left open, so I really wanted to use a jQuery selector to find all menu controls, and fire its close() method when the mouse leaves the window.

I got to this :

 

$telerik.$(document).mouseleave(

    function () {
        $('.RadMenu').close();
        }
);

 


However, the $('.RadMenu').close(); doesn't work - erroring that close() isn't supported. if I go through the results from $('.RadMenu'), they do seem to be the correct elements being returned (HTMLDiv objects).

Can anyone help?

Thanks,

Andrew

Nona
Top achievements
Rank 1
 answered on 02 Jul 2012
1 answer
219 views
Team,

I need to update Header Template controls data from code behind during Item_Databound. Suggest possible solution.

ASPX
-------

                                                    <telerik:GridTemplateColumn UniqueName="Leg" HeaderText="Leg1">
                                                        <HeaderTemplate>
                                                            <asp:HiddenField ID="hdnLeg1" runat="server" />
                                                            <asp:Label ID="lbLeg1" Text="" runat="server" />
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:DropDownList ID="DropDownList1" runat="server">
                                                            </asp:DropDownList>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn UniqueName="Leg" HeaderText="Leg1">
                                                        <HeaderTemplate>
                                                            <asp:HiddenField ID="hdnLeg2" runat="server" />
                                                            <asp:Label ID="lbLeg2" Text="" runat="server" />
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:DropDownList ID="DropDownList2" runat="server">
                                                            </asp:DropDownList>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
.............

ASPX.CS

// Code must update each Hidden variables with it's ID and Label Text for Grid Column Header
 if (e.Item is GridHeaderItem)
                {
                    int PreviousLegIDIndex = 0;
                    int counter = 0;
                    foreach (GridHeaderItem headerItem in dgPassanger.MasterTableView.GetItems(GridItemType.Header))
                    {
                        counter = 0;
                        foreach (var Leg in Log.Legs)
                        {
                            counter++;
                            if (counter > PreviousLegIDIndex)
                            {
                                foreach (var headerControl in headerItem["Leg"].Controls)
                                {
                                    PreviousLegIDIndex = counter;
                                    if (headerControl.GetType() == typeof(Label))
                                    {
                                        Label lbHeader = (Label)headerControl;
                                        lbHeader.Text = tripLeg.POLegsDescription;
                                    }
                                    if (headerControl.GetType() == typeof(HiddenField))
                                    {
                                        HiddenField hdnHeader = (HiddenField)headerControl;
                                        hdnHeader.Value = tripLeg.LegID.ToString();
                                    }
                                }
                                break;
                            }
                        }
                    }
                }

Jayesh Goyani
Top achievements
Rank 2
 answered on 02 Jul 2012
0 answers
66 views
I am dynamically generating a list of columns for a radgrid and everything there is fine the issue that occurs when I'm trying to convert a GridBoundcColumn to a GridDropDownListColumnEditor on the CreateColumnEditor

I was wondering if it was possible to add to add a drop down list, combo box or even a lookup button to the edit template on the radgrid
*Note the datatable is just for testing the columns are coming from a database

Public Property DT As DataTable
     Get
         Return ViewState("DT")
     End Get
     Set(ByVal value As DataTable)
         ViewState("DT") = value
     End Set
 End Property
 
 
 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
     If Not Page.IsPostBack Then
         AddEditColumn()
         DT = GetData()
     End If
 End Sub
 
 
 Private Sub RadGrid1_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
     Me.RadGrid1.DataSource = DT
 End Sub
 
 Sub AddEditColumn()
     If Not RadGrid1.Columns.Contains("GridEditCommandColumn") Then
         Dim EditCol As New GridEditCommandColumn
         RadGrid1.Columns.Add(EditCol)
     End If
 End Sub
 
 Private Sub RadGrid1_CreateColumnEditor(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCreateColumnEditorEventArgs) Handles RadGrid1.CreateColumnEditor
     If (TypeOf e.Column Is GridBoundColumn) Then
         If (CType(e.Column, GridBoundColumn).DataField = "Customer") Then
             e.ColumnEditor = New GridTextBoxColumnEditor
             'e.ColumnEditor.ContainerControl.Controls
         ElseIf (CType(e.Column, GridBoundColumn).DataField = "CustomerType") Then
             'e.ColumnEditor = New GridDropDownListColumnEditor
         End If
     End If
 End Sub
 
 Private Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
     If (TypeOf e.Item Is GridDataItem) Then
         Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
 
     ElseIf (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then
         Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
 
     End If
 End Sub
 
 Private Function GetData()
     Dim datatable As New DataTable
     datatable.Columns.Add("Customer", GetType(String))
 
     datatable.Columns.Add("CustomerType", GetType(String))
     '********************************************************
     'CustomerType is the Column that needs to be a drop down.     
    
'********************************************************
 
     datatable.Columns.Add("QtyOrd", GetType(Integer))
     datatable.Columns.Add("Date1", GetType(Date))
     datatable.Columns.Add("Date2", GetType(Date))
     datatable.Columns.Add("OnTime", GetType(Boolean))
 
     datatable.Rows.Add({("A&A Beef"), ("WHOL"), 1, DateTime.Now, DateTime.Now, False})
     datatable.Rows.Add({("Vegmart"), ("RET"), 8, DateTime.Now, DateTime.Now, False})
 
     Return datatable
 End Function
Andy
Top achievements
Rank 1
 asked on 02 Jul 2012
2 answers
348 views

Hi,

The erra of issues are not just ending for me.

I am trying to use RadWindow control for modal popup in my application. I have encountered one javascript error while page load.

sys.WebForms is undefined

sys.WebForms is undefined -&nbsp;<BR>Error: Sys.WebForms is undefined<BR>Source   
File: <A   
href="http://nfgprimary4/NPO/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&amp;compress=1&amp;_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a3bbfe379-348b-450d-86a7-bb22e53c1978%3aea597d4b%3bTelerik.Web.UI%3aen-US%3a18aed5cb-2fcd-4178-ac4d-382193252b8a%3a16e4e7cd%3af7645509%3aed16cbdc%3a874f8ea2%3a24ee1bba%3a19620875%3a33108d14%3abd8f85e4">http://nfgprimary4/NPO/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&amp;compress=1&amp;_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a3bbfe379-348b-450d-86a7-bb22e53c1978%3aea597d4b%3bTelerik.Web.UI%3aen-US%3a18aed5cb-2fcd-4178-ac4d-382193252b8a%3a16e4e7cd%3af7645509%3aed16cbdc%3a874f8ea2%3a24ee1bba%3a19620875%3a33108d14%3abd8f85e4</A><BR>Line:   
965 

If I use the same code under web application its working fine. But I am hosting my application as WebSite.

Please give me some input asap as I am completely stuck on this.

Regards,
Vinayak
Joshua
Top achievements
Rank 1
 answered on 02 Jul 2012
7 answers
1.7K+ views
Hi, i'm getting this error on this line (window[Sys.WebForms.PageRequestManager.getInstance()._uniqueIDToClientID(this._uniqueID)]=this;)
when use IIS for debugging
and at the same time  sys is not null, but WebForms is null

Moreover RadAjax.Net2 controls work fine, but Telerik.Web.UI don't. 

here is my sample
 
<asp:ScriptManager ID="ScriptManager" runat="server" /> 
 <telerik:RadAjaxManager EnableAJAX=true ID="RadAjaxManager1" runat="server"
</telerik:RadAjaxManager>  

my web config
<httpHandlers> 
            <remove path="*.asmx" verb="*"/> 
            <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> 
            <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> 
            <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> 
            <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/> 
        </httpHandlers> 
        <httpModules> 
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        </httpModules> 
 
 
<system.webServer> 
        <validation validateIntegratedModeConfiguration="false"/> 
        <modules> 
            <remove name="ScriptModule"/> 
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        </modules> 
        <handlers> 
            <remove name="WebServiceHandlerFactory-Integrated"/> 
            <remove name="ScriptHandlerFactory"/> 
            <remove name="ScriptHandlerFactoryAppServices"/> 
            <remove name="ScriptResource"/> 
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <remove name="Telerik.Web.UI.WebResource"/> 
            <add name="Telerik.Web.UI.WebResource" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/> 
 
        </handlers> 
    </system.webServer> 
environment

Visual Studio 2008
Microsoft.Net 3.5 sp1
Vista business sp1 IIS7
Telerik.Web.UI, Version=2008.2.826.35

Any ideas?



Joshua
Top achievements
Rank 1
 answered on 02 Jul 2012
1 answer
90 views
Heya all!
We want to use Telerik .Net Ajax Controllers but we are confused about pricing with developer & product count. We want to use Telerik in more than one product and we have 8-10 developers in our team. But no-one will develope Telerik controls(Maybe just one dev. in some situations). Should we buy more than one license? Can anyone contact me via forum or mail?
James Campbell
Top achievements
Rank 1
 answered on 02 Jul 2012
1 answer
254 views
Dear All,

 We are developing project using asp.net with c sharp  and I have TreeList in my page with checkbox but when i select parent checkbox child checkbox not checked what i need to do solve this..
my aspx code is
                               <telerik:RadTreeList ID="radTreelistLocation" runat="server" OnItemDataBound="radTreelistLocation_ItemDataBound"
    AutoGenerateColumns="false" ParentDataKeyNames="ParentLocationId" AllowMultiItemSelection="true"
    ShowTreeLines="true" OnNeedDataSource="RadTreeList1_NeedDataSource" AllowPaging="true"
    PageSize="50" DataKeyNames="ID" AllowSorting="true">
    <Columns>
        <telerik:TreeListTemplateColumn UniqueName="locationName" HeaderText="Location Name">
            <ItemTemplate>
                <asp:CheckBox ID="chkAssign" runat="server" Checked='<%# Eval("IsChecked") %>' OnCheckedChanged="chkAssign_CheckChanged" />
            </ItemTemplate>
        </telerik:TreeListTemplateColumn>
        <telerik:TreeListTemplateColumn UniqueName="locationName" HeaderText="Location Name">
            <ItemTemplate>
                <asp:Label ID="lblLocationName" runat="server" Text='<%#Eval("Name") %>' />
            </ItemTemplate>
        </telerik:TreeListTemplateColumn>
   </Columns>
</telerik:RadTreeList>
And My aspx.cs page code is.
        protected void Page_Load(object sender, EventArgs e)
        {
             
            if (!Page.IsPostBack)
            {
                PopulateUsers();
                radTreelistLocation.ExpandAllItems();
                bindGrid();
            }
        }
        protected void RadTreeList1_NeedDataSource(object sender, EventArgs e)
        {
            radTreelistLocation.DataSource = _applicationProcess.SelectLocations();
        }
        public void bindGrid()
        {
            List<Location> locationlist = new List<Location>();
            locationlist = _applicationProcess.SelectLocations();
            radTreelistLocation.DataSource = _applicationProcess.SelectLocations();
            radTreelistLocation.DataBind();
            ViewState["location"] = locationlist;
        }
}

Thanks in Advance..!
Tsvetina
Telerik team
 answered on 02 Jul 2012
7 answers
702 views
Hi, I need help with AsyncUpload i dont know  how to hide select button.Help me please.
Mark Hynes
Top achievements
Rank 1
 answered on 02 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?