Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
82 views
Dear telerik team,
I am getting issue while setting radstar value in decimal. for example when I set the radstar value 2.6 or 2.3 it's still displaying only 2 star rated not 2 and half.

I have done following code on page_load

RadRating

 

radRating = new RadRating();

 

 


radRating.ItemCount = 5;

radRating.SelectionMode =

RatingSelectionMode.Continuous;

 

radRating.Precision =

 

RatingPrecision.Exact;

 

radRating.Value = 5/2;

when page loads only 2 star are displaying dark means rated not '2 and half' star. or when radRating.Value = 9/2; it shows only 4 star shadowed(rated).

how it could be resolved please suggest me.

 

Tsvetie
Telerik team
 answered on 19 Nov 2010
2 answers
105 views
I am using a grid control witch is created dynamically from server but am facing a problem.The delete button never fires the event DeleteCommand.Below is my c# code

private void GridPowerControl()
{
    RadGrid1.Columns.Clear();
 
    RadGrid1.PageSize = 5;
    RadGrid1.AllowPaging = true;
    RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
    RadGrid1.AutoGenerateColumns = false;
    RadGrid1.ShowStatusBar = true;
     
    RadGrid1.MasterTableView.EditFormSettings.UserControlName = ControlS.POWER_CONTROL;
    RadGrid1.MasterTableView.EditFormSettings.EditFormType = Telerik.Web.UI.GridEditFormType.WebUserControl;
 
    RadGrid1.MasterTableView.PageSize = GlobalParams._PageRowNum;
    RadGrid1.MasterTableView.Width = Unit.Percentage(100);
    RadGrid1.MasterTableView.CommandItemDisplay = Telerik.Web.UI.GridCommandItemDisplay.Top;
    RadGrid1.MasterTableView.DataKeyNames = new string[] { "ID" };
 
    GridEditCommandColumn editColumn;
    editColumn = new GridEditCommandColumn();
    editColumn.UniqueName = "EditCommandColumn";
    RadGrid1.MasterTableView.Columns.Add(editColumn);
 
    GridButtonColumn deleteButton;
    deleteButton = new GridButtonColumn();
    deleteButton.UniqueName = "Delete";
    deleteButton.Text = Resources.Global.DELETE;
    deleteButton.CommandName = "Delete";
    RadGrid1.MasterTableView.Columns.Add(deleteButton);
 
    GridBoundColumn boundColumn;
    boundColumn = new GridBoundColumn();
    boundColumn.DataField = "Name";
    boundColumn.UniqueName = "Name";
    boundColumn.HeaderText = Resources.Global.NAME;
    RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
    boundColumn = new GridBoundColumn();
    boundColumn.DataField = "Tag";
    boundColumn.UniqueName = "Tag";
    boundColumn.HeaderText = Resources.Global.TAG;
    RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
    boundColumn = new GridBoundColumn();
    boundColumn.DataField = "Info";
    boundColumn.UniqueName = "Info";
    boundColumn.HeaderText = Resources.Global.INFO;
    RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
    boundColumn = new GridBoundColumn();
    boundColumn.DataField = "Geotag";
    boundColumn.UniqueName = "Geotag";
    boundColumn.HeaderText = Resources.Global.GEO_TAG;
    RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
}
protected void RadGrid1_DeleteCommand(object source, GridCommandEventArgs e)
{
    string Test = string.Empty;
}
 
and this is the asp code
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None"
    AllowPaging="True" CssClass="RadGrid"
    AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="True"
    OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"
    OnInsertCommand="RadGrid1_InsertCommand"
    OnDeleteCommand="RadGrid1_DeleteCommand">
    <MasterTableView>
    <RowIndicatorColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
    </RowIndicatorColumn>
 
    <ExpandCollapseColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
    </ExpandCollapseColumn>
    </MasterTableView>
 
    <ClientSettings>
        <ClientEvents OnRowDblClick="RowDblClick" />
    </ClientSettings>
</telerik:RadGrid>
Can someone help me with my problem.Thank you
Leuk
Top achievements
Rank 1
 answered on 19 Nov 2010
2 answers
220 views
I started using the radtreelist and i'm very happy with it.

But i have a  page which needs to be refreshed every 10 seconds. I do this with a javascript timeout that is done when the radtreelist is created.

In a radgrid you have the function rebind() of the mastertableview. Is there something like that in the radtreelist? 

Currently i'm doing this but that doesn't work as i expected:
var treelist = $find("<%= rtlClusterStatus.ClientID %>");
treelist.fireCommand("Rebind","");

Am I doing something wrong or is this function currently not implemented?
Sander Notenbomer
Top achievements
Rank 1
 answered on 19 Nov 2010
1 answer
49 views

Removing RadFormDecorator  solves the RadButton problem but then all my asp:Buttons are displayed without the skin.
I also tried to replace all the asp:Buttons with RadButtons but that opens a whole new pandora's box with javascript errors etc.
Is there a way to not use RadFormDecorator but still apply skin to asp:Button controls?
Bozhidar
Telerik team
 answered on 19 Nov 2010
3 answers
146 views
I have created a server control which inherits from the TadDatePicker web control using the code below.  It appears that all of the serverside properties and methods work flawlessly when I place my "DatePicker" control onto an ASP.NET webform.

 

 

    public class DatePicker : Telerik.Web.UI.RadDatePicker  
    {  
        protected override void OnLoad(EventArgs e)  
        {  
            //set default properties  
            Skin = "WebBlue";  
            Calendar.Skin = "WebBlue";  
            DateInput.Skin = "WebBlue";  
            DateInput.BackColor = System.Drawing.Color.White;  
            DateInput.Font.Bold = true;  
            Calendar.ShowRowHeaders = false;  
            Width = Unit.Pixel(120);  
              
            base.OnLoad(e);  
        }  
    } 

BUT.... When I try to access the client-side API I am not able to access any of the built-in methods or properties.  For example, I have a page with a dropdown on it.  When the dropdown's selection is chnaged, I am trying to clear the contents of my DatePicker control using javascript. Here is the code of a user control that encpsulates my server controls and the javascript:

 

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucAssessmentTimePeriodSelection.ascx.cs" Inherits="BYOA.Admin.UserControls.ucAssessmentTimePeriodSelection" %> 
<%@ Register Assembly="SSG.WebControls" Namespace="SSG.WebControls.ServerControls" TagPrefix="cc2" %> 
<%@ Register Assembly="BYOA.Admin" Namespace="BYOA.Admin.ServerControls" TagPrefix="cc1" %> 
 
<script type="text/javascript">  
 
    function ClearDate()  
    {  
        var datePicker = document.getElementById('<%= dtStartDate.ClientID %>');  
        alert(datePicker.name);
        datePicker.clear();  
    }  
      
    function ClearTestingPeriod(sender, eventArgs)  
    {  
        var ddlTestingPeriod = document.getElementById('<%= ddlTestingPeriod.ClientID %>');  
        ddlTestingPeriod.selectedIndex = 0;  
    }  
</script> 
 
 
<cc1:TestingPeriodDropDownList runat="server" ID="ddlTestingPeriod" onChange="ClearDate();"></cc1:TestingPeriodDropDownList><br><br> 
 
<cc2:DatePicker runat="server" ID="dtStartDate">  
    <ClientEvents OnDateSelected="ClearTestingPeriod" /> 
</cc2:DatePicker> 
 

The error I am getting when the dropdown is changed is on the line "datePicker.clear();" which is:

"Object doesn't support this property or method."

I am able to do an alert(datePicker.name) and it works just fine, so I know that I at least am getting a reference to the object.  It appears that it does not understand the type of the object and that it is a RadDatePicker, and therefore doees not know what "obj.clear()" is.  Any help would be MOST appreciated!

 

vaibhav
Top achievements
Rank 1
 answered on 19 Nov 2010
1 answer
83 views
Hello,

I have a custom skin that I used with Telerik 2008.
Now I upgraded my application to new version of Telerik 2010 Q2. But the custom skin that I used with Telerik 2008 is  not working.
Must I modify the existing custom skin for all the controls that i use in my application or create a new skin?
Which the best solution?

Thank you for the reply.
kavitha
Hus Damen
Top achievements
Rank 1
 answered on 19 Nov 2010
2 answers
108 views
I have read this blog post about using the Domain Data Source to populate a RadGrid:

http://blogs.telerik.com/TsvetoslavKovachev/Posts/09-09-17/radgrid_for_asp_net_ajax_and_domaindatasource.aspx

I have the same problem as the person that posted a comment about it.  That being, I have the Domain Data Source bound to the grid just like it shows in the example, but I can't get the child tables of the hierarchy to correspond with the selection of the main grid.  I see at the bottom of the page, that support for QueryParameters is available, but I'm stuck?  There are several options in the QueryParameters and I can't get any of them to work.  Is there an example of this somewhere?

Thanks

Tsvetoslav
Telerik team
 answered on 19 Nov 2010
1 answer
88 views
Hi Telerik Team

I have more than one tooltip control in one page, and our application requires to display all fields error and automatically popup after user submit the page. we set the VisibleOnPageLoad = true, but unfortunately, it only auto display the last tooltip.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TooltipsTest.aspx.cs" Inherits="TooltipsTest" %>
 
<!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>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
 
          <div style="padding-top:5px;">
           <telerik:RadComboBox ID="rcbFolders" EnableEmbeddedSkins="false" Skin="Smartmail" runat="server" Width="315px" DataTextField="CampaignFolderName" DataValueField="CampaignFolderID">
            </telerik:RadComboBox>
            <asp:TextBox ID="txtFolderName" runat="server" Width="300px" Visible="false" MaxLength="255"></asp:TextBox>
            <img runat="server" class="RedAlertImage" id="imgWarnFolderNameInUse" visible="false" src="redalert.gif"/>
           
           
          <telerik:RadToolTip ID="RadToolTip1" VisibleOnPageLoad="false" runat="server" Position="BottomLeft" TargetControlID="imgWarnFolderNameInUse">
              <div><asp:Label ID="lblFolderNameError" runat="server" Text="">sadfdsafsadfadsfdsafdsa</asp:Label></div>
          </telerik:RadToolTip>
      </div>
 
      <div style="padding-top:5px;">
            <asp:TextBox ID="txtCampaignEmailName" runat="server" Width="300px" MaxLength="50"></asp:TextBox>
            <img runat="server" class="RedAlertImage" id="imgWarnCampaignNameInUse" visible="false" src="redalert.gif"/>
             
            <telerik:RadToolTip ID="RadToolTip2" VisibleOnPageLoad="false" runat="server" Position="BottomLeft" TargetControlID="imgWarnCampaignNameInUse">
                <div><asp:Label ID="lblEmailNameError" runat="server" Text="Email name must be unique within a campaign folder"></asp:Label></div>
            </telerik:RadToolTip>
      </div>
 
 
      <div>
          <asp:Button Text="Show" runat="server" ID="showme" />
      </div>
 
 
    </div>
    </form>
</body>
</html>


codebehind 

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
 
public partial class TooltipsTest : System.Web.UI.Page
{
    protected void Page_Init(object sender, EventArgs e)
    {
        showme.Click += new EventHandler(showme_Click);
    }
 
    protected void showme_Click(object sender, EventArgs e)
    {
 
        imgWarnFolderNameInUse.Visible = true;
        imgWarnCampaignNameInUse.Visible = true;
 
        RadToolTip1.VisibleOnPageLoad = true;
        RadToolTip2.VisibleOnPageLoad = true;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
}


Svetlina Anati
Telerik team
 answered on 19 Nov 2010
1 answer
96 views
I want to change the size of the pager buttons and also the row that contains them. I need them be 18x18px in size but they always turn out 22x22. I can see that they get their size from Telerik.Web.UI.WebResource.axd and the class .RadGrid.rgPageXXX but how do I change it? Couldn't find any property on the grid that would help me. Could you help me find a way?
Pavlina
Telerik team
 answered on 19 Nov 2010
5 answers
140 views
How do I create a rotator similar to the one on this homepage?

I've tried so many different methods from the documentation and forum but none seem to work the same as the above.

Basically, I have 4 big buttons with text in them that are meant to control the sliding rotator (button 1 skips to rotator frame 1 and pauses, button 3 skips to rotator frame 3 and pauses, etc.) when the mouse is not hovering over a button or rotator frame, the rotator is cycling through the 4 frames every 6 seconds.

I think the reason I'm finding it difficult is because I also want the button's css class to change to ButtonOn when either the mouse is hovered over it or the rotator is on the frame corresponding to it. The rest of the time the class should be ButtonOff.

Any suggestions anyone? Cheers!
Svetlina Anati
Telerik team
 answered on 19 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?