Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
73 views
Hi,

I am trying to solve this problem since 2days but unable to do.

I am having a radgrid with edit link radbutton, when I click edit button then radwindow will open with rad tree containing some images from local folder and radeditor with data when I drag and drop the image from tree to editor java script error is coming. I have used update panel with radwindow  inside it. 

function isMouseOverEditor(editor,event){


return $telerik.isMouseOverElementEx(editor.get_contentAreaElement(),event)

}




I am getting the error inside the the above javascript. After lots of efforts I found that the above javascript is not getting the id of the rad editor
Ianko
Telerik team
 answered on 28 May 2014
1 answer
145 views
Hi,

We're upgrading our web application from Telerik 2010 to 2014. 
After replacing the DLL files as instructed by Telerik, one functionality seems to broken.
We have a RadTreeView inside a RadPane:

<telerik:RadPane ID="RadPane1" runat="server" Width="14%" Scrolling="Y">
            <telerik:RadTreeView ID="RadTreeViewSideNav" runat="server" TabIndex="1"
                AccessKey="T" AllowNodeEditing="false" ShowLineImages="false"
                OnClientContextMenuItemClicked="RadTreeViewSideNav_ClientContextMenuItemClicked"
                OnClientMouseOut="RadTreeViewSideNav_ClientMouseOut"
                OnClientMouseOver="RadTreeViewSideNav_ClientMouseOver"
                OnClientLoad="RadTreeViewSideNav_ClientLoad"
                OnClientNodeEditing="RadTreeViewSideNav_ClientNodeEditing"
                OnClientNodeClicking="RadTreeViewSideNav_ClientNodeClicking"
                OnClientNodeEditStart="RadTreeViewSideNav_ClientNodeEditStart"
                OnNodeEdit="RadTreeViewSideNav_NodeEdit"
                OnNodeClick="RadTreeViewSideNav_NodeClick">
                <ContextMenus>
                    <telerik:RadTreeViewContextMenu ID="RadTreeViewContextMenuEmpty" runat="server">
                        <CollapseAnimation Duration="20" Type="OutQuint" />
                    </telerik:RadTreeViewContextMenu>
                    <telerik:RadTreeViewContextMenu ID="MainContextMenu" runat="server">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </telerik:RadTreeViewContextMenu>
                    <telerik:RadTreeViewContextMenu ID="MainContextMenu2" runat="server">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </telerik:RadTreeViewContextMenu>
                    <telerik:RadTreeViewContextMenu ID="RadTreeViewContextMenuContact" runat="server">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </telerik:RadTreeViewContextMenu>
                    <telerik:RadTreeViewContextMenu ID="RadTreeViewContextMenuContact1" runat="server">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </telerik:RadTreeViewContextMenu>
                    <telerik:RadTreeViewContextMenu ID="RadTreeViewContextMenuContact2" runat="server">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </telerik:RadTreeViewContextMenu>
                </ContextMenus>
                <CollapseAnimation Duration="100" Type="OutQuint" />
                <ExpandAnimation Duration="100" />
            </telerik:RadTreeView>
            <telerik:RadToolTip ID="tt1" runat="server" Position="BottomRight" Width="170px" Height="20px" Animation="None" Modal="false" ShowCallout="false" AutoCloseDelay="10000">
                <span id="mails" class="formlabel"></span>
                <div id="spanSound"></div>
            </telerik:RadToolTip>
        </telerik:RadPane>

Clicking on the menus of the RadTreeView is supposed to rebind a RadGrid inside another RadPane (separated from the one hosting the
RadTreeView).

Initially, I was receiving this error upon click:
   Uncaught TypeError: Cannot read property 'oldUpdatePanelIDs' of undefined

After searching around, I found out here that removing the RadCompression from web.config may resolve the issue. So I did so.

But now I am having another problem (I am pasting from Google Chrome Developer Tools console log so you know the full error):

Sys.WebForms.PageRequestManagerParserErrorException: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to ...<omitted>...'. Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scm_TSM&compress=1&_TSM_CombinedScripts_=%3b…:6
 
   Error.createTelerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scm_TSM&compress=1&_TSM_CombinedScripts_=%3b…:6
   Sys.WebForms.PageRequestManager._createPageRequestManagerParserErrorTelerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scm_TSM&compress=1&_TSM_CombinedScripts_=%3b…:15
   Sys.WebForms.PageRequestManager._parseDeltaTelerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scm_TSM&compress=1&_TSM_CombinedScripts_=%3b…:15
   Sys.WebForms.PageRequestManager._onFormSubmitCompletedTelerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scm_TSM&compress=1&_TSM_CombinedScripts_=%3b…:15
   (anonymous function)Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scm_TSM&compress=1&_TSM_CombinedScripts_=%3b…:6
   (anonymous function)Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scm_TSM&compress=1&_TSM_CombinedScripts_=%3b…:6
   Sys.Net.WebRequest.completedTelerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scm_TSM&compress=1&_TSM_CombinedScripts_=%3b…:6
   _onReadyStateChange

Any suggestion is appreciated.
Regards.

Radoslav
Telerik team
 answered on 28 May 2014
3 answers
159 views
Hello Telerik,

I have a small issue and maybe you can help me. I have a form where user enters the info. What i want is to convert the html document into pdf on button click without saving the entered info by the user into the database. Can you tell which telerik tool should i use in this case? Thank you. 

here is a simplified version of the form:

<div>
        <asp:Label ID="Label1" runat="server" Text="Label">Please enter your name:</asp:Label><br />
        <br />
        <asp:Label ID="Label4" runat="server" Text="Label">name: </asp:Label>
        <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
        <br />
        <br />
        <asp:Label ID="Label2" runat="server" Text="Label"> Please enter your last name:</asp:Label><br />
        <br />
        <asp:Label ID="Label3" runat="server" Text="Label">lastname:</asp:Label>
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
    </div>


Ianko
Telerik team
 answered on 28 May 2014
4 answers
160 views
Hi,

I would like to set a default group on a rad grid but not allow users to change it. Therefore, I do not want to see the group panel at the top of the grid but still display the actual grouping row in the grid itself. (I hope that is clear!) 

This is what I currently have:

                <telerik:RadGrid ID="rgAdditionalPermissions" runat="server" DataSourceID="odsAdditionalPermissions" GroupingEnabled="true" ShowGroupPanel="false" ClientSettings-AllowDragToGroup="false">
                    <GroupingSettings ShowUnGroupButton="false" />
                    <GroupPanel Enabled="false"></GroupPanel>
                    <MasterTableView AutoGenerateColumns="False" DataSourceID="odsAdditionalPermissions" DataKeyNames="RightId">
                        <CommandItemSettings ExportToPdfText="Export to PDF" />
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldName="RightCategoryName" HeaderText="Category" />
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldName="RightCategoryName" SortOrder="Descending" />
                            </GroupByFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                        <Columns>
                            <telerik:GridBoundColumn DataField="RightName" FilterControlAltText="Filter RightName column" HeaderText="Permission" SortExpression="RightName" UniqueName="RightName">
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkSelected" runat="server" Checked='<%# Bind("Active") %>'/>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                    </HeaderContextMenu>

                </telerik:RadGrid>




If I want the rows of the Grid to be grouped then I have to set GroupingEnabled="true" but despite setting all others, like ShowGroupPanel to false, it still displays the group panel. 

Is it possible to do what I would like RadGrid to do? And if so do you know how I would go about implementing it?

Kind regards
Sidharth


Shinu
Top achievements
Rank 2
 answered on 28 May 2014
2 answers
358 views
Hi

On page load I want to set one of the custom filters if querystring has a value.  I am getting an exception (no items in collection) in my CombineFilters method on line

GridFilteringItem filterItem = grdParts.MasterTableView.GetItems(GridItemType.FilteringItem)[0] as GridFilteringItem;

I believe this is mostly about the order I am doing things in (page load running before filter pre render event) 
but I am not sure how to modify the code to get this working. 

Code attached below

Check QueryString, if company passed in have the filter preselected
protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        BindGrid();
    }
 
    //if (querystring has value)
    //{
        ViewState["CompanyFilterVal"] = "123";
        CombineFilters();
    //}
}

Setting the filter dropdown values on grid item created event
//Item created - binding data to custom company filter 
protected void grdParts_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
    if (e.Item is GridFilteringItem)
    {
        try
        {
            using (MyEntities db = new MyEntities())
            {
                //Set options for the filter controls
                GridFilteringItem filterItem = (GridFilteringItem)e.Item;
 
                RadComboBox CompanyCbo = (RadComboBox)filterItem["Company"].FindControl("cboFilterCompany");
                BindCompanyFilterData(db, CompanyCbo);
 
                //...other filters
        }
        catch (Exception ex)
        {
            ...
        }
    }
}

setting selected value on filter pre render event. 
protected void cboFilterCompany_PreRender(object sender, EventArgs e)
{
    RadComboBox combo = sender as RadComboBox;
    if (ViewState["CompanyFilterVal"] != null)
        combo.SelectedValue = ViewState["CompanyFilterVal"].ToString();
    else
        combo.ClearSelection();
}

method inspects all filters for value and sets grid filter based on filters
protected void CombineFilters()
{
    string filterToApply = "";
    List<string> filtexprn = new List<string>();
 
    ClearFilterFromViewState();
 
    GridFilteringItem filterItem = grdParts.MasterTableView.GetItems(GridItemType.FilteringItem)[0] as GridFilteringItem;
 
    //COMPANY
    RadComboBox cboCompany = (RadComboBox)filterItem.FindControl("cboFilterCompany");
    if (cboCompany.SelectedIndex != -1)
    {
        if(cboCompany.SelectedValue != "All")
        {
            filtexprn.Add("([Company] ='" + cboCompany.SelectedValue + "')");
            ViewState["CompanyFilterVal"] = cboCompany.SelectedValue; //to persist value on postback
        }
    }
 
    //...
     
    //SITE
    RadComboBox cboSite = (RadComboBox)filterItem.FindControl("cboFilterSite");
    if (cboSite.SelectedIndex != -1)
    {
        if (cboSite.SelectedValue != "All")
        {
            filtexprn.Add("([Site] ='" + cboSite.SelectedValue + "')");
            ViewState["SiteFilterVal"] = cboSite.SelectedValue; //to persist value on postback
        }
    }
 
    int count = filtexprn.Count - 1;
    foreach (string s in filtexprn)
    {
        filterToApply += s;
        if (count-- != 0)
            filterToApply += " AND ";
    }
 
    grdParts.MasterTableView.FilterExpression = filterToApply;
    grdParts.MasterTableView.Rebind();
}

grid aspx code
<telerik:RadGrid ID="grdParts" runat="server"
    OnItemCreated="grdParts_ItemCreated"
    OnItemDataBound="grdParts_ItemDataBound"
    OnItemCommand="grdParts_ItemCommand"
    OnNeedDataSource="grdParts_NeedDataSource"
    AllowFilteringByColumn="true" AllowSorting="true"
    AllowPaging="True" PageSize="15" EnableLinqExpressions="false"
    AllowMultiRowSelection="true">
    <PagerStyle AlwaysVisible="true"></PagerStyle>
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="UniquePartID" ClientDataKeyNames="UniquePartID"
        Width="100%" CommandItemDisplay="None" PageSize="15">
        <Columns>
            <telerik:GridBoundColumn DataField="UniquePartID" HeaderText="UniquePartID" ReadOnly="True"
                SortExpression="UniquePartID" UniqueName="UniquePartID" Display="false">
            </telerik:GridBoundColumn>
 
            <telerik:GridBoundColumn DataField="Company" HeaderText="CONO" SortExpression="Company" UniqueName="Company" FilterControlAltText="Filter Company column"
                ItemStyle-Width="4%" HeaderStyle-Width="4%" AllowFiltering="true" AllowSorting="true">
                <FilterTemplate>
                    <telerik:RadComboBox runat="server" ID="cboFilterCompany" AutoPostBack="false"
                        OnPreRender="cboFilterCompany_PreRender"
                        DataValueField="CompanyID" DataTextField="CompanyDescription"
                        Width="100%">
                    </telerik:RadComboBox>
                </FilterTemplate>
            </telerik:GridBoundColumn>
 
            <telerik:GridBoundColumn DataField="Site" HeaderText="Site" SortExpression="Site" UniqueName="Site" FilterControlAltText="Filter Site column"
                ItemStyle-Width="6%" HeaderStyle-Width="6%" AllowFiltering="true" AllowSorting="true">
                <FilterTemplate>
                    <telerik:RadComboBox runat="server" ID="cboFilterSite" AutoPostBack="false"
                        OnPreRender="cboFilterSite_PreRender"
                        DataValueField="SiteDesc" DataTextField="SiteDesc"
                        Width="100%">
                    </telerik:RadComboBox>
                </FilterTemplate>
            </telerik:GridBoundColumn>
 
            ...
 
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="true"></Selecting>
        <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
    </ClientSettings>
    <GroupingSettings CaseSensitive="false" />
</telerik:RadGrid>
Kostadin
Telerik team
 answered on 28 May 2014
1 answer
95 views
Hi Telerik team,

When i am double clicking in the Radgrid displaying/focusing textbox with data. If i have special characters inside the textbox then focus propety is giving error. Kindly help me ASAP.

Please find my code below:

<ClientEvents OnRowCreated="rgManualTestSteps_RowCreated" OnCommand="rgManualTestSteps_RadGrid1_Command"
OnRowClick="rgManualTestSteps_RowClick" OnRowMouseOut="rgManualTestSteps_RowClick"
OnRowDestroying="rgManualTestSteps_RowDestroying" />

function rgManualTestSteps_RowCreated(sender, eventArgs)
{
        var dataItem = eventArgs.get_gridDataItem();
        for (var i = 1; i < dataItem.get_element().cells.length; i++) 
             {
                 var cell = dataItem.get_element().cells[i];
                 if (cell)
                     {
                          $addHandler(cell, "dblclick", Function.createDelegate(cell, rgManualTestSteps_ShowColumnEditor));
                     }
             }
}

function rgManualTestSteps_ShowColumnEditor()
{
             rgManualTestSteps_editedCell = this;
             //hide text and show column editor in the edited cell
             var cellText = this.getElementsByTagName("span")[0];
             if (cellText != undefined)
                  {
                        cellText.style.display = "none";
                        //display the span which wrapps the hidden checkbox editor
                        if (this.getElementsByTagName("span")[1]) {
                        this.getElementsByTagName("span")[1].style.display = "";
                   }
             var colEditor = this.getElementsByTagName("input")[0] || this.getElementsByTagName("select")[0];
             //if the column editor is a form decorated select dropdown, show it instead of the original
             if (colEditor.className == "rfdRealInput" && colEditor.tagName.toLowerCase() == "select") colEditor = Telerik.Web.UI.RadFormDecorator.getDecoratedElement  (colEditor);
             colEditor.style.display = "";
             colEditor.focus();
      }
}
nazeer
Top achievements
Rank 1
 answered on 28 May 2014
3 answers
103 views

Hi,

I have the exact similar scenario which is descrbed in the below thread. The solution suggested by Telerik Team in this thread is given below

1) To drop the resizing and reordering features from this grid.
2) To disable the ViewState of the whole placeholder where you load the RadGrid control. In this scenario have in mind that the SqlDataReader binding may not works, as each postback in the page will make the grid try to rebind and if the reader is currently closed, you will get an exception.

Unfortunately I cannot use the above suggestion as my customer is so particular on the ReOrder functionality.

As it an old thread(2011) My query here is there any solution available for this issue in latest Telerik Controls?

Thanks,
A2H
Eyup
Telerik team
 answered on 28 May 2014
1 answer
308 views
Hi,

A couple of months ago I saw one of the menu demos where one if the menu items was a login.  The item had a user id and password inputs along with a submit button.  I now need to code out something like this but I cannot find the demo as it seems to have been replaced with some newer ones.  Anyway can anyone provide a link to the demo if it still exists or some code samples (either C# or VB is fine) of how to accomplish having the login elements in a Rad Menu?

Thanks in advance...

K
Princy
Top achievements
Rank 2
 answered on 28 May 2014
1 answer
82 views
I have all auto generated columns and some field has a validator.
The problem is that the field with the validator are moved on the right to leave space between the header and the text box making the form really ugly.
See picture attached.

Is there a way to move the validator message on the right of the field so that I can avoid to have to build a template?
Thanks,
Felice

Princy
Top achievements
Rank 2
 answered on 28 May 2014
3 answers
178 views
I have grid contains more than 6k records, when i'm selecting pagesize form "ALL" to 10 getting error page (IE Diagnosis error page).
tested it for low number of records which is working fine.

Can plz someone help me on this issue.

Thanks,
Jagadeesh
Princy
Top achievements
Rank 2
 answered on 28 May 2014
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?