Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
152 views
Hi,
I have a 3 level hierarchical grid.It is populated programatically (i.e. through 'DetailTableDataBind')

Each row in the middle-level grid has a hyperlink, which if pressed causes a dialog to be displayed (through RadWindowManager).

When the dialog is closed (by clicking 'Save'), the dialog closed, and calls a 'refreshGrid' function in the parent.

The 'refreshGrid' then does a 'ajaxRequest("RebindAndNavigate")'.

All pretty standard stuff, except it doesn't seem to refresh the contents of the 3rd level grid.

Am I missing something- does the rebind refresh all displayed 'programmatic-populated' children tables?

Cheers,
Steve


Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Jul 2012
2 answers
91 views
Hi Team,
I have a radgrid which I want to refresh when File Save Dialogue box is closed.

This is my code behind.

protected void btnPayment_Click(object sender, EventArgs e)
{
   try
    {
             // do some stuff...
           
           // This code below opens the Save File Dialogue box ..
 
 String FilePath = Server.MapPath(".\\GiroPayments\\" + FileName + "");
 System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
 response.ClearContent();
 response.Clear();
 response.ContentType = "text/plain";
 response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ";");
 response.TransmitFile(FilePath);
 response.Flush();
 response.End();
 
 rgGiroPayments.Rebind();   
    }
   catch() {}
}


If I comment this code to open save file dailogue box, grid gets refreshed. There is some prob with that code..
Could you help me out ?

Thanks,
Lok..
Lokesh
Top achievements
Rank 1
 answered on 03 Jul 2012
1 answer
90 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
153 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
97 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
186 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
51 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
292 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.6K+ 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
71 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
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?