Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
195 views
Hello all,

I have really two problems, but they are connected to each other, so I will explain both in this thread. 

Problem 1 - Loading panel - Master Page

I have been at this for a while, and even though I am following the code sample from here: http://www.telerik.com/help/aspnet-ajax/ajax-show-loadingpanel-on-initial-pageload.html the Loading Panel is not working.

Code for Main.Master:

<telerik:RadCodeBlock runat="server">
    <script type="text/javascript">
 
        function pageLoad(sender, eventArgs) {
            if (!eventArgs.get_isPartialLoad()) {
                $find("<%=RadAjaxManager1.ClientID%>").ajaxRequest("InitialPageLoad");
            }
        }
.....


<form id="form1" runat="server">
         
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="MainContentPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
......


        <div id="mainContent">
            <section class="container-content">
                <div class="bottom-container-content">
                    <div class="content-page">
 
                        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
                        <asp:Panel ID="MainContentPanel" runat="server">
                            <asp:Panel ID="AjaxMainContentPanel" runat="server" Visible="false">
                                <asp:ContentPlaceHolder ID="MainContent" runat="server"></asp:ContentPlaceHolder>
                            </asp:Panel>
                        </asp:Panel>
 
.......

Code for Main.Master.vb:

Private Sub RadAjaxManager1_AjaxRequest(sender As Object, e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
 
    If e.Argument = "InitialPageLoad" Then
        AjaxMainContentPanel.Visible = True
    End If
 
End Sub


Symptoms:

Although the page seems to load in the correct order, master and content page layout, menus, images, etc... the RadAjaxLoadingPanel does not show. 
I have a RadGrid on the content page being loaded from some very heavy queries which can take up to 5 seconds, and the place where the grid would show is blank until the data is loaded. 


Problem 2 - RadGrid's NeedDataSource event will not fire with the above scenario:


 Code for Content.aspx:

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
     
    <telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="AjaxManagerProxy1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rdList" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
 
    <telerik:RadGrid ID="rdList" runat="server" AllowPaging="False" Skin="Silk" AllowMultiRowSelection="true" AutoGenerateColumns="false">
        <MasterTableView>
            <Columns>
 
.....

Code for Content.aspx.vb:
Private Sub rdList_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rdList.NeedDataSource
 
    LoadGrid()
 
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
    If Not Page.IsPostBack Then
 
 
    Else
        If PageIsLoaded.Value <> "true" Then
            rdList.Rebind()
            PageIsLoaded.Value = "true"
        End If
    End If
 
End Sub


Symptoms:

On the initial page load (I haven't gotten to the point where I have any PostBack on the Content page yet), the NeedDataSource event will not fire.
The solution I found was to call the Grid's Rebind() method on the Content page's Page_Load method. However, I am not sure that this is correct. To me it seems an unnecessary action. And I had to use a Hidden Field so that I could check whether or not it's been called so that I don't do any unnecessary rebinds, and it only happens on the initial page load.

Can anyone help?

Thanks!!!




















Maria Ilieva
Telerik team
 answered on 24 Nov 2014
1 answer
75 views
The 2014Q3 release brought about the edit popup dialog.
Will there be any chances to add customn properties to this (and hide default ones)?

Bozhidar
Telerik team
 answered on 24 Nov 2014
1 answer
101 views
Hi,

in my application i have a button that displays a modal popup. in that Modal i have a button that displays another modal popup.
the issue is the second popup shows behind the first one. I have read where people are suggesting using setActive to bring the second modal forward (ontop)
however when i try and get do this using the following code.

                      window.parent.purchaseLicense(licenseTypeId, ownerId, licenseIdToUpgrade, onLicensePurchased);
                      oWindow = window.frameElement.radWindow;
                      setTimeout(function () { oWindow.setActive(true); }, 0);
                   
Owindow is coming back with the first Modal.

How can i get the second modal and show that ontop?
As you can see the second modal is coming  from the parent because i don't want it to be inside the other.


thoughts?




Marin Bratanov
Telerik team
 answered on 24 Nov 2014
2 answers
358 views
My grid has a <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="30px" /> column to start things out. I am then trying to follow this example http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html in order to keep track of what rows I've selected.

However, I find that the javascript event for selecting a row only fires when I press the checkbox in the header ("select all"). And it fires once for every visible row, of course. Why isn't it firing when I click on the checkboxes next to an individual row?
C
Top achievements
Rank 1
 answered on 24 Nov 2014
1 answer
746 views
Just started learning Telerik APIs.  Using C# / Linq.  Reading up on MasterTableView and trying to hook up a simple grid which lists row data from an Orders table, including one column that lists the Name (a GridDropDownColumn) from a Customers table. So far no name is being displayed.

Where do I set datasource for the Customers table - how do I hook this up?
Thanks.
====
CREATE TABLE Customers
  (
    ID int NOT NULL IDENTITY(1,1) PRIMARY KEY,
    Name varchar(128) NOT NULL
  )

CREATE TABLE Orders
  (
    ID int NOT NULL IDENTITY(1,1) PRIMARY KEY,
    Description varchar(32) NOT NULL,
    CustomerID int NOT NULL FOREIGN KEY REFERENCES Customers(ID)
  )


    <telerik:RadGrid runat="server" ID="RadGrid_Order" AutoGenerateColumns="false" AllowPaging="true"
        OnNeedDataSource="RadGrid_NeedDataSource" OnUpdateCommand="RadGrid_UpdateCommand"
        OnItemCreated="RadGrid_ItemCreated" OnDeleteCommand="RadGrid_DeleteCommand"
        OnInsertCommand="RadGrid_InsertCommand" OnItemDataBound="RadGrid_ItemDataBound">
        <MasterTableView DataKeyNames="ID" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage" EditMode="InPlace">
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                <telerik:GridBoundColumn DataField="ID" HeaderText="ID" ReadOnly="true" ForceExtractValue="Always" ConvertEmptyStringToNull="true" />
                <telerik:GridBoundColumn DataField="Description" HeaderText="Description" />
                <telerik:GridDropDownColumn UniqueName="RadCombo_Customer" HeaderText="Name" DropDownControlType="RadComboBox"
                    DataField="CustomerID" ListDataMember="Customers" ListValueField="ID" ListTextField="Name" />

                <telerik:GridButtonColumn ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
            </Columns>
            <EditFormSettings>
                <EditColumn ButtonType="ImageButton" />
            </EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>

        protected void RadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
           RadGrid_Order.DataSource = OrdersTable.DataSource();  // query returns SELECT * FROM Orders;
        }


Radoslav
Telerik team
 answered on 24 Nov 2014
1 answer
104 views
I would like to add a control (ie: button) to the header of my node, essentially to the right of the rendered text field.  

I have an Item template defined for the data bound items, but haven't be able to figure out how to add a control to the node or specify a template for the node itself.

See attached picture for an example of what I am trying to achieve.
Peter Filipov
Telerik team
 answered on 24 Nov 2014
1 answer
224 views
Hi all,

I am experiencing some strange things. It could be safari/ios, but my dropdownlist used to worked
on safari, iphone and ipad. But it's not working anymore due to an update i guess.

When i click on the drop down-arrow, nothing happens.
Is there anyone who can give me a help on this

thanks

Richard


Dimitar
Telerik team
 answered on 24 Nov 2014
1 answer
221 views
is there any way to wait for savechanges to complete before calling another action? i need to make sure my form doesn't submit until it's finished. and then i need to submit my form
Maria Ilieva
Telerik team
 answered on 24 Nov 2014
1 answer
213 views
I have a requirement to display data in a ASP.NET grid.  The columns are dynamically created as the table source is selected by the user and is not known at design time.  I am able to build the data table with the respective column names and display the data in the grid.  This is working OK, but I also have a requirement to color code specific columns.  The data source that I am display is the results on a data compare process so I have columns named MYFIELD1_S and MYFIELD1_T where the _S and _T represents the source and target.  I am need to compare the values in MYFIELD1_S versus MYFIELD1_T and if the values are different then color code MYFIELD1_T. 

I have some logic that is looking for the column name ending with "_T", get the column index and compare it to the column index-1 (i.e. the _S column).  But I have been having a hard time getting the column index.  I have tried the ItemCreated and ItemDataBound events without any luck and have looked at prerender.  I have this function working perfectly for a WinForm grid using CellFormatting event, but this does not exist in ASP.NET and we are moving from a WinForm app to ASP.NET

How is the best way to handle this requirement?
Scott Manning
Top achievements
Rank 1
 answered on 24 Nov 2014
7 answers
214 views
Hello,

I am working on a project with RadGrid.

My site is multilingual and therefore I use RadGrid.Main.resx.
There is a problem / bug in RTL languages.
If I use DateRange filter and I use Hebrew as my language:
A. The fields “From” and “To” are not translated into Hebrew.
B. The filter is not up to par with RTL, but remained in LTR / or it aligns wrong is not exactly clear. See attached picture

 I will be happy to receive a solution.

Thanks,
Daniel
Daniel
Top achievements
Rank 1
 answered on 23 Nov 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?