Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
331 views
Hi,

I have a radgrid using the the GridClientSelectColumn with AllowMultiRowSelection = true. The table is rendered with a checkbox in the header to allow a user to select/deselect all rows with one click.

I've wired up the grid using OnRowSelected/OnRowDeselected, so that any selection changes cause some code to run where I do some summarization calculations for display.

This works great, when the user is manually checking/unchecking a row themselves, but in a scenario I'm testing I have 100 rows, and the user clicks the Select all checkbox. This causes the grid to trigger the OnRowSelected event 100 times, which is taking too much time (and I get a slow script error in IE 8).

Is there any easy way to detect when the Select All checkbox is checked or unchecked, and handle this appropriately, so that my summarization code is only called once, not on every OnRowSelected/OnRowDeselected which is triggered?

If not, I may have to hide the original select all checkbox, and recreate this functionality myself, but I'd rather not.

Someone else had this same sort of issue here: http://www.telerik.com/community/forums/aspnet-ajax/grid/detect-final-onrowselected-and-onrowdeselected.aspx

but the solution doesn't work for me, as I need to do the summary on every row select/deselect...

Thanks,
Rich

Kostadin
Telerik team
 answered on 26 Apr 2013
1 answer
195 views
I would Like to popup a window after I click some button and it works.

But After I click the Maximize on the window and click the Restore, it change to Normal but It still loading.....the mouse does not return to normal.

I do not know why... Anybody knows I will appreciate it.


<telerik:RadWindowManager ID="RadWindowManager1" VisibleStatusbar="false" runat="server" Skin="Office2007" EnableShadow="true" Modal="true">
<windows>
<telerik:RadWindow ID="MapBBSPopup" runat="server" DestroyOnClose="false" 
            Height="370px" Width="400px" Left="150px"
            Behaviors="Default" OnClientClose="MapBBSPopupClose" Modal="true"/>
</windows>
</telerik:RadWindowManager>
Marin Bratanov
Telerik team
 answered on 26 Apr 2013
4 answers
204 views
Hello,

I was wondering if someone could direct me to sample code on creating a Radgrid through JavaScript on the client.

I am creating a Multipage view on the client and I want to add a RadGrid in the PageView.

My javascript for the page view is:
var pageView = new Telerik.Web.UI.RadPageView();
 mymultiPage.get_pageViews().add(pageView);
pageView.get_element().
innerHTML = function to create RadGrid(); 

I would be trying to fire the RenderControl method of the RadGrid to get the Html which will go into the innerHTML of the page view.

Thanks
Dan Cao
Top achievements
Rank 1
 answered on 26 Apr 2013
3 answers
158 views
Hi,

I have my code shown like below:



<

 

 

telerik:RadScriptManager ID="RadScriptManager" runat="server">

 

</telerik:RadScriptManager>

 

<radW:RadWindowManager ID="RadWindowManagerDefineView" runat="server" RadControlsDir="~/Includes/RadControls"

 

Skin="Office2007" ClientCallBackFunction="CallBackFunction">

 

<Windows>

 

<radW:RadWindow ID="RadWindowDefineView" ReloadOnShow="true" Top="5px" Modal="true"

 

Behavior="Close" runat="server" NavigateUrl="ModifyFilters.aspx"

 

RadControlsDir="~/Includes/RadControls" Width="560px" Height="582px"></radW:RadWindow>

 

</Windows>

 

</radW:RadWindowManager>

<
asp:UpdatePanel ID="testPanel" runat="server">
<ContentTemplate>
<div id="divHeader">
    <center>
        <table style="width: 95%">
            <tr>
                <td>
                    Age:
                </td>
                <td>
                    <cc2:Filter ID="msAccountWasAge" runat="server" ListSize="8" PromptClass="FilterLabel"
                        ImageClass="MSDDImg" ImagePath="../../Images/pullDown.JPG" ListBoxClass="MSDDListBox"
                        TextBoxClass="MSDDTextBox" ZIndex="300" />
                </td>
                <td>
                    Country:
                </td>
                <td>
                    <cc2:Filter ID="msCountry" runat="server" ListSize="9" PromptClass="FilterLabel"
                        ImageClass="MSDDImg" ImagePath="../../Images/pullDown.JPG" ListBoxClass="MSDDListBoxCompare"
                        TextBoxClass="MSDDTextBoxCompare" ZIndex="300" />
                </td>
                <td>
                    <asp:ImageButton ID="ImageButtonRefresh" Height="25px" Style="float: left" OnClientClick="displayWaitAndSetPanel();"
                        Width="25px" runat="server" ImageUrl="../../Images/Refresh.png" />
                    <asp:ImageButton ID="ImageButtonExportExcel" runat="server" Height="25px" Width="25px"
                        ImageAlign="Left" ImageUrl="../../Images/excel.jpg" Style="float: left" AlternateText="Export to Excel">
                    </asp:ImageButton>
            </td>
            </tr>
            <tr>
                <td colspan="6">
                </td>
            </tr>
        </table>
    </center>
</div></ContentTemplate>
</asp:UpdatePanel>
<asp:Button ID="btnAddPanel" runat="server" CssClass="btnSmall" Text="Add Panel" />
<asp:Label ID="lblShowWarning" runat="server" Visible="false" ForeColor="Red"></asp:Label>
<asp:Panel ID="pnlLayout" runat="server" Width="100%" Height="400px">
    <telerik:RadDockLayout ID="RadDockLayout" runat="server" Skin="Office2007" StoreLayoutInViewState="true">
        <telerik:RadDockZone ID="RadDockZone" Width="400px" Height="200px" MinWidth="800px"
            runat="server" Orientation="Horizontal">
        </telerik:RadDockZone>
    </telerik:RadDockLayout>
</asp:Panel>

Where filter is a custom multiselect dropdown control.
When a user clicks on refresh button a custom panel with a grid/RadDock is added to the RadDockZone, this grid has a button which opens a popup using javascript given below:

function ShowModifyFilters(ID) {
            var oManager = GetRadWindowManager();
            var oWnd = oManager.GetWindowByName("RadWindowDefineView");
            oWnd.argument = ID;
 
            if (WindowUrl == null)
                WindowUrl = oWnd.GetUrl();
 
            oWnd.SetUrl(WindowUrl + "?SavedPanelID=" + ID);
            oWnd.Show();
            alert(WindowUrl + "?SavedPanelID=" + ID);
        }

Everything works fine until Export to Excel is clicked. Once its clicked the popup is not shown I can see only alert displaying the url. But I'm able to click on refresh button and Add Panel button which opens same popup fine from server-side. I tried adding PorstBackTrigger to UpdatePanel but it didnt work. Can you please help me find whats wrong with the code?
Marin Bratanov
Telerik team
 answered on 26 Apr 2013
1 answer
50 views
Can I safely upgrade to VS2012 and continue to use v2011.2.712 of the Telerik.Web.UI controls we are using in our web app?

Thanks.
Rumen
Telerik team
 answered on 26 Apr 2013
3 answers
128 views
I have a window which is open on my main page.  I'm using a radsplitter.  I am using getActiveWindow and it returns the correct window.  When I call .close() I get the following $telerik is undefined.  I'm using the latest release.  Clicking the actual close button works with no error, but when I trigger close from my code is when the error shows.  The window does actually close though.

I'm using IE 10.
Marin Bratanov
Telerik team
 answered on 26 Apr 2013
1 answer
89 views
I am using an email validator for one input textbox. 
the validation works but the problem is i cannot move to any other pages without clearing the validation. 

I opened the page if there is not valid email i cannot browse to my navigation links to other pages. 
can this validation only work when the button is clicked.  the button should not be clicked before the email input is validated. but i should be able to leave this page and navigate to some other page and come back later with correct email address

here is the code.
<telerik:RadTextBox ID="UserEmailInput"  runat="server" CausesValidation="True" ValidationGroup="UserInput"
 
                    ToolTip="EnterEmail">
 
                </telerik:RadTextBox><asp:RegularExpressionValidator ID="emailValidator" runat="server"
 
                    Display="Dynamic" ErrorMessage="<br/> Please, enter valid e-mail address." ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"
 
                    ControlToValidate="UserEmailInput">
 
                </asp:RegularExpressionValidator>
 
                <asp:RequiredFieldValidator ID="Requiredfieldvalidator1" runat="server" Display="Dynamic"
 
                    ControlToValidate="UserEmailInput" ErrorMessage="<br/>Please, enter an e-mail!"></asp:RequiredFieldValidator>
 
                <br />
 
                <br />
 
                 <telerik:RadButton ID="UserReport" runat="server" Text="Run Report" OnClick="UserReport_Click">
 
                </telerik:RadButton>
 
                </td>
Prathyusha
Top achievements
Rank 1
 answered on 26 Apr 2013
6 answers
211 views
Hi Telerik,

Unusually, this is related to Chrome rather than IE, as with IE, everything works properly.

I have spent weeks on this issue and have got nowhere. I have read countless forum posts and tried various things I have found but no result.

I have attached two pictures.

One of them, the title of the boxes (some... not all, i.e. Actions is there, but Matters and Documents is not) is missing and the treeview area is all squashed to the left. The other is almost correct, but a lot better than the bad one. As you can see, the titles are all there and you can see the treeview.

When I try a fix that I have found, quite often, it appears to work, but come back half an hour later (after a session timeout I guess) and it has failed again.

The page starts a load to show the title bar. Now, the rendering of the main area of the page can take a while, so we put up a waiting clock thing and use ajax to get the balance of the page. This is done with...
function pageLoad(sender, eventArgs) {
    if (!eventArgs.get_isPartialLoad()) {
        $find('<%= RadAjaxManager.GetCurrent(this).ClientID %>').ajaxRequest("InitialPageLoad");
    }
}

The above calls...
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
    //To produce postback
    if (e.Argument.ToString() == "InitialPageLoad")
    {
        SetupWidgets();
         
        dLoading.Visible = false;
    }
}
 
private void SetupWidgets()
{
    List<DockState> currentStates = CurrentDockStates.OrderBy(cs => cs.Index).ToList();
 
    for (int i = 0; i < currentStates.Count; i++)
    {
        if (currentStates[i].Closed == false)
        {
            CustomRadDock dock = CustomCreateRadDockFromState(currentStates[i]);
            rdlPageDesign.Controls.Add(dock);
            CustomLoadWidget(dock);
        }
    }
 
}

Now, you don't need to understand what SetupWidgets is doing... but it does work. Basically, it gets information about the items (such as action, matters and documents) and loads them into the page.

If I remove the javascript pageLoad and have the setupwidgets called from pageload in codebehind, then everything works perfect EVERY SINGLE TIME.

I have also noted that when it fails, a few things happen...
1. When all the items initially load on the page, the page is squished and then sorts itself out but the documents do not and some of the titles are missing.
2. When I view the css in the dev tools, they are not correct... for example, the Actions title area, which always works the html is...
<em style="display: block;">Actions</em>
but for the documents where it is not working, it is...
<em style="display: block; width: 0px;">Documents</em>
The documents area is in a RadSplitter, It is set as...

<telerik:RadSplitter ID="rsDocumentsView" runat="server" Height="300" width="99%">
If I set  it as a value rather than a percent, it sort of works, but we need dynamic sizing. I have also tried the various resize options and that has failed to work as well. The output shows as...

<div id="ctl00_ContentPlaceHolder1_RadDock58a5fa95adcefa45bea8805a81cfcd8ee6f9_C_ctrl58a5fa95adcefa45bea8805a81cfcd8ee6f9_rsDocumentsView" style="height: 300px; width: 118px;"><div style=""><table id="RAD_SPLITTER_ctl00_ContentPlaceHolder1_RadDock58a5fa95adcefa45bea8805a81cfcd8ee6f9_C_ctrl58a5fa95adcefa45bea8805a81cfcd8ee6f9_rsDocumentsView" class="RadSplitter RadSplitter_Default" cellpadding="0" cellspacing="0" style="width:1px;height:1px;border-left-width:1px;border-top-width:1px;">

so it comes as 118px. No matter what the browser width is, it is allways 118px.

I have also ensured that all the wrapping containers have all their widths set as well, to no avail.

I think my bosses think I am swinging the lead on this.

If you need any more information, please ask. I have provided as much as I can think of.

Thanks.
David.

Slav
Telerik team
 answered on 26 Apr 2013
11 answers
160 views
Hi,

Seems to work a little bit randomly when using checkboxes in the treeview when using Ipad.
Sometimes they get checked and sometimes they don't...
Even in your demo:
http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/checkboxes/defaultcs.aspx

Regards
Caesar
Paul Desormeaux
Top achievements
Rank 1
 answered on 26 Apr 2013
1 answer
164 views
Is it possible to have a DateTime on the x-axis of a Scatter Line chart in the RadHTMLChart? I converted the field in the datatable using ToOADate() but it then shows this converted number on the x-axis instead of the actual date. I then created a new column in the datatable that had the datetime converted to a string and tried to use that as the DataLabelsField in the PlotArea.XAxis to no avail. Is it possible to loop through the xaxis items or add a custom x-axis for a ScatterLine?

Thanks,
Bob
Danail Vasilev
Telerik team
 answered on 26 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?