Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
74 views
Generally a stored procedure will be more efficient than raw sql when querying a sql server database. I'm just wondering does it effect the load on demand feature of RadComboBox in any way?

As I don't understand the method it's using to pull down partial results from the database, I don't know which is more efficient. Am I better off setting up a SqlDataSource with a select statement in it or just point it at a stored procedure - does it make any difference?
Boyan Dimitrov
Telerik team
 answered on 21 Nov 2013
1 answer
73 views
Hi
i have a grouped radgrid, using groupbyexpression. I want to get the count of rows in each grouped header. How to do it?
Princy
Top achievements
Rank 2
 answered on 21 Nov 2013
7 answers
218 views
Hello,

I have the following  scenario:

1. RadWindow on MasterPage
2. RadAjaxPanel on content page
3. "closeRadWindow" method in a js file
4. My guide was this post

I'm trying to make an ajax request to the radAjaxPanel on the content page when the radWindow is closed.
So far I came up with the following:

function closeRadWindow(ajaxPanelID) //ajaxPanelID is the ClientID of the RadAjaxPanel on the content page
{
var docum = GetRadWindow().BrowserWindow.document;
var jqueryAjaxPanel = $(docum).find(ajaxPanelID);
jqueryAjaxPanel.ajaxRequest("Rebind"); //ERROR HERE GetRadWindow().close();
}

The error states something like "object does not have an ajaxRequest method".
PS:
- The jqueryAjaxPanel variable is set correctly(jqueryAjaxPanel.html() returns it's html) but it is not of type RadAjaxPanel.
- I do not want to create a JS function on the content page that will make the ajaxRequest
Any suggestions? 
Thank you!

Marin Bratanov
Telerik team
 answered on 21 Nov 2013
2 answers
115 views
Hi,

On my PageMaster i have a RadMenu:

<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="PageMaitre.Master.vb"
    Inherits="LOSCOM.PageMaitre" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    <title id="WindowTitle" runat="server">Logistique Suivi Commercial</title>
    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
    <link href="Styles/Menu.MetroCustom.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="CPH_HTML_HEAD" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="Form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div id="canevas">
        <header>
            <p id="droite">
                <asp:Label ID="lbl_TitrePage" runat="server" Text="titre"></asp:Label>
                  
            </p>
            <p id="gauche">
                 <asp:Image runat="server" ImageUrl="~/Gen_Images/logo.png" /></p>
        </header>
        <div id="nav" visible="true" runat="server">
            <nav>
                <telerik:RadMenu ID="RadMenu1" runat="server" CssClass="RadMenu_Menu" ClickToOpen="True"
                    ExpandAnimation-Type="OutQuart" DefaultGroupSettings-RepeatDirection="Vertical" >
                </telerik:RadMenu>
                <asp:ContentPlaceHolder ID="CPH_Menu" runat="server">
                </asp:ContentPlaceHolder>
            </nav>
        </div>
        <div id="section" visible="true" runat="server">
            <section>
                <asp:ContentPlaceHolder ID="CPH_Page" runat="server" />
                <br />
                <br />
            </section>
        </div>
        <asp:ContentPlaceHolder ID="CPH_Footer" runat="server">
        </asp:ContentPlaceHolder>
        <footer>
            <p id="droitef">
                <asp:Label ID="lbl_UserInfo" runat="server" Text=""></asp:Label>
                 </p>
            <p id="gauchef">
                <asp:Label ID="Lbl_IDApplication" runat="server" Text=""></asp:Label>
                 </p>
        </footer>
    </div>
    </form>
</body>
</html>


And for fed this RadMenu i use a .xml:

<?xml version="1.0" encoding="utf-8"  ?>
 
<Menu>
  <Group>
    <Item runat="server" Text="Accueil" Href="~/Default.aspx" hzbouton="Accueil"
      Title="Accueil" Description="Logistique Suivi Commercial - Accueil" resourceKey="accueil">
    </Item>
 
  </Group>
</Menu>

i want Translate that menu on English but i don't know how make on my .rscx i have use
Name:         Value:
accueil.Text  Accueil
And on my en.rscx:
Name:       Value:
accueil.Text Home Page

But no translation run when I select my language ...

Regards.
Alexandre
Top achievements
Rank 1
 answered on 21 Nov 2013
9 answers
204 views
grrr...I had this working at one point and now I can't seem to figure out what's going on.

I have a page in Sitefinity 4.0 (was in 3.7) with a user control with a RadGrid in edit mode with a single record...basically I'm using it as an input form.

I'm putting the grid into edit mode in my Page_Load event using the following...
protected void Page_Load(object sender, EventArgs e)
{
    // Put the grids into edit mode on the selected request
    for (int i = 0; i < RadGrid1.PageSize; i++)
    {
        RadGrid1.EditIndexes.Add(i);
    }
}

I have a RadButton declared outside the grid as follows...
<telerik:RadButton ID="RadButton1" Skin="Default" Text="Save" Font-Underline="false"
    OnClick="RadButton1_Click" AutoPostBack="true" UseSubmitBehavior="false" runat="server" />

and the Ajax settings for this page as follows:
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadButton1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Skin="Default" runat="server" />

and here is the button click event...
protected void RadButton1_Click(object sender, EventArgs e)
{
    EISDataContext db = new EISDataContext();
 
    // Get access to the grid edit item
    GridItem[] items1 = RadGrid1.MasterTableView.GetItems(GridItemType.EditFormItem);
     
    for (int i = 0; i < items1.Length; i++)
    {
        GridEditableItem item = (GridEditableItem)items1[i];
 
        // LINQ code to update database...
    }
 
    // Reset the edit index and rebind the grid
    RadGrid1.EditIndexes.Clear();
    RadGrid1.EditIndexes.Add(0);
    RadGrid1.Rebind();
}

The update code works great and the database is updated with the new values when I click the RadButton, and I see the ajax image over the grid, but the values don't update on the grid unless I do a complete page refresh or press the RadButton again. The funny thing is if I keep pressing the RadButton, the values change back and forth from the old values to the new values.

Can you see what I'm missing? Could it be something in the change to Sitefinity 4.0 that's handling ajax requests differently that's causing the issue? Thanks.
Maria Ilieva
Telerik team
 answered on 21 Nov 2013
4 answers
389 views
Hello,

Seems simple, but how do I get the MaxFileSize client side? I've created a standard JS function for validation:
function OnClientValidationFailed(sender, args) {
    try {
        var fileExtention = args.get_fileName().substring(args.get_fileName().lastIndexOf('.') + 1, args.get_fileName().length);
        if (args.get_fileName().lastIndexOf('.') != -1) {//this checks if the extension is correct
            if (sender.get_allowedFileExtensions().indexOf(fileExtention) == -1) { //alert("Wrong Extension!");
                var msg = 'The file upload has failed because this is not an allowed extension. Allowed extensions are {0}.';
                msg = msg.replace("{0}", sender.get_allowedFileExtensions());
                radalert(msg, 400, 200, 'The file upload has failed.', null, null);
            }
            else { //alert("Wrong file size!");
                var msg = 'The file upload has failed because the file is to large. Maximum file size allowed is {0} Kb.'
                msg = msg.replace("{0}", 4096000 / 1024);
                radalert(msg, 400, 200, 'The file upload has failed.', null, null);
            }
        }
        else { //alert("not correct extension!");
          var msg = 'The file upload has failed because this is not an allowed extension. Allowed extensions are {0}.';
            msg = msg.replace("{0}", sender.get_allowedFileExtensions());
            radalert(msg, 400, 200, 'The file upload has failed.', null, null);
        }
    }
    catch (ex) {
        alert("JS Error #1311161741:" + ex);
    }
    setTimeout(function () { sender.deleteFileInputAt(0); }, 10);
}

(Hope it helps others)
I thought it useful to inform the user that not only the file is to large, but also what the maximum file size is. Since this is a function that is used for many purposes, I want the function to retrieve something like: sender."get_maxFileSize"? So, get the MaxFileSize via the sender.

Thanks in advance,

Erik
Kate
Telerik team
 answered on 21 Nov 2013
4 answers
103 views
Hi,

My users have reported that they cannot see the telerik controls on the page, namely radcombobox and radlistbox buttons, in IE 9 and 10.
Please note that I tested those versions, and I dont get any error, so I can't reproduce the client error.
Here is a screenshot of the defective page:
http://i43.tinypic.com/104orpu.jpg
and a screenshot of what I see:
http://i41.tinypic.com/20auw43.jpg

The project is in asp.net .Net 4.0 and the telerik controls version are 2013.2.717.40.
As of the web page, the controls are within an radajaxpanel.
Here's an excerpt of the code: http://pastebin.com/LWqz2J7g
The controls use Sunset skin, and in the webconfig there's a  <add key= "Telerik.Skin" value "Sunset" />
Any help?
Thanks.
Edgar
Top achievements
Rank 1
 answered on 21 Nov 2013
1 answer
96 views
Hi Admin,

I am binding a RadGrid using the Client-side binding method. My grid consists of template columns with text boxes and dropdowns. I am able to bind the grid. But my problem is the Grid loads the template column controls only till the 11th row. The controls are not bound at all from Row no. 12 (Literally empty). Instead it shows the normal GridBoundColumns. Can you please help me out in this issue?

P.S: Attached is the screenshot of the behaviour.
Eyup
Telerik team
 answered on 21 Nov 2013
2 answers
96 views
Now I need to apply a CSS class to one of the axis labels, e.g. set a label to bold

What is the recomended method for doing this?

Tony
Top achievements
Rank 1
 answered on 21 Nov 2013
1 answer
139 views
Hi,

I am using Telrik Controls for ASP.NET Version Q2 2012 released 06/07/2012.
I want to implement bulk update functionality for RADGRID as mentioned below.
1 User will double click the cell/row and it will allow user to modify data
2 User will modify as many rows as he/she wants and finally click on Submit button
3 Only modified rows should get updated to detabase

Also I am binding the deta on NeedDetasource event.
I check the toutorial for batch update but it is not supporting "Batch" property under Edit mode for Master view.

please let me know how can i implement this functionality.
Princy
Top achievements
Rank 2
 answered on 21 Nov 2013
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?