Hey
I am trying to set the padding for the DateInput. I can set it using the following:
<telerik:RadDatePicker ID="RadExpDate" runat="server" RenderMode="Lightweight" Height="23px" ShowPopupOnFocus="true" DateInput-EmptyMessage="mm/dd/yyyy">
<DateInput runat="server" EmptyMessageStyle-PaddingTop="2" EnabledStyle-PaddingTop="2" FocusedStyle-PaddingTop="2" ></DateInput>
</telerik:RadDatePicker>
Was wondering if the was a setting in CSS to set the padding once regardless of the state of the control (ie: Empty, Enable, etc)?
Thanks
Tom

I'm trying to create a RadGrid with ClientDatasource connected to a Webservice to get, update and delete data. I created everything like the example. Unfortunately the behaviour is very strange / inconsistent. The "Get" Mathot works fine. The "Add" method on the other hand seems to work only once or sometimes twice before reloading the page completely. The "Delete" and and "Edit" Method seem not to get triggered at all.
Its cannot be a problem of the Webservice since I can manually ( over http ) trigger all of the methods without a problem. Furthermore it seems that all the parameters passed to the WS get lost. Can anyone give me an advice on what I am doing wrong here?
Here is my code:
JS:
<script type="text/javascript"> //<![CDATA[ function ParameterMap(sender, args) { if (args.get_type() != "read" ) { args.set_parameterFormat("{ 'parameterName': 'test' }"); } } function UserAction(sender, args) { if (sender.get_batchEditingManager().hasChanges(sender.get_masterTableView()) && !confirm("Any changes will be cleared. Are you sure you want to perform this action?")) { args.set_cancel(true); } } //]]></script>
ASPX:
<telerik:RadGrid runat="server" ID="RadGrid1" ClientDataSourceID="RadClientDataSource1" ResolvedRenderMode="Classic" AllowFilteringByColumn="true" FilterType="HeaderContext" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" PagerStyle-AlwaysVisible="true" AllowSorting="true" AllowPaging="True" CellSpacing="-1" GridLines="Both"> <MasterTableView DataKeyNames="associationid" EditMode="Batch" CommandItemDisplay="Top" BatchEditingSettings-HighlightDeletedRows="true"> <Columns> <telerik:GridBoundColumn DataField="associationid" HeaderText="associationid" UniqueName="column"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="objectida" HeaderText="objectida" UniqueName="column1"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="objectidb" HeaderText="objectidb" UniqueName="column2"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="objectnamea" HeaderText="objectnamea" UniqueName="column3"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="objectnameb" HeaderText="objectnameb" UniqueName="column4"> </telerik:GridBoundColumn> <telerik:GridClientDeleteColumn HeaderText="Delete"> <HeaderStyle Width="70px" /> </telerik:GridClientDeleteColumn> </Columns> </MasterTableView> <ClientSettings> <ClientEvents OnUserAction="UserAction" /> </ClientSettings> </telerik:RadGrid> <telerik:RadClientDataSource ID="RadClientDataSource1" runat="server" AllowBatchOperations="True" > <ClientEvents OnCustomParameter="ParameterMap" /> <DataSource > <WebServiceDataSourceSettings BaseUrl="http://localhost/DataService/DataService.svc/" ServiceType="Default"> <Select Url="GetAssocs" DataType="JSON" /> <Update Url="UpdateAssoc" DataType="JSON" /> <Insert Url="AddAssoc" DataType="JSON" /> <Delete Url="DeleteAssoc" DataType="JSON" /> </WebServiceDataSourceSettings> </DataSource> <Schema> <Model ID="associationid"> <telerik:ClientDataSourceModelField FieldName="associationid" DataType="String" /> <telerik:ClientDataSourceModelField FieldName="objectida" DataType="String" /> <telerik:ClientDataSourceModelField FieldName="objectidb" DataType="String" /> <telerik:ClientDataSourceModelField FieldName="objectnamea" DataType="String" /> <telerik:ClientDataSourceModelField FieldName="objectnameb" DataType="String" /> </Model> </Schema> </telerik:RadClientDataSource>
Webservice:
[ServiceKnownType(typeof(Association))][AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]public class DataService : IDataService{ [WebGet] public List<Association> GetAssocs() { using (EventLog eventLog = new EventLog("Application")) { eventLog.Source = "Application"; eventLog.WriteEntry("Log message GET", EventLogEntryType.Information, 101, 1); } List<Association> x = new List<Association>(); for (int i = 0; i < 10; i++) { Association a = new Association(); a.associationid = i.ToString(); a.objectida = i.ToString(); a.objectidb = i.ToString(); a.objectnamea = i.ToString(); a.objectnameb = i.ToString(); x.Add(a); } return x; } [WebGet] public void UpdateAssoc(string JSONstring) { try { using (EventLog eventLog = new EventLog("Application")) { eventLog.Source = "Application"; eventLog.WriteEntry("Log " + JSONstring.ToString(), EventLogEntryType.Information, 101, 1); } } catch (Exception ex) { throw ex; } } [WebGet] public void AddAssoc(string JSONstring) { using (EventLog eventLog = new EventLog("Application")) { eventLog.Source = "Application"; eventLog.WriteEntry("Log message ADD", EventLogEntryType.Information, 101, 1); } } [WebGet] public void DeleteAssoc(string JSONstring) { using (EventLog eventLog = new EventLog("Application")) { eventLog.Source = "Application"; eventLog.WriteEntry("Log message DELETE", EventLogEntryType.Information, 101, 1); } }}
and
[ServiceContract] public interface IDataService { [OperationContract] [WebGet] List<Association> GetAssocs(); [OperationContract] [WebGet] void UpdateAssoc(string JSONstring); [OperationContract] [WebGet] void AddAssoc(string JSONstring); [OperationContract] [WebGet] void DeleteAssoc(string JSONstring); } [DataContract] public class Association { [DataMember] public string associationid { get; set; } [DataMember] public string objectida { get; set; } [DataMember] public string objectidb { get; set; } [DataMember] public string objectnamea { get; set; } [DataMember] public string objectnameb { get; set; } }
Hi All,
I am using Telerik Datetime picker in my ASP.net web application, but In C# while selecting the date from the control, I am loosing the datetime offset value and fraction of second value.
Please help.
Thanks,
S2
I know this has been asked multiple times, but i still cannot set the initial page of Kendo Grid
@(Html.Kendo().Grid<TherapistViewModel>().Name("KendoTherapistGrid").AutoBind(false).Columns(columns =>{ ---BOUND COLUMNS--- }).Events(e=>e.DataBound("onRowBound")).Pageable(pageable => pageable.Refresh(true).PageSizes(true).ButtonCount(5)).Filterable().Sortable().DataSource(dataSource => dataSource .Ajax() .PageSize(20) .Model(model => model.Id(p => p.TherapistId)) .Read(read => read.Action("GetTherapistdata", "Therapist").Data("PatientDetails")) ) )
Since AutoBind if false, I am calling ReadDataSource when the document is ready
$(document).ready(function () { ReadDataSource();});function ReadDataSource(){ $("#KendoTherapistGrid").data().kendoGrid.dataSource.page(2);}
I am hard-coding the page number for now until I get can it to work. There are three pages in the grid.
We have a lightweight tabstrip using the "Simple" skin. We'd like to call attention to a single tab by giving it a different color via a style. We're able to change it by using "tab1.backcolor=Color.Lime" but would prefer if we can have the tab have a secondary style so we can control it's parameters via css.
We tried the following and it successfully changes the single tab font-weight but the background color gets overwritten by the Simple skin:
tab1.CssClass = "highlight-tab";
html .highlight-tab {
font-weight: bold !important;
background-color: Lime !important;
}
We also the following to try and supplement the RadTabStrip_Simple style but can't figure out how to get it to work:
.RadTabStrip_Simple highlight-tab .rtsLevel1 .rtsLink
Is there a way to do this?
thanks
Hello,
Is there a way to get the index of the series item hovered via client - not just the Yvalue or category value?
Was looking at the demo code...
function OnSeriesHover(args) { var message = $get("message"); message.innerHTML = "Hover item with value '" + args.value + "' from category '" + args.category + "'."; }I have a master page with a radmenu and a radComboBox on it.
In OnClientSelectedIndexChanged for the radcombobox, I make an AjaxRequest and in the handling method server-side I want to add and/or remove radmenu items based on the new value in the radcombobox.
I've been unable to get this to happen - the adding of radmenuitems occurs in the server side code, but it's not reflected on the client.
I have tried it with a RadAjaxPanel wrapping the whole thing.
I've tried Ajaxifying the RadMenu, the "Events" radmenuitem and also the "Summary radmenuitem.
The best outcome sees the code behind executing as expected, and the radmenuitems being added, but the items don't show up on the client.
May please be given some guidance?
Thank you.
The relevant code snippets are as follows:
Radmenu and combobox
<telerik:LayoutColumn Span="3" SpanMd="3" SpanSm="12" SpanXs="12"> <div class="RadMenu"> <%--RadMenu_Bootstrap--%> <ul class="rmRootGroup rmHorizontal" style="border: none!important;"> <li class="rmItem" style="border: none!important;"> <div class="rmContent"> <img src="/images/saLogo2.png" alt="site logo" style="vertical-align: middle;" /> </div> </li> <li class="rmItem" style="border: none!important;"> <div class="rmContent"> <img id="imgOrgLogo" runat="server" visible="false" src="" style="vertical-align: middle;" /> <telerik:RadComboBox ID="rcbOrgScope" runat="server" Width="200" AutoPostBack="false" OnClientSelectedIndexChanged="OrgScopeChange" DropDownAutoWidth="Enabled"> </telerik:RadComboBox> </div> </li> </ul> </div></telerik:LayoutColumn><%--Main Nav--%><telerik:LayoutColumn Span="9" SpanMd="9" SpanSm="12" SpanXs="12"> <telerik:RadMenu ID="RadMenu1" runat="server" RenderMode="Auto" EnableAjaxSkinRendering="true"> <Items> <telerik:RadMenuItem Text="Project"> <ItemTemplate> <telerik:RadComboBox ID="rcbProject" runat="server" AutoPostBack="false" OnClientSelectedIndexChanged="ProjectChange" Width="350" ZIndex="7010"> </telerik:RadComboBox> </ItemTemplate> </telerik:RadMenuItem> <telerik:RadMenuItem Text="Dashboard" NavigateUrl="Dashboard.aspx"></telerik:RadMenuItem> <telerik:RadMenuItem Text="Events"> <Items> <telerik:RadMenuItem Text="Map" NavigateUrl="Events/Events.aspx"/> <telerik:RadMenuItem Text="Summary"/> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem CssClass="LastItem"> <ItemTemplate> <telerik:RadButton ButtonType="SkinnedButton" Text="Log out" OnClick="Logout_Click" runat="server"></telerik:RadButton> <a href="Profile.aspx"> <img src="/images/icons8-User-50.png" height="40" width="40" style="vertical-align: bottom;" /> </a> </ItemTemplate> </telerik:RadMenuItem> </Items> </telerik:RadMenu></telerik:LayoutColumn>
JavaScript
<telerik:RadCodeBlock ID="rcbMaster" runat="server"> <script> function OrgScopeChange(sender, args) { var ajaxManager = <%=RadAjaxManager.GetCurrent(Page).ClientID%>; ajaxManager.ajaxRequest('orgChange'); } </script></telerik:RadCodeBlock>
CodeBehind
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { this.MenuUserSettings(); if (this.HasEventManagement) this.SetEventTypesMenuItem(); } this.AjaxWireup(); }protected void AjaxWireup() { RadAjaxManager1.AjaxRequest += Ram_AjaxRequest; RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, rcbOrgScope); RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, RcbProject); RadAjaxManager1.ClientEvents.OnRequestStart = "MasterRequestStart"; } private void Ram_AjaxRequest(object sender, AjaxRequestEventArgs e) { if (e.Argument.Equals("orgChange", StringComparison.InvariantCultureIgnoreCase)) { this.OrganizationScopeInitals = rcbOrgScope.SelectedItem.Text; this.SetEventTypesMenuItem(); } } private void SetEventTypesMenuItem() { RadMenuItem rmi = this.RadMenu1.FindItemByText("Summary"); var dt = EventCore.Data.Access.LookupDao.EventTypeLookup(this.OrganizationScope.EventManagementProfile); //OrganizationScope comes from the value in the radcombo box foreach (System.Data.DataRow r in dt.Rows) { rmi.Items.Add(new RadMenuItem(r["eventType"].ToString(), String.Format("~/Events/Summary.aspx?eid={0}", r["eventTypeId"]))); } }
The issue occurs on Android > Chrome when I drag the tab strip over to access another tab (e.g. "Tab 5") and then tap to select that tab. The issue does not occur if I use the right arrow button on the tab strip to scroll over (rather than drag the tab strip with my finger).
Possibly related threads:
http://www.telerik.com/forums/dynamically-loaded-tabs-scrollchildren-=-error
http://www.telerik.com/forums/problem-after-postback-when-tabs-are-created-at-client-side
My user agent string: Mozilla/5.0 (Linux; Android 5.1.1; Nexus 4 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.78 Mobile Safari/537.36
Telerik version: Telerik UI for ASP.NET AJAX Q2 2014 SP1
I reported the same or similar issue for IE11 (not Android > Chrome) in December 2013, and I think that issue was subsequently fixed. However the above issue is occurring in Android > Chrome.
A sample to demonstrate the issue:
Default.aspx:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width; initial-scale=1.0; user-scalable=1;"/><style type="text/css">
/*.rtsOut{
width: 100px;
}*/
</style>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" ScrollChildren="true">
<Tabs>
<telerik:RadTab Text="Tab 1" runat="server" Value="Tab1" PageViewID="pv1"></telerik:RadTab>
<telerik:RadTab Text="A Much Longer Tab Label" runat="server" Value="Tab2" PageViewID="pv2"></telerik:RadTab>
<telerik:RadTab Text="Tab 3" runat="server" Value="Tab3" PageViewID="pv3"></telerik:RadTab>
<telerik:RadTab Text="Tab 4" runat="server" Value="Tab4" PageViewID="pv4"></telerik:RadTab>
<telerik:RadTab Text="Tab 5" runat="server" Value="Tab5" PageViewID="pv5"></telerik:RadTab>
<telerik:RadTab Text="Tab 6" runat="server" Value="Tab6" PageViewID="pv6"></telerik:RadTab>
<telerik:RadTab Text="Tab 7" runat="server" Value="Tab7" PageViewID="pv7"></telerik:RadTab>
<telerik:RadTab Text="Tab 8" runat="server" Value="Tab8" PageViewID="pv8"></telerik:RadTab>
<telerik:RadTab Text="Tab 9" runat="server" Value="Tab9" PageViewID="pv9"></telerik:RadTab>
<telerik:RadTab Text="Tab 10" runat="server" Value="Tab10" PageViewID="pv10"></telerik:RadTab>
<telerik:RadTab Text="Tab 11" runat="server" Value="Tab11" PageViewID="pv11"></telerik:RadTab>
<telerik:RadTab Text="Tab 12" runat="server" Value="Tab12" PageViewID="pv12"></telerik:RadTab>
<telerik:RadTab Text="Tab 13" runat="server" Value="Tab13" PageViewID="pv13"></telerik:RadTab>
<telerik:RadTab Text="Tab 14" runat="server" Value="Tab14" PageViewID="pv14"></telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage runat="server" ID="RadMultiPage1">
<telerik:RadPageView runat="server" ID="pv1"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv2"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv3"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv4"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv5"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv6"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv7"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv8"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv9"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv10"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv11"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv12"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv13"></telerik:RadPageView>
<telerik:RadPageView runat="server" ID="pv14"></telerik:RadPageView>
</telerik:RadMultiPage>
</form>
</body>
</html>
Default.aspx.vb:
Imports Telerik.Web.UIPartial Class _Default
Inherits System.Web.UI.PageProtected Sub RadTabStrip1_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs) Handles RadTabStrip1.TabClick
End SubEnd Class
Below is a copy of the message I sent to Telerik in December 2013:
====================
Attached is an example of the issue. We have tab labels that don't have a width defined, so they get auto-resized based on the width of the label. (This is apparently a built-in feature of the browser, HTML, CSS, Telerik, and/or whatever.) If you resize your browser window so that not all tab labels are visible and then you scroll all the way to the right end of the tab strip and then click the last tab, then an error like the following occurs: "-456.32000000000016 is not a valid value for Int32."
If you change the width of your browser window and then try again, then the number shown is different, so it apparently has something to do with the width of the browser window. For example: "-228.32000000000016 is not a valid value for Int32"
In the attached example if you uncomment the following then the issue doesn't occur:
/*.rtsOut{
width: 100px;
}*/
However not all of our tab labels are the same width, and I don't want to have to manually define the width of each tab label based on the length of each label. (This might require me to adjust manual widths for different browsers/devices if they are rendered differently due to different font sizes or whatever.) By the way setting the width to 100px across the board (by uncommenting the above CSS) causes the second tab label ("A Much Longer Tab Label") to be truncated to something like "A Much Longer Tal".
I suspect that this issue is related to the following:
#1: "Q3 2013 SP1 (version 2013.3.1114)", release history (http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q3-2013-sp1-version-2013-3-1114.aspx ) , TabStrip: "Fixed: In IE11 the width of the RadTabs is not calculated properly when scrolling is enabled."
(I'm using version 2013.3.1114.45, so I apparently already have the fix to the IE11 issue quoted above from the release history for Q3 2013 SP1.)
#2: http://www.telerik.com/community/forums/aspnet-ajax/tabstrip/hey-guys-please-help-me-about-radtabstrip-in-ie11.aspx
=====================
Their response included the following: "We have inspected the provided web application and reproduced the problem locally. This issue happens when the ScrollChildren property is true, TabClick server event is attached and tabstrip width is smaller."
Thanks.
Nels
I have a scheduler that is in a similar to https://demos.telerik.com/kendo-ui/scheduler/index but I need to limit the available Owner list on the edit/create dialog to the people that are selected at the top. For instance you should not be able to set Alex as the owner if their calendar is how showing.
I have attached to the edit event on the scheduler and can interact with elements on the edit form, but $('#ownerId').data("kendoDropDownList") returns undefined so i am not sure how i can remove unselected people from the list.
TIA,
-Logan
