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.
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;}<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>var treelist = $find("<%= rtlClusterStatus.ClientID %>");treelist.fireCommand("Rebind","");
| 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!