Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
409 views

Hi,

I want to change the skin for all the telerik controls in my application in one shot. found the following way to achive it by adding the skin in the web.config.

<appSettings
<add value="Hay" key="Telerik.Skin"/> 
</appSettings>

 
I should also want this skin to be changed at runtime, my providing the skin list in a combo and allow the users to change. How to go about it.

Jidesh

Dimo
Telerik team
 answered on 12 Oct 2010
6 answers
275 views
I am using radtabstrip to load in usercontrols as my content pages. Is it possible to rewrite the url address bar when a tab has been clicked?

e.g.
I have 3 tabs, home, products, admin.
If the user clicks the tabs I want the url address bar to show like below.
www.mysite.com/home
www.mysite.com/products
www.mysite.com/admin

I have tried using Context.RewritePath("~/home") in the radtabstrip click event, but the address bar never changes.

Is this possible?

Mike
Michael
Top achievements
Rank 1
 answered on 12 Oct 2010
6 answers
364 views
Hello,

I'm using Q3 2009.
After selecting an item into the combobox, I would like the combobox css takes its highlight skin. This is a fanciful example to understand my request :

If Not radCombo1.SelectedItem Is Nothing Then
    radCombo1.CssClass = "RadComboBox_Black:hover"
Else
    radCombo1.CssClass = "RadComboBox_Black"
End If

Is it possible to do that please ?
Thank you.
luc bonenfant
Top achievements
Rank 1
 answered on 12 Oct 2010
1 answer
108 views
Hi.

i am using RADMaskedTextBox .i have used the follwing

 

 

<telerik:RadMaskedTextBox ID="RadMaskedTextBox1" Runat="server"

 

 

 

Height="21px" Width="166px" ShowButton="True" ButtonCssClass="style1"

 

 

 

Mask="####" SelectionOnFocus="SelectAll"

 

 

 

ClientEvents-OnButtonClick="TestLoad" >

 

 

 

 

 

</telerik:RadMaskedTextBox>

I have written Javascript fucntion 'TestLoad' and it is working fine.

But when the button is clicked i want to execute Server Event(As like Normal Button Click Event)

COuld you please help me

Regards
Kumar

 

Shinu
Top achievements
Rank 2
 answered on 12 Oct 2010
3 answers
120 views
Hi all,

I am trying to load RadDock dynamically with controls on dock expand using AJAX. I have provided the code below the commented part is the problem. I am unable to get the control ID which raised the postback.

If possible provide me with the code to dynamically create the portal page with the ajaxified docks.
RadDock RadDock1 = new RadDock();
    RadAjaxPanel AjPanel = new RadAjaxPanel();
 
    RadDock RadDock2 = new RadDock();
    RadAjaxPanel AjPanel2 = new RadAjaxPanel();
    
    protected void Page_Init(object sender, EventArgs e)
    {
        Session["ExpandCtrlID"] = null;
 
        AjPanel.RenderMode = UpdatePanelRenderMode.Inline;
        RadDock1.ID = "RadDock1";
        DockExpandCollapseCommand ex1 = new DockExpandCollapseCommand();
 
        RadDock1.Commands.Add(ex1);
        RadDock1.Collapsed = true;
        RadDock1.Command += new DockCommandEventHandler(RadDock1_Command);
        RadDock1.ContentContainer.Controls.Add(AjPanel);
        RadDock1.CommandsAutoPostBack = true;
        RadDock1.OnClientCommand = "DockOnClientCommand";
        RadDockZone1.Controls.Add(RadDock1);
 
        AjPanel2.RenderMode = UpdatePanelRenderMode.Inline;
        RadDock2.ID = "RadDock2";
        RadDock2.Commands.Add(new DockExpandCollapseCommand());
        RadDock2.Collapsed = true;
        RadDock2.Command += new DockCommandEventHandler(RadDock2_Command);
        RadDock2.ContentContainer.Controls.Add(AjPanel2);
        RadDock2.CommandsAutoPostBack = true;
        RadDock2.OnClientCommand = "DockOnClientCommand";
        RadDockZone1.Controls.Add(RadDock2);
    }
 
 
    void RadDock2_Command(object sender, DockCommandEventArgs e)
    {
        string controlID = RadDock2.ClientID;
        LoadUserControlInDock(controlID);
    }
 
    void RadDock1_Command(object sender, DockCommandEventArgs e)
    {
        string controlID = RadDock1.ClientID;
        LoadUserControlInDock(controlID);       
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        Label1.Text = "";
        if (Page.IsPostBack)
        {
            if (ScriptManager1.IsInAsyncPostBack)
            {
                //RadDock dock;
                //dock = sender as RadDock;
                //string id = dock.ClientID.ToString();
                LoadUserControlInDock(id);
                Label1.Text = "Asynchronous";
            }
            else
            {
                Label1.Text = "Not Asynchronous";
            }
        }
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadDock1, AjPanel);
        }
 
    protected void LoadUserControlInDock(string contID)
    {
        Control c1 = new Control();
        c1 = this.LoadControl("WebUserControl.ascx");
 
        switch (contID)
        {
            case "RadDock1":
                AjPanel.Controls.Clear();
                AjPanel.Controls.Add(c1);
                Test.Value = "Loaded";
                break;
            case "RadDock2":
                AjPanel2.Controls.Clear();
                AjPanel2.Controls.Add(c1);
                Test.Value = "Loaded";
                break;
        }
    }
 
Pero
Telerik team
 answered on 12 Oct 2010
4 answers
75 views
Hello again,

How can I change the font color of the items when they are clicked on the TagCloud in one transaction? I mean when I refresh the page the selected items font color should convert to the default value.
Because when there are many tags in the TagCloud, the user will need to know which tags have been already selected by him/her to avoid the confusion.

Thank you very much for your support,

Cheers,
Hamed
Cori
Top achievements
Rank 2
 answered on 12 Oct 2010
2 answers
218 views

Hi

I'm having some problems with using filtering in radGrid. As you can se in thread title, I'm using quite old version of telerik, but I cannot currently move to newer version.

The problem is, that when I put some text in filter textbox and press enter, default action on page is started (which is emulating click on first button found on page). I've set grid properties, so that it would automatically  filter data in grid on enter key. What I've found is, that JavaScript, that runs after key press, returns false when pressed key is enter. What I would like to achieve is filtering grid data after enter key is pressed. All works fine when I enter some text and press tab key or move focus somewhere else by clicking mouse button.

I couldn't find any info about this behavior on your forum, so I don't know whether it's bug, or maybe I'm doing something wrong.

Here are code samples, that I use in my project. I would really appreciate if you could help me deal with this. Thanks in advance!

Grid code:

01.<telerik:RadGrid ID="gridProjects" runat="server" DataSourceID="ClientProjectsSourceGridData"
02. OnItemDataBound="gridProjects_ItemDataBound" AutoGenerateColumns="false" PageSize="15"
AllowPaging="true" AllowSorting="true" CssClass="GridProjectsStyle"
OnSelectedIndexChanged="gridProjects_SelectedIndexChanged"
03.BorderStyle="None" AllowFilteringByColumn="true" EnableLinqExpressions="false">
04.    <GroupingSettings CaseSensitive="false" />
05.    <HeaderStyle CssClass="GridHeader" />
06.    <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
07.        <Selecting AllowRowSelect="true" />
08.    </ClientSettings>
09.    <MasterTableView OverrideDataSourceControlSorting="true" AllowFilteringByColumn="true">
10.        <Columns>
11.            <telerik:GridTemplateColumn HeaderText="Project" DataField="Name" SortExpression="Name"
                                        UniqueName="Name" AutoPostBackOnFilter="true"
                                        CurrentFilterFunction="Contains" ShowFilterIcon="false">
12.                 <ItemTemplate>
13.                     <asp:HyperLink ID="ProjectName" runat="server" CssClass="ProjectNameLink"
                                    NavigateUrl='<%# "ProjectDetails.aspx?projectId=" + Eval("Identity").ToString() %>'>
                                    <%#Eval("Name")%>
                     </asp:HyperLink>
14.                 </ItemTemplate>
15.            </telerik:GridTemplateColumn>

HTML and JavaScript generated from this code:

1.<input type="text" onkeydown="if((event.keyCode == 13 || event.keyCode == 20)) return false;"
onchange="setTimeout(function(){$find("ctl00_ContentPlaceHolder1_gridProjects_ctl00").filter("Name", $get("ctl00_ContentPlaceHolder1_gridProjects_ctl00_ctl02_ctl02_FilterTextBox_Name").value);}, 0);"
class="rgFilterBox" id="ctl00_ContentPlaceHolder1_gridProjects_ctl00_ctl02_ctl02_FilterTextBox_Name"
size="10" name="ctl00$ContentPlaceHolder1$gridProjects$ctl00$ctl02$ctl02$FilterTextBox_Name">
Pako
Top achievements
Rank 1
 answered on 12 Oct 2010
1 answer
133 views
hi

How do i grey out a button when click upload? thanks
Cori
Top achievements
Rank 2
 answered on 12 Oct 2010
2 answers
163 views
Hi all,
I am using radchart(RadControls for ASP.NET AJAX Q1 2010 SP1)
When i set chart datasource XAxis.DataLabelsColumn contains both numeric and text fields.( A,1,2,3,E)
If the numeric fields is more than text feilds the text filds are displaying as 0.and numeric fields are displaying correctly.(0,1,2,3,0)

Wats is the problem.Share ur suggessions its urgent

Thanks In advance
Lekha
Evgenia
Telerik team
 answered on 12 Oct 2010
1 answer
155 views
Embedded in an asp:repeater a number of RadNumericTextBoxes and an equal number of required validators for the RadNumericTextBoxes are created:

<asp:Repeater runat="server" ID="rep">
  <ItemTemplate>
  <telerik:RadNumericTextBox id="txt" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" runat="server" Type="Number" />
      <asp:RequiredFieldValidator runat="server" ID="rfv" ControlToValidate="txt">*</asp:RequiredFieldValidator><br />
</asp:Repeater>

On client side I have a jquery-setup checkbox change event handler that should toggle the value of all RadNumericTextBoxes between '' (empty) (when checked) or 0 (zero) (when un-checked):

$(document).ready(function () {
  $("input[name$='chk']").change(function () {
    chk_OnChange(this);
  });
});
 
  function chk_OnChange(sender) {
    if (!sender.checked) {
      $("input[name*='txt']").val('0');
    }
    else {
      $("input[name*='txt']").val('');
    }
  }

So far so good; Values get changed the way I want.

However, when trying to submit the form the required field validators (rfv) fail even if the RadNumericTextBoxes displays 0 (zero).

How can I set the value of the RadNumericTextBoxes so that the required field validators don't fail?
Dimo
Telerik team
 answered on 12 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?