Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
1.3K+ views
Hi,

I am using radgrid. i used label, radcombobox and radbutton(checkbox). i want when i clicking checkbox whole items(rows) background color want to display in client side. and also same item label value want get. both are client side.

so please tell me 1. how to set background selected textbox 2. how to get another control value for selected check box

 I have attached screen shot also. please check and give me a tips.



Thanks in advance,
Dhamu
Dhamodharan
Top achievements
Rank 1
 answered on 09 Mar 2011
4 answers
148 views
I am attempting to use jQuery to set the background-color style of the RadTimePicker on the client side. While I can set this property using the BackColor attribute on the server side, setting it on the client side never results in visual changes... even though the code executes correctly.

I realize that the input text box in question has a ClientID that differs from the ClientID of the RadTimePicker control. It seems that it always follows the format MyTimePickerClientID_dateInput_text. So in order to change the background color, I do the following:

 

 

$(

"#" + <%= this.MyTimePickerControl.ClientID %> + "_dateInput_text").css("background-color", "#FF0000");

 

 

This jQuery code seems to run fine, and when I check the background-color in the debugger, it is indeed set to red. Yet there is no visual change in the browser window.

Is what I'm trying to do possible? If so, what am I doing wrong? I have tried this same technique with other style, such as border, but with the same lack of effect.

 

Alexander
Top achievements
Rank 1
 answered on 09 Mar 2011
4 answers
120 views
Hi I have a RadTreeView(with checkboxes) in RadComboBox. I am able to display the values of selected checkboxes using label. But it's on a Button click. Ideally I wanted to display values when RadcomboBox closes.

RadComboBox1_SelectedIndexChanged is not working for me.

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" >
   </telerik:RadScriptManager>
   <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
   <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadComboBox1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadComboBox1" LoadingPanelID="RadAjaxLoadingPanel1"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
   </AjaxSettings>
   </telerik:RadAjaxManager>
   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" 
       Skin="Default" >
   </telerik:RadAjaxLoadingPanel>
   <br />
   <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
    </script
    </telerik:RadCodeBlock>
            <telerik:RadComboBox ID="RadComboBox1" runat="server" Width="250px" 
       Style="vertical-align: middle;"   
                EmptyMessage="Choose Stations..." 
         AutoPostBack="True" 
       onselectedindexchanged="RadComboBox1_SelectedIndexChanged">
                <ItemTemplate>
                    <div id="div1"  >
                        <telerik:RadTreeView runat="server" ID="RadTreeView1"   Width="100%" Height="210px" CheckBoxes="true"
                        CheckChildNodes="true" TriStateCheckBoxes="true"  >
                        </telerik:RadTreeView>
                    </div>
                </ItemTemplate>
                <Items>
                    <telerik:RadComboBoxItem Text="" />
                </Items>
            </telerik:RadComboBox>
   <br />
   <asp:Button ID="Button1" runat="server" Text="Selected Stations" 
       onclick="Button1_Click" />
     
   <p>
        </p>
   <p>
     
   <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
  
    </p>
    </form>
</body>
</html>
Please help...
Smiely
Princy
Top achievements
Rank 2
 answered on 09 Mar 2011
4 answers
154 views
Hello,

In my web application, I have a master page with a RadScriptManager control.  I'm getting the following error on page load:

Could not load file or assembly 'System.Windows,Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' orone of its dependencies. The system cannot find the file specified.


Based on the stack trace, the error appears to be thrown from the RadScriptManager constructor:

[FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.]
   System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 
   	typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0 
   System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] 
   	typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +180   
   System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] 
	genericMethodArguments) +192   System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord 
	caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, 
	MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[]
	attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean&
	ctorHasParameters, Boolean& isVarArg) +115   
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, 
	Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean 
	isDecoratedTargetSecurityTransparent) +426   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly
	assembly, RuntimeType caType) +103   
   System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) +33   
   System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) +76   
   System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() +388   
   System.Web.UI.ScriptManager..ctor() +26   
   Telerik.Web.UI.RadScriptManager..ctor() +14
The error only occurs the first time I load a page after a build of the application.  As soon as I refresh the page, the error goes away and the application functions as expect.

The error started occurring as soon as I added a Silverlight 3 application in my web app project.

Why are RadScriptManager and the .NET ScriptManager attempting to load a Silverlight dll?  Obviously, this dll is not in the bin directory of the web app.  Any ideas as to how I can make this error go away?

I'm using VS 2010, .NET 4.0, Silverlight 3, and Telerik RadControls for ASP.NET Ajax version 2010.1.415.40.

Thanks,
Andy
Simon
Telerik team
 answered on 09 Mar 2011
1 answer
167 views
Hello...

I have a main page with a lot of content and a RadTabStrip with 2 tabs... 
I load a local page on my Tab. That page has a javascript variable called "map"

So,  In main page I have a html button. When the user click it I´m supposed to get the Iframe variable "map" (from tab) and play with it...
How can I get that variable ?

Thanks
Dimitar Terziev
Telerik team
 answered on 09 Mar 2011
2 answers
137 views
Hi There,

I have treeview with 2 and 3 level sub node. On click of each node i am loading the iframe on right side. i want disable the clicking of root nodes because on click of root nodes nothing should happen.Is it possible to disable the root node clicking or just disable the root nodes
and also the treeview is fullExpanded state.
Goutham
Top achievements
Rank 1
 answered on 09 Mar 2011
1 answer
196 views

I have inherited an application from a previous developer and I am having problems with the speed of the RadTreeList he has previously implemented.

 


The Treelist is a representation of a dealer hierarchy where the sub branches roll up to a principal dealer within a country.

 


Eg Principal Dealer 11020000

 

Has branches:  11020001, 11020002, 11020003

 


For each row we are displaying name and address information as well as image buttons that allow a dealer to be selected/assigned to a role holder or for all dealers for a principal to be selected at principal level.

 


This is using the NeedDataSource event.

 

 


Now I am caching data from my SQL Server 2008 datasource wherever I can but I am finding that expanding nodes at principal level and performing updates is painfully slow. Even at it’s largest for a single country the treelist only has around 2000 records and the round trips to the server to get data and perform updates look pretty quick.

 


I have been through all of the performance tips on the site but nothing seems to be improving it i.e.  RadCompression etc.

 


Can you suggest anything that might be available to improve performance?


<telerik:RadAjaxPanel ID="RadAjaxPanel3" LoadingPanelID="RadAjaxLoadingPanel2" runat="server">
    <telerik:RadTreeList AutoGenerateColumns="false" runat="server" ID="RadTreeList3"  
        ShowTreeLines="false" AllowMultiItemSelection="true" DataKeyNames="DLR_CD" ParentDataKeyNames="DLR_PRNCPL_ACC_CD"
        OnNeedDataSource="RadTreeList3_NeedDataSource" OnDataBound="RadTreeList3_DataBound"
        AllowPaging="true" PageSize="10" OnItemDataBound="RadTreeList3_ItemDataBound"
        OnItemCreated="RadTreeList3_ItemCreated">
        <Columns>
            <telerik:TreeListTemplateColumn HeaderText="Dealer" DataField="DLR_CD" UniqueName="DLR_CD">
                <ItemTemplate>
                    <asp:Label ID="lblDlrCd" runat="server" Text='<%# Eval("DLR_CD") %>' />
                    <asp:Label ID="Label1" Width="20px" runat="server" />
                    <asp:ImageButton ID="btnSelectAll" ToolTip="Click to assign all dealers for Principal"
                        Visible="false" OnClick="btnSelectAll_OnClick" runat="server" ImageUrl="~/Images/ok_16.png" />
                    <asp:ImageButton ID="btnUnSelectAll" ToolTip="Click to un-assign all dealers for Principal"
                        Visible="false" OnClick="btnUnSelectAll_OnClick" runat="server" ImageUrl="~/Images/remove_16.png" />
                    <asp:HiddenField ID="hdDlrPrin" runat="server" Value='<%# Eval("DLR_PRNCPL_ACC_CD") %>' />
                    <asp:HiddenField ID="hdUser" runat="server" Value='<%# Eval("USR_BUSN_ROLE_ID") %>' />
                    <asp:HiddenField ID="hdDlrUsr" runat="server" Value='<%# Eval("DLR_USR_MAP_ID") %>' />
                </ItemTemplate>
            </telerik:TreeListTemplateColumn>
            <telerik:TreeListTemplateColumn HeaderText="Assign?">
                <ItemTemplate>
                    <asp:ImageButton ID="btnSelect" ToolTip="Click to assign this dealer" Visible="false"
                        OnClick="btnSelect_OnClick" runat="server" ImageUrl="~/Images/ok_16.png" />
                    <asp:ImageButton ID="btnUnSelect" ToolTip="Click to un-assign this dealer" Visible="false"
                        OnClick="btnUnSelect_OnClick" runat="server" ImageUrl="~/Images/remove_16.png" />
                </ItemTemplate>
            </telerik:TreeListTemplateColumn>
            <telerik:TreeListTemplateColumn HeaderText="Dealer Assigned">
                <ItemTemplate>
                    <asp:Panel ID="pnlTick" runat="server">
                        <asp:Label ID="lblTick" runat="server" Text="Y" Style="font-weight: bold;"></asp:Label>
                    </asp:Panel>
                </ItemTemplate>
            </telerik:TreeListTemplateColumn>
            <telerik:TreeListBoundColumn DataField="DLR_NM" UniqueName="DLR_NM" HeaderText="Name" />
            <telerik:TreeListBoundColumn DataField="DLR_ADDR1" UniqueName="DLR_ADDR1" HeaderText="Address 1" />
            <telerik:TreeListBoundColumn DataField="DLR_POST_CD" UniqueName="DLR_POST_CD" HeaderText="Post Code" />
            <telerik:TreeListBoundColumn DataField="DLR_CITY" UniqueName="DLR_CITY" HeaderText="City" />
            <telerik:TreeListBoundColumn DataField="DLR_VISN_REGN_NM" UniqueName="DLR_VISN_REGN_NM"
                HeaderText="Region" />
        </Columns>
    </telerik:RadTreeList>


protected void RadTreeList3_NeedDataSource(object sender, TreeListNeedDataSourceEventArgs e)
    {
        try
        {
            if (Dlr_Cd != null && Dlr_Cd != string.Empty)
            {
                txFind.Text = Dlr_Cd;
                Dlr_Cd = string.Empty;
            }  
  
            GetData(Cntry_Cd, (txFind.Text.Trim() != string.Empty ? txFind.Text.Trim() : string.Empty),Brand_ID);
            RadTreeList3.DataSource = cache_Data;
        }
        catch (Exception ex)
        {
            string s = ex.Message;
        }
    }
  
  
  
 protected void GetData(string cntry, string dlr_nm,string brand_id)
    {
        if (cache_Data == null || cache_Data.Tables.Count == 0)
        {
            CDMAI cDMAI = new CDMAI();
            cDMAI.DLR_MyDealer_List_All(cntry, dlr_nm,brand_id );
            cache_Data = cDMAI.RetDataSet;
        }
    }

Veli
Telerik team
 answered on 09 Mar 2011
9 answers
325 views
Hi,

I'm using Telerik RadControls Q1 2008. I have a Rad Menu on the masterpage of my application and i'm trying to bind it to a linq datacontext.

The binding works fine but my problem is That Child Items are always displayed as root items.

I have checked that ParentId of all roots items is NULL and of all the child items is that of the assigned parent. 

Below is the code :

Private Sub LoadMenuItems()
 
      Dim MenuDC As New MenuItemDataContext
 
      RadMenu1.DataSource = MenuDC.usp_TABLE_MENU_ITEM_Select().ToList()
      RadMenu1.DataBind()
   End Sub
<telerik:RadMenu ID="RadMenu1" runat="server" Skin="Office2007" DataFieldID="MENU_ITEM_ID"
                 DataFieldParentID="PARENT_ID" DataNavigateUrlField="PAGE_URL" DataTextField="MENU_ITEM_NAME"
                  DataValueField="MENU_ITEM_ID">
                <DefaultGroupSettings ExpandDirection="Down" />
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                 
                </telerik:RadMenu>

I do not know what i'm missing here.

Yana
Telerik team
 answered on 09 Mar 2011
5 answers
523 views
Hi,

I have a simple rad tree view to which I am dynamically adding the nodes.
But the nodeclick event is not getting fired.
I have even tried setting "PostBack" fot the nodes to "true" but it didn't solve my problem.
Below is my code(.ascx)-

<

 

telerik:RadAjaxLoadingPanel ID="radajaxloadingpanelAssociateEntities" runat="server" Transparency="50">

 

 

<div id="divLoadingPnl" runat="server" style="position: absolute; left: 400px; top: 250px">

 

 

<asp:Image ID="imgLoading" runat="server" AlternateText="Loading..." ImageUrl="~/wpresources/PIMS/Images/progress.gif"/>

 

 

</div>

 

 

</telerik:RadAjaxLoadingPanel>

 

 

<telerik:RadAjaxPanel ID="radajaxpanelAssociateEntities" LoadingPanelID="radajaxloadingpanelAssociateEntities"

 

 

runat="server" Height="650px" Width="948px">

 

 

<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">

 

 

<tr style="width: 100%; height: 50%">

 

 

<td style="width: 278px">

 

 

<telerik:RadTreeView runat="server" ID="radtvFolderStructure"

 

 

OnLoad="radtvFolderStructure_Load" style="position: relative"

 

 

OnNodeClick="radtvFolderStructure_NodeClick" >

 

 

</telerik:RadTreeView>

 

 

</td><td>

 

 

<telerik:RadGrid ID="rdgDocuments" runat="server" Height="325" Width="670" Skin="Hay">

 

 

</telerik:RadGrid>

 

 

</td></tr><tr><td></td><td>

 

 

<telerik:RadGrid ID="rdgComments" runat="server" Height="325" Width="670" Skin="Hay">

 

 

</telerik:RadGrid>

 

 

</td></tr>

 

 

</table>

 

 

</telerik:RadAjaxPanel>

 


Can anyone please help me out with this?

PS-I am using radControls for asp .net ajax version Q2 2008.

Thanks iN Advance,
Abhishek
Yana
Telerik team
 answered on 09 Mar 2011
1 answer
119 views
Hi,

I've had this problem for a while and have not found a solution. When using a Shared Calender with the RadAjaxManager, the pop-up only works the 1st time. Here is the simplest implementation of the example.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>
    <div id="divContent" runat="server">
        <telerik:RadCalendar ID="RadCalendar1" Runat="server"></telerik:RadCalendar>
    </div>
    </form>
</body>
</html>
using System;
using System.Drawing;
using Telerik.Web.UI;
  
public partial class Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadDatesShared();
    }
  
    void LoadDatesShared()
    {
        for (int i = 0; i < 10;i++ )
        {
            RadDatePicker rdp = new RadDatePicker();
            rdp.SharedCalendar = RadCalendar1;
            rdp.AutoPostBack = true;
            rdp.ID = "rdp" + i.ToString();
            rdp.SelectedDateChanged += new Telerik.Web.UI.Calendar.SelectedDateChangedEventHandler(rdp_SelectedDateChanged);
            divContent.Controls.Add(rdp);
            RadAjaxManager1.AjaxSettings.AddAjaxSetting(rdp, rdp);
        }
    }
  
    void rdp_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
    {
        ((RadDatePicker)sender).BackColor = Color.LightGreen;
    }
  
}

Thanks !
Tsvetina
Telerik team
 answered on 09 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?