I'm getting a warning on any date before 1980. There are no validators attached in the HTML, and nothing in the code behind. Is there anyway around this.
<
telerik:RadDatePicker
ID
=
"dtRetailIndusOfficeRentRollLeaseStartDate"
TabIndex
=
"4"
runat
=
"server"
></
telerik:RadDatePicker
>
<
telerik:RadGrid
ID
=
"gv1"
runat
=
"server"
>
<
MasterTableView
DataKeyNames
=
"UserId"
>
<
Columns
>
<
telerik:GridTemplateColumn
>
<
ItemTemplate
>
<
asp:CheckBox
ID
=
"CheckBox1"
runat
=
"server"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
Hi,
Telerik UI for ASP.NET AJAX 2015.2.623
IE10
Visual Studion 2013
I am new to the PivotGrid and can't seem to figure out this simple thing. My SQLDataSource returns a list of valves. 2 of the columns are "Valve Size" and "Valve Type". I have a sinple PivotGrid with a row field of "Valve Size" and a column field of "Valve Type":
<telerik:RadPivotGrid ID="RadPivotGrid1" runat="server" DataSourceID="sds_ValvesBuiltByDay">
<Fields>
<telerik:PivotGridColumnField DataField="Valve Type"></telerik:PivotGridColumnField>
<telerik:PivotGridRowField DataField="Valve Size"></telerik:PivotGridRowField>
</Fields>
</telerik:RadPivotGrid>
When the page loads, there are rows for each size returned and columns for tech type but the individual cells in the grid are empty.
(See attached screenshot. The RadGrid below the PivotGrid displays the same data from the same SQL data source)
I want each cell to show the count of records for that size and type combination.
This is probably very simple but I have not found a way to do it.
Please tell me what I am doing wrong.
I am trying to set focus to a textbox within the edit template and when it runs I get the following error:
A first chance exception of type 'System.NullReferenceException' occurred in NgeDataEntry.dll
{"Object reference not set to an instance of an object."}
Not sure what I have wrong here. Can anyone spot the mistake.
protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
{
UserControl myUserControl = e.Item.FindControl(GridEditFormItem.EditFormUserControlID) as UserControl;
string script = String.Format("$get('{0}').focus(); $get('{0}').select();", myUserControl.FindControl("RadTextBox2").ClientID);
ScriptManager.RegisterStartupScript(Page, typeof(Page), "myscript", script, true);
}
}
I have WorkDayStartTime and WorkDayEndTime set to 07:00 and 20:00 respectively but the calendar / scheduler is fixed at 8:00-5:00, no expansion, no scroll bars. Am I missing something?
<
telerik:RadScheduler
ID
=
"RadScheduler1"
runat
=
"server"
DataDescriptionField
=
"Description"
DataEndField
=
"End"
DataKeyField
=
"ID"
DataRecurrenceField
=
"RecurrenceRule"
DataRecurrenceParentKeyField
=
"RecurrenceParentID"
DataReminderField
=
"Reminder"
DataSourceID
=
"SqlDataSource1"
DataStartField
=
"Start"
DataSubjectField
=
"Subject"
Height
=
"900px"
SelectedView
=
"WeekView"
Width
=
"990px"
WorkDayEndTime
=
"20:00:00"
WorkDayStartTime
=
"07:00:00"
EnableCustomAttributeEditing
=
"True"
TimeZoneOffset
=
"-06:00:00"
StartInsertingInAdvancedForm
=
"false"
OnClientAppointmentEditing
=
"AppointmentEditing"
OnClientAppointmentInserting
=
"AppointmentInserting"
OnAppointmentDataBound
=
"RadScheduler1_AppointmentDataBound"
OnAppointmentCreated
=
"RadScheduler1_AppointmentCreated"
OnAppointmentCommand
=
"RadScheduler1_AppointmentCommand"
>
<
ExportSettings
FileName
=
"CalendarExport"
OpenInNewWindow
=
"True"
>
protected
void
Page_Load(
object
sender, EventArgs e)
{
FileExplorer.Configuration.ContentProviderTypeName =
typeof
(SPContentProvider).AssemblyQualifiedName;
Page.ClientScript.RegisterStartupScript(Page.GetType(),
"AjaxUpdatePanelFix"
,
"_spOriginalFormAction = document.forms[0].action; _spSuppressFormOnSubmitWrapper=true;"
,
true
);
FileExplorer.Style.Add(
"overflow"
,
"hidden"
);
SetFileExplorerPaths();
}
private
void
SetFileExplorerPaths()
{
List<String> paths =
new
List<String>();
SPListCollection docLibraries = RetrieveDocumentLibraries(SPContext.Current.Web);
foreach
(SPList list
in
docLibraries)
{
if
(SPContentProvider.IsNotSystemFolder(list.RootFolder)) {paths.Add(list.RootFolder.ServerRelativeUrl);}
}
string
[] convertedPaths = paths.ToArray();
FileExplorer.Configuration.ViewPaths = convertedPaths;
FileExplorer.Configuration.UploadPaths = FileExplorer.Configuration.ViewPaths;
FileExplorer.Configuration.DeletePaths = FileExplorer.Configuration.ViewPaths;
}
private
PathPermissions GetPermissions(Guid listId, SPWeb web)
<%@ Register TagPrefix="ajax" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %> |
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2009.1.402.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %> |
<ajax:ScriptManagerProxy ID="sm" runat="server"> |
<Scripts> |
<ajax:ScriptReference Path="/_layouts/VMMA.Intranet/js/ProgramSheet.js" /> |
</Scripts> |
</ajax:ScriptManagerProxy> |
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" |
DefaultLoadingPanelID="RadAjaxLoadingPanel1"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="RadGridActualsPlanning"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="pnlActualsPlanning" |
LoadingPanelID="RadAjaxLoadingPanel1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="rgInvoice"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="pnlActualsPlanning" |
LoadingPanelID="RadAjaxLoadingPanel1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<asp:Panel ID="pnlActualsPlanning" runat="server" Visible="false"> |
<h3> |
<asp:Label ID="lblActualsPlanning" runat="server"></asp:Label></h3> |
<telerik:RadGrid ID="RadGridActualsPlanning" runat="server" AllowFilteringByColumn="true" |
AllowPaging="true" Width="760px" AllowSorting="true" AllowColumnsReorder="True" |
PagerStyle-AlwaysVisible="true"> |
<ClientSettings Scrolling-AllowScroll="true" Scrolling-ScrollHeight="100%" Scrolling-UseStaticHeaders="true" |
Scrolling-FrozenColumnsCount="2" Resizing-AllowColumnResize="True"> |
</ClientSettings> |
<ExportSettings Pdf-PaperSize="A4" Pdf-PageWidth="21cm" Pdf-PageHeight="29cm"> |
</ExportSettings> |
<PagerStyle LastPageToolTip="Laatste Pagina" NextPagesToolTip="Volgende Pagina's" |
NextPageToolTip="Volgende Pagina" PrevPagesToolTip="Vorige Pagina's" PrevPageToolTip="Vorige Pagina" |
PagerTextFormat="{4} Pagina <strong>{0}</strong> van <strong>{1}</strong>, item <strong>{2}</strong> tot <strong>{3}</strong> van de <strong>{5}</strong>." |
FirstPageToolTip="Eerste Pagina" /> |
<StatusBarSettings LoadingText="Wordt geladen..." ReadyText="Klaar" /> |
<MasterTableView AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"> |
<Columns> |
<telerik:GridBoundColumn DataField="ProductRightsID" SortExpression="ProductRightsID" |
HeaderText="BillieID" /> |
<telerik:GridBoundColumn DataField="programmatitel" SortExpression="programmatitel" |
HeaderText="programmatitel" /> |
<telerik:GridBoundColumn DataField="productiejaar" SortExpression="productiejaar" |
HeaderText="productiejaar" /> |
<telerik:GridBoundColumn DataField="jaargang" SortExpression="jaargang" HeaderText="jaargang" /> |
<telerik:GridBoundColumn DataField="episodeTitel" SortExpression="episodeTitel" HeaderText="episodeTitel" /> |
<telerik:GridBoundColumn DataField="zender" SortExpression="zender" HeaderText="zender" /> |
<telerik:GridBoundColumn DataField="uitzenddag" SortExpression="uitzenddag" HeaderText="uitzenddag" /> |
<telerik:GridBoundColumn DataField="uitzenduur" HeaderText="uitzenduur" /> |
</Columns> |
</MasterTableView> |
</telerik:RadGrid> |
</asp:Panel> |
I am trying to dynamically populate a Telerik Radmenu control in my code behind. I'm having a really hard time with it.
I have the following code that I get a list of categories from and save to a Session Variable.
protected void createFilter(int categoryid)
{
// check cateogyrid
//get list of proudct id
List<int> productIds = new List<int>();
DataRow[] productRow = CategoriesProductsData.Tables["Products"].Select("Category_ID = " + 573);
productIds = productRow.Select(p => int.Parse(p["Product_ID"].ToString())).ToList();
//get attributes
ITCProductService pService = new TCProductServiceClient();
var productTuples = (pService.GetProductsAttributes(productIds));
List<Tuple<int, CustomAttribute>> customAttributes = new List<Tuple<int,CustomAttribute>>();
foreach(var productTuple in productTuples)
{
foreach(var attributeTuple in productTuple.m_Item2)
{
var customAttribute = new Tuple<int, CustomAttribute>(productTuple.m_Item1, new CustomAttribute(attributeTuple));
customAttributes.Add(customAttribute);
}
}
List<CustomAttributeCategory> categories = new List<CustomAttributeCategory>();
var categoryTuples = customAttributes.Select(a => a.Item2).Select(a => a.Attribute.Category).Distinct();
foreach (var categoryTuple in categoryTuples)
{
var category = new CustomAttributeCategory(categoryTuple);
var attributeByCategory = customAttributes.Select(a => a.Item2).Where(b => b.Attribute.CategoryId == categoryTuple.AttributeCategoryId).Distinct();
foreach (var attributeTuple in attributeByCategory)
{
var attribute = new CustomAttribute(attributeTuple.Attribute);
var attributeProductIds = customAttributes.Where(a => a.Item2.Attribute.AttributeId == attributeTuple.Attribute.AttributeId).Select(a => a.Item1).ToList();
attribute.ProductIds = attributeProductIds;
category.Attributes.Add(attribute);
}
categories.Add(category);
}
Session["filter"] = categories.ToString();
}
public class CustomAttributeCategory
{
public AttributeCategoryModel Category { get; set; }
public List<CustomAttribute> Attributes { get; set; }
public CustomAttributeCategory(AttributeCategoryModel category)
{
Category = category;
Attributes = new List<CustomAttribute>();
}
}
public class CustomAttribute
{
public AttributeModel Attribute { get; set; }
public List<int> ProductIds { get; set; }
public CustomAttribute(AttributeModel attribute)
{
Attribute = attribute;
ProductIds = new List<int>();
}
}
Then I try to add the categories to the menu with this code:
protected void handsetMenu_ItemDataBound(object sender, RadMenuEventArgs e)
{
var categories = Session["filter"].ToString();
foreach (var category in categories)
{
var item = new RadMenuItem(categories);
handsetMenu.Items.Add(item);
}
}
It's not working. I know I'm missing something from my HTML to bind the control, but I'm not even sure if the code in my code behind is working. Here's the control:
<telerik:RadMenu ID="handsetMenu" runat="server" ShowToggleHandle="true" OnItemDataBound="handsetMenu_ItemDataBound">
<Items>
<telerik:RadMenuItem Text="Here">
<Items>
</Items>
</telerik:RadMenuItem>
</Items>
</telerik:RadMenu>
I am really lost if anyone could help me that'd be great.