Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views
protected void rtvTopLeftPatientMenu_NodeClick(object o, Telerik.WebControls.RadTreeNodeEventArgs e)
   {
 
       if (e.NodeClicked.Parent != null)
       {
           Session["NodeClicked"] = e.NodeClicked.Parent.Value;
           try
           {
               if (e.NodeClicked.Parent.Parent.Value != null)
               {
                   Session["NodeClicked"] = e.NodeClicked.Parent.Parent.Value;
               }
           }
           catch { };
       }
Hi Guys,

I recently updated telerik controls on a website. Earlier I was using Telerik.WebControls.RadTreeNodeEventArgs but now I'm using Telerik.web.ui.RadTreeNodeEventArgs.

Now my problem is when I change the telerik.webcontrol to telerik.web.ui .............this "e.NodeClicked" property starts showing an error saying that it does not have any property like that. Now I have to update this control but I'm stuck at e.NodeClicked.... So please guys help me out by suggesting some other property which replace this one.
erwerwwerewerererere
 
 protected void rtvTopLeftPatientMenu_NodeClick(object o, Telerik.WebControls.RadTreeNodeEventArgs e)
    {
 
        if (e.NodeClicked.Parent != null)
        {
            Session["NodeClicked"] = e.NodeClicked.Parent.Value;
            try
            {
                if (e.NodeClicked.Parent.Parent.Value != null)
                {
                    Session["NodeClicked"] = e.NodeClicked.Parent.Parent.Value;
                }
            }
            catch { };
        }
 protected void rtvTopLeftPatientMenu_NodeClick(object o, Telerik.WebControls.RadTreeNodeEventArgs e)
    {
 
        if (e.NodeClicked.Parent != null)
        {
            Session["NodeClicked"] = e.NodeClicked.Parent.Value;
            try
            {
                if (e.NodeClicked.Parent.Parent.Value != null)
                {
                    Session["NodeClicked"] = e.NodeClicked.Parent.Parent.Value;
                }
            }
            catch { };
        }
 protected void rtvTopLeftPatientMenu_NodeClick(object o, Telerik.WebControls.RadTreeNodeEventArgs e)
    {
 
        if (e.NodeClicked.Parent != null)
        {
            Session["NodeClicked"] = e.NodeClicked.Parent.Value;
            try
            {
                if (e.NodeClicked.Parent.Parent.Value != null)
                {
                    Session["NodeClicked"] = e.NodeClicked.Parent.Parent.Value;
                }
            }
            catch { };
        }
Hristo Valyavicharski
Telerik team
 answered on 30 Sep 2014
3 answers
130 views

            function PrintPanel() {

            
                var panel = document.getElementById("<%=ResponeData.ClientID %>");
                var printWindow = window.open('', '', 'height=400,width=800');
                printWindow.document.write('<html><head><title>DIV Contents</title>');
                printWindow.document.write('</head><body >');

                printWindow.document.write(panel.innerHTML);
               
                printWindow.document.write('</body></html>');
                printWindow.document.close();
                setTimeout(function () {
                   
                    printWindow.print();
                }, 500);
                return false;
            }  
The above panel "ResponeData" has a rad grid. Im trying to print entire pannel. I want to change back color of the rad grid to "none" while printing. On print screen rad grid color should be none
 





Konstantin Dikov
Telerik team
 answered on 30 Sep 2014
4 answers
417 views
Hi,

I have a rad grid with paging enabled, and i got records displayed in two pages.
Using client script I'm working for selecting/deselecting the rows using checking box and also persisted the check box while paging.
But when I'm trying to read selected rows in rad grid I'm getting only current page records, but not all pages selected records.

Please help me in that regards.

Thanks & Regards
Phaneendra
Eyup
Telerik team
 answered on 30 Sep 2014
9 answers
150 views

I have first two columns of radgrid freezed (as shown in img one).
I have grid with almost 50 columns which contains textboxes, so when i navigate using keyboard tab the freeze columns get hide and also alignment of columns gets disturbed (as shown in img two).
it work fine when i use mouse to navigate.

please help to solve this problem because it severe proble my client is facing.



thanks
Kishor Dange
Konstantin Dikov
Telerik team
 answered on 30 Sep 2014
4 answers
137 views
This question doesn't just apply to the Toolbar but to virtually every other control as well. I looked in the documentation as well as this forum and cannot find the listing of skin names. With the older version of the Rad Controls, Telerik had a demo site that allowed the user to view all the available skins. Why in the world did you leave that out when you updated the newer demo site??
Vargis
Top achievements
Rank 2
 answered on 30 Sep 2014
4 answers
198 views
Hi,

I have a RadGrid with the following definition in ascx control:

<telerik:RadGrid ID="GridCountryBand" runat="server" AutoGenerateColumns="false"
        Skin="Simple" CssClass="caronte-phase-grid"
        AllowPaging="False"
        AllowSorting="false"
        AllowFilteringByColumn="true"
        OnNeedDataSource="GridCountryBand_NeedDataSource"
        OnBatchEditCommand="GridCountryBand_BatchEditCommand"
        OnItemDataBound="GridCountryBand_ItemDataBound"
        >
        <GroupingSettings CaseSensitive="false" />
        <ClientSettings>
            <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
            <Selecting AllowRowSelect="true" />
            <ClientEvents OnBatchEditOpening="batchEditOpening" />
        </ClientSettings>
        <MasterTableView HeaderStyle-HorizontalAlign="Center" Width="100%" AutoGenerateColumns="false"
            DataKeyNames="ID_COUNTRY"
            EditMode="Batch">
            <BatchEditingSettings EditType="Cell" OpenEditingEvent="MouseOver" />
            <Columns>
            </Columns>
        </MasterTableView>
 
    </telerik:RadGrid>

Columns are added in Page_Load:

private void AddGridColumns()
        {
            int idTech = Convert.ToInt32(ddlTechnology.SelectedValue);
 
            ITechnologyBandService service = SharePointServiceLocator.GetCurrent().GetInstance<ITechnologyBandService>();
 
            DataSet data = service.GetBandsByTechnology(idTech);
 
            if (data != null && data.Tables.Count > 0)
            {
                GridCountryBand.MasterTableView.Columns.Clear();
 
                GridBoundColumn boundColumn = new GridBoundColumn();
                GridCountryBand.MasterTableView.Columns.Add(boundColumn);
 
                boundColumn.DataField = "DES_COUNTRY";
                boundColumn.HeaderText = "Country";
                boundColumn.ShowFilterIcon = false;
                boundColumn.FilterControlWidth = Unit.Percentage(100);
                boundColumn.AutoPostBackOnFilter = true;
                boundColumn.HeaderStyle.Width = Unit.Pixel(150);
                boundColumn.ItemStyle.Width = Unit.Pixel(150);
 
                foreach (DataRow row in data.Tables[0].Rows)
                {
                    GridCheckBoxColumn checkboxColumn = new GridCheckBoxColumn();
                    GridCountryBand.MasterTableView.Columns.Add(checkboxColumn);
 
                    checkboxColumn.DataField = row["ID_BAND"].ToString();
                    checkboxColumn.HeaderText = row["BAND_NAME"].ToString();
                    checkboxColumn.ShowFilterIcon = false;
                    checkboxColumn.AutoPostBackOnFilter = true;
                    checkboxColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
                    checkboxColumn.HeaderStyle.Width = Unit.Pixel(150);
                    checkboxColumn.ItemStyle.Width = Unit.Pixel(100);
                }
            }

I have an ASP.NET DropDownList in the ascx, outside the RadGrid. When page is loaded DropDownList value cannot be changed (if I set onchange JavaScript event it is not fired) until I try to edit cells (checkboxes).

If I remove batch editing mode, values in DropDownList can be changed with no problem.

Thanks and best regards,

Alfonso
Konstantin Dikov
Telerik team
 answered on 30 Sep 2014
3 answers
225 views

 

 

Please note that I do not have a TemplateColumn in my grid to adding a blank ItemTemplate will not work.  I read the forums until I am tired of doing it.  If I refresh the grid after clearing the IE8 error popup, the record is deleted.  I get the prompt, and the record gets deleted, but I simply must know how to get rid of this stupid message.

I'm guessing it's something with databinding, but I have no idea what.


Please help if possible.  I appreciate the help in advance.

Jason

Datasource...

 

 

 

<asp:LinqDataSource ID="ldsDeviceToDeviceInfo" runat="server"

 

 

 

ContextTypeName="AssetManagementDataContext" EnableDelete="True"

 

 

 

EnableInsert="True" EnableUpdate="True" EntityTypeName=""

 

 

 

OrderBy="DeviceName, ConnType" TableName="Connections">

 

 

 

</asp:LinqDataSource>

I have this in my RadAjaxManager (among other things not related to this grid):

 

 

 

<telerik:AjaxSetting AjaxControlID="grdDevToDev">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="grdDevToDev" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

 

ASPX RadGrid declaration:

               <telerik:RadGrid ID="grdDevToDev" runat="server" EnableLinqExpressions="False" AllowFilteringByColumn="True"
                    AllowPaging="True" AllowSorting="True" CellSpacing="0"
                    DataSourceID="ldsDeviceToDeviceInfo" Font-Names="Verdana" Font-Size="8px" GridLines="None"
                    Skin="WebBlue" Width="90%" AutoGenerateColumns="False" 
                    onitemcommand="grdDevToDev_ItemCommand">
                        <ClientSettings AllowColumnsReorder="True" AllowKeyboardNavigation="true" ReorderColumnsOnClient="True"
                            EnablePostBackOnRowClick="false" >
                            <Selecting AllowRowSelect="True" />
                            <ClientEvents OnPopUpShowing="PopUpShowing" />
                        </ClientSettings>
                        <MasterTableView DataKeyNames="Index"  AllowAutomaticDeletes="true"
                            DataSourceID="ldsDeviceToDeviceInfo" EditMode="Popup" CommandItemDisplay="Top" >
                            <Columns>
                                <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>
                                <telerik:GridBoundColumn DataField="Index" DataType="System.Int64" 
                                    FilterControlAltText="Filter Index column" HeaderText="Index" 
                                    ReadOnly="True" SortExpression="Index" UniqueName="Index" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="DeviceName" 
                                    FilterControlAltText="Filter DeviceName column" HeaderText="DeviceName" 
                                    SortExpression="DeviceName" UniqueName="DeviceName">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="ConnType" 
                                    FilterControlAltText="Filter ConnType column" HeaderText="ConnType" 
                                    SortExpression="ConnType" UniqueName="ModConnTypeel">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="CableType" 
                                    FilterControlAltText="Filter CableType column" HeaderText="CableType" 
                                    SortExpression="CableType" UniqueName="CableType">
                                    <HeaderStyle Width="150px" />
                                </telerik:GridBoundColumn>
                                <telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"
                                    ConfirmTitle="Delete" ButtonType="LinkButton" CommandName="Delete" Text="Delete"
                                    UniqueName="DeleteColumn">
                                    <HeaderStyle Width="50" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridButtonColumn>
                            </Columns>
  
                            <EditFormSettings InsertCaption="Assign/Modify Device to Device Connection" CaptionFormatString="Edit Record: {0}"
                                CaptionDataField="Index" EditFormType="Template">
                                <PopUpSettings Modal="True" Width="500px" Height="500px" /> 
                                <FormTemplate>
                                    <table id="Table1" cellspacing="0" cellpadding="3" width="450" border="0">
                                        <tr>
                                            <td colspan="3" style="height: 50px">
                                                <asp:ValidationSummary ID="valSummaryNewDevice" ValidationGroup="SaveNewDevice" runat="server"
                                                    ForeColor="DarkRed" Width="670px" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3">
                                                <br />
                                            </td>
                                        </tr>
  
                                        <tr>
                                            <td style="width: 20px;">
                                                   
                                            </td>
                                            <td style="width: 150px; padding: 1px 2px 1px 2px">
                                                <asp:Label ID="Label3" runat="server" CssClass="formLabel" Height="20px" Text="ID"></asp:Label>
                                            </td>
                                            <td>
                                                 <asp:Label ID="tbIndex" Font-Names="Verdana" Font-Size="8pt" runat="server"
                                                    Text='<%# Bind("Index") %>' Width="50px" ></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 20px;">
                                                   
                                            </td>
                                            <td style="width: 150px; padding: 1px 2px 1px 2px">
                                                <asp:Label ID="Label6" runat="server" CssClass="formLabel" Height="20px" Text="Device Name"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="tbAddDeviceName" Width="200px" Text='<%# Bind("DeviceName") %>' Font-Names="verdana" Font-Size="8pt" runat="server"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="valNewDeviceSubmit" ControlToValidate="tbAddDeviceName"
                                                    SetFocusOnError="true" ValidationGroup="SaveNewDevice" Display="Dynamic" ErrorMessage="Missing Device Name"
                                                    runat="server">
                                                    <img id="Img5" src="~/images/flag_red.png" runat="server" alt="Missing data" /></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 20px;">
                                                   
                                            </td>
                                            <td style="width: 150px; padding: 1px 2px 1px 2px">
                                                <asp:Label ID="Label7" runat="server" CssClass="formLabel" Height="20px" Text="Device Type"></asp:Label>
                                            </td>
                                            <td>
                                               <%-- <telerik:RadComboBox ID="rcbAddDeviceType" runat="server" Font-Names="Verdana" Font-Size="8pt" AllowCustomText="true" 
                                                    MarkFirstMatch="True" NoWrap="True" Skin="Windows7" SortCaseSensitive="False" SelectedValue='<%# Bind("Model") %>'
                                                    MaxHeight="250px" Width="200px" DataSourceID="dsDeviceTypes" DataTextField="Device_Type" DataValueField="Device_Type"
                                                    AutoPostBack="False"  AppendDataBoundItems="true">
                                                    <Items>
                                                        <telerik:RadComboBoxItem Text="" Value="" />
                                                    </Items>
                                                </telerik:RadComboBox>
                                                  
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="rcbAddDeviceType"
                                                    SetFocusOnError="true" ValidationGroup="SaveNewDevice" Display="Dynamic" ErrorMessage="Missing Device Type"
                                                    runat="server">
                                                    <img id="Img1" src="~/images/flag_red.png" runat="server" alt="Missing data" /></asp:RequiredFieldValidator>--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 20px;">
                                                   
                                            </td>
                                            <td>
                                                <asp:Label ID="Label8" runat="server" CssClass="formLabel" Height="20px" Text="Cabinet"></asp:Label>
                                            </td>
                                            <td>
<%--                                              <telerik:RadComboBox ID="rcbAddDeviceCabinet" runat="server" Font-Names="Verdana" AllowCustomText="true" 
                                                    Font-Size="8pt" MarkFirstMatch="True" NoWrap="True" AutoPostBack="False" Skin="Windows7"
                                                    SortCaseSensitive="False" MaxHeight="250px" Width="200px" DataSourceID="dsCabNums" SelectedValue='<%# Bind("Rack") %>'
                                                    DataTextField="CabinetNumber" DataValueField="CabinetNumber" AppendDataBoundItems="true"  >
                                                    <Items>
                                                        <telerik:RadComboBoxItem Text="" Value="" />
                                                    </Items>
                                                </telerik:RadComboBox>
                                                  
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="rcbAddDeviceCabinet"
                                                    SetFocusOnError="true" ValidationGroup="SaveNewDevice" Display="Dynamic" ErrorMessage="Missing Cabinet"
                                                    runat="server">
                                                    <img id="Img3" src="~/images/flag_red.png" runat="server" alt="Missing data" /></asp:RequiredFieldValidator>--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 20px;">
                                                   
                                            </td>
                                            <td style="width: 150px; padding: 1px 2px 1px 2px">
                                                <asp:Label ID="Label9" runat="server" CssClass="formLabel" Height="20px" Text="RU Position"></asp:Label>
                                            </td>
                                            <td>
<%--                                                <asp:TextBox ID="tbRUPosition" Text='<%# Bind("Rack_Position") %>' Width="200px" Font-Names="verdana" Font-Size="8pt" runat="server"></asp:TextBox><asp:RequiredFieldValidator
                                                    ID="RequiredFieldValidator3" ControlToValidate="tbRUPosition" SetFocusOnError="true"
                                                    ValidationGroup="SaveNewDevice" Display="Dynamic" ErrorMessage="Missing RU Position"
                                                    runat="server">
                                                    <img id="Img4" src="~/images/flag_red.png" runat="server" alt="Missing data" /></asp:RequiredFieldValidator>--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 20px;">
                                                   
                                            </td>
                                            <td colspan="2">
                                                <%--<hr />--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3">
                                                <br />
                                            </td>
                                        </tr>
                                    </table>
                                    <table style="width: 100%">
                                        <tr>
                                            <td align="center" colspan="2">
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <telerik:RadButton ID="Button1" ValidationGroup="SaveNewDevice" TabIndex="14" CausesValidation="true"
                                                                Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Save" %>' runat="server"
                                                                Skin="WebBlue" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                                            </telerik:RadButton>
                                                        </td>
                                                        <td>
                                                            <telerik:RadButton ID="btnCancel" CommandName="Cancel" TabIndex="15" Text="Cancel"
                                                                CausesValidation="False" runat="server" Skin="WebBlue">
                                                            </telerik:RadButton>
                                                        </td>
                                                </table>
                                        </tr>
                                        </td> </tr>
                                    </table>
                                </FormTemplate>
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                    <FormTableButtonRowStyle HorizontalAlign="Center" />
                </EditFormSettings>
                        </MasterTableView>
                    </telerik:RadGrid>



Only method in code-behind for this grid:
protected void grdDevToDev_ItemCommand(object sender, GridCommandEventArgs e)
{
    AssetManagementDataContext dc = new AssetManagementDataContext();
    if (e.CommandName == RadGrid.DeleteCommandName)
    {
        var index = (int)((GridDataItem)e.Item).GetDataKeyValue("Index");
        //retrieve entity form the Db
        var device = dc.Connections.Where(n => n.Index == index).FirstOrDefault();
        if (device != null)
        {
            //add the category for deletion
            dc.Connections.DeleteOnSubmit(device);
            try
            {
                //submit chanages to Db
                dc.SubmitChanges();
                grdAddSwitch.Rebind();
            }
            catch (System.Exception exc)
            {
                Response.Write("Error deleting switch.\nError Message: " + exc.Message);
            }
        }
    }
}

Kostadin
Telerik team
 answered on 30 Sep 2014
3 answers
134 views
Hi All ,

How to get the column type of a column of radgrid in javascript ?
I need to remove few filter options for 'GridDateTimeColumn'.
So I need to get the column type of the column in 'On Client Showing' event.

Any other way to acheive the same would be appreciated.

Thank you,
Anurag
Konstantin Dikov
Telerik team
 answered on 30 Sep 2014
2 answers
1.3K+ views
AjaxControlToolkit Version 15.1 (March 2015)

The 15.1 AjaxControlToolkit release causes an error when Telerik UI for ASP.NET AJAX controls are used together with AjaxControlToolkit controls: "this._setProperties is undefined".

The error stems from the AjaxControlToolkit scripts and Telerik has no control over it. For the time being, there is no possible workaround from our end.

The previous workaround (using the ToolkitScriptManager) is no longer applicable, because the ToolkitScriptManager has been removed.

Ideas we can suggest are:

  • Remove the AjaxControlToolkit from your project and use Telerik UI for ASP.NET AJAX controls instead.
  • Contact the developers of the AjaxControlToolkit bundle so they can fix the issue.

 

AjaxControlToolkit Version 7.1005 (September 2013)

Recently, the AJAX Toolkit Team announced that standard script manager can no longer be used with their controls.
“- You must use the ToolkitScriptManager instead of the ScriptManager with the Ajax Control Toolkit.”

http://ajaxcontroltoolkit.codeplex.com/releases/view/112805

Since the RadScriptManager is based on the standard asp:ScriptManager, this change makes it not compatible, too. Therefore, to use both of the Telerik UI and AJAX Toolkit control bundles simultaneously within the same project, you have to use the ToolkitScriptManager.

Upon using the toolkit manager, you can come across an error when using an UpdatePanel. We’ve found out that this is due to the ToolkitScriptManager having a bug with script combining. The bug is fixed one day after their latest release:
http://ajaxcontroltoolkit.codeplex.com/workitem/27517
http://ajaxcontroltoolkit.codeplex.com/releases/view/116091

The problem can be reproduced in release mode when scripts are combined and after an AJAX request. The temporary workaround is to set CombineScripts to false:

<asp:ToolkitScriptManager runat="server" ID="ScriptManager1" CombineScripts="false"   />

Please note that the issue is not reproducible into debug mode, because the script combining logic works only in release mode.
Eyup
Telerik team
 answered on 30 Sep 2014
3 answers
141 views
Hello,
when I select a value from a radcombobox, i set radgrid.visible = true. Simlple, isn't it? Well, in firefox I have no issues, but in IE 11 I see a malformed grid.

Does anyone experienced a similar issue? I got no benefits running website in ie compatibility mode. Please, see the attachment.

Thanks
Pavlina
Telerik team
 answered on 30 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?