Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
267 views
Hi

I have created my self a custom advanced insert form and added a checkbox list to it and a new dropdown list.

Then added 
[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]

properties for each of these in the code behind that set them and get their values.
In my rad scheduler my custom insert template is added like so:

<AdvancedInsertTemplate>
   
        <uc1:ScheduleInsertEditor ID="ScheduleInsertEditor1" runat="server" Mode="Insert"
                        Subject='<%# Eval("Subject") %>'
                        Description='<%# Eval("Description") %>'
                        Start='<%# Eval("Start") %>'
                        End='<%# Eval("End") %>'
                        RecurrenceRuleText='<%# Eval("RecurrenceRule") %>'
                        Type='<%# Eval("Type")??0  %>'
                        Users='<%#GetUsers( Eval("Id")==null?0:int.Parse(Eval("AppointmentId").ToString() )) %>'
                       ></uc1:ScheduleInsertEditor>
    </AdvancedInsertTemplate>

The insert opens ok and what ever's passed in appears but in my AppointmentInsert  event I don't know how to get at these values to  add to the appointment.

Before I created the advanced form my insert was like so:
protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
      {
          //add the new appointment to the db
 
          int? recurrentParentId = null;
          if (e.Appointment.RecurrenceParentID != null) recurrentParentId = (int)e.Appointment.RecurrenceParentID;
           AppointmentManager.AddUserAppointment(
              UserId,
               int.Parse(e.Appointment.Resources[0].Key.ToString()),
              e.Appointment.Start,
              e.Appointment.End,
              e.Appointment.RecurrenceRule,
              recurrentParentId,
              e.Appointment.Description,
              e.Appointment.Subject);*/
          BindBindSchedule();
      }

Now I have added custom properties how do I get al them?
Should the be in the e.Appointment? They do not appear under resources or attributes.

My full radScheduler html is:

<telerik:RadScheduler runat="server"
        ID="SchToday"
        DayStartTime="08:00:00"
        DayEndTime="22:00:00"
        StartInsertingInAdvancedForm="true"
        ShowNavigationPane="true"
        OnAppointmentInsert="RadScheduler1_AppointmentInsert"
        OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
        OnAppointmentDelete="RadScheduler1_AppointmentDelete"
        DataKeyField="AppointmentId"
        DataStartField="Start"
        DataSubjectField="Subject"
        DataEndField="EndX"
        FirstDayOfWeek="Monday"
        ShowHeader="true"
        ShowFooter="false">
    <AdvancedForm Modal="true" />
    <DayView UserSelectable="true" />
    <WeekView UserSelectable="true" />
    <MonthView UserSelectable="true" />
    <DayView HeaderDateFormat="ddd dd MMMM yyyy" />
    <WeekView HeaderDateFormat="ddd dd MMMM yyyy" />
    <TimelineView HeaderDateFormat="ddd dd MMMM yyyy" />
    <MonthView HeaderDateFormat="MMMM yyyy" />
    <TimeSlotContextMenuSettings EnableDefault="true" />
    <AppointmentContextMenuSettings EnableDefault="true" />
    <AdvancedInsertTemplate>
   
        <uc1:ScheduleInsertEditor ID="ScheduleInsertEditor1" runat="server" Mode="Insert"
                        Subject='<%# Eval("Subject") %>'
                        Description='<%# Eval("Description") %>'
                        Start='<%# Eval("Start") %>'
                        End='<%# Eval("End") %>'
                        RecurrenceRuleText='<%# Eval("RecurrenceRule") %>'
                        Type='<%# Eval("Type")??0  %>'
                        Users='<%#GetUsers( Eval("Id")==null?0:int.Parse(Eval("AppointmentId").ToString() )) %>'
                       ></uc1:ScheduleInsertEditor>
    </AdvancedInsertTemplate>
    
    <AppointmentTemplate>
         <div>
            <h2>
                <%# Eval("Subject") %>
            </h2>
             
        </div>
    </AppointmentTemplate>
</telerik:RadScheduler>


Do I need to add something else?

Bex
Amit
Top achievements
Rank 1
 answered on 06 Jan 2014
3 answers
132 views
Hi,
    Is it possible to load/re-load XML on Client Side? 
or how to trigger the server side Load XML function by using javascript ?

Thank you for your answer.

Don
Princy
Top achievements
Rank 2
 answered on 06 Jan 2014
1 answer
102 views
Is there a way to display of group of toggle buttons using the RadButton just as standard buttons but when selected have the button look depressed? I do not want to use the RadToolbar for this.
Shinu
Top achievements
Rank 2
 answered on 06 Jan 2014
1 answer
121 views
How to remove this (dump.png) line/separator
Princy
Top achievements
Rank 2
 answered on 06 Jan 2014
7 answers
725 views
Dynamically created ComboBox and Load-on-demand not working .
Shinu
Top achievements
Rank 2
 answered on 06 Jan 2014
3 answers
246 views
VS 2008
Telerik version 2010.1.519.35


Up until 2 days ago this web page was working fine, I could use the radfilter to get the subset of data I needed.

Yesterday, I tried to use the web page, The following error keeps poping up

Line: 4723
Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '

<!DOCTYPE html P'.


so I activated the Grid filter no better luck the error keeps poping. The Grid sorting function give the same error
Do not ask  what I did  or modify the answer is Nothing. The only thing I may think of, would be, the automatic windows update that may update the framework!!!!!
 
Can annyone help

find attached a sample of my data I queried from SQL SERVER


thanks
Cherif diallo

***************************
FORM CODE
***************************
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/Admin/Main2c.master" AutoEventWireup="true" CodeFile="ListeDocuments.aspx.cs" Inherits="Administration_CMG_ListeDocuments" %><br><br><asp:Content ID="Content1" ContentPlaceHolderID="cphLeft" Runat="Server"><br></asp:Content><br><asp:Content ID="Content2" ContentPlaceHolderID="cphright" Runat="Server"><br><telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7"><br></telerik:RadSkinManager><br><asp:UpdatePanel runat="server"><br><ContentTemplate><br>    <telerik:RadFilter ID="rfDocumentations" runat="server" FilterContainerID="rlvDocumentations"><br>    <br>    </telerik:RadFilter><br>     <div class="RegistrationPage"><br>        <div class="clear"><br>        </div><br>        <div class="body"><br>            <div class="SectionBody"><br>              <table class="TableContainer"><br>                <tbody><br>                    <tr class="Row"><br>                        <td class="ItemName" ><br>                            <asp:Button ID="btnAjouter" runat="server" Text="Button" /><br>                       </td><br>                        <td class="ItemValue" ><br>                        </td><br>                    </tr><br>                </tbody><br>              </table><br>            </div><br>        </div><br>    </div><br>    <telerik:RadGrid ID="rlvDocumentations" runat="server" <br>        AllowSorting="true" <br>        AutoGenerateColumns="false"<br>        AllowPaging="true"<br>        AllowFilteringByColumn="true" <br>        onneeddatasource="rlvDocumentations_NeedDataSource"><br>    <MasterTableView DataKeyNames="PkId"><br>        <Columns><br>            <telerik:GridDateTimeColumn <br>                DataField="PublicationDate" <br>                DataType="System.DateTime" <br>                HeaderText="Publication Date" <br>                UniqueName="PublicationDate" <br>                DataFormatString="{0:dd MMM yyyy}"<br>                ItemStyle-Width="130px" <br>                AllowFiltering="True" <br>                AllowSorting="True"><br>            </telerik:GridDateTimeColumn><br>            <telerik:GridBoundColumn <br>                DataField="RaisonSociale" <br>                HeaderText="Raison Sociale" <br>                SortExpression="RaisonSociale"<br>                UniqueName="RaisonSociale" <br>                AllowFiltering="True" <br>                AllowSorting="True"><br>            </telerik:GridBoundColumn><br>            <telerik:GridTemplateColumn DataField="Title" <br>                HeaderText="Title" <br>                UniqueName="Title" <br>                AllowFiltering="True"><br>                <ItemTemplate><br>                              <a href="<%#GetRelativeLink(Eval("Slug").ToString()) %>" ><%#Eval("Title").ToString()%></a><br>                </ItemTemplate><br>            </telerik:GridTemplateColumn><br>    </Columns><br><br>    </MasterTableView><br>    </telerik:RadGrid><br></ContentTemplate><br></asp:UpdatePanel><br></asp:Content>







**************************
END FORM CODE
**************************

***********************
CODE BEHIND
***********************
using System;<br>using System.Collections.Generic;<br>using System.Linq;<br>using System.Web;<br>using System.Web.UI;<br>using System.Web.UI.WebControls;<br>using System.Data;<br>#region Using<br>using Norvatech.BLL;<br>using Norvatech.BusinessEntities;<br>using Norvatech.ResourceSettings.BLL;<br>using Norvatech.ResourceSettings.BusinessEntities;<br>using Norvatech.ResourceSettings.DAL;<br>using Norvatech.Common.IP;<br>using Norvatech.Common;<br>using Norvatech.Common.Caching;<br>using Telerik.Web.UI;<br>#endregion Using<br><br>public partial class Administration_CMG_ListeDocuments : System.Web.UI.Page<br>{<br>    protected void Page_Load(object sender, EventArgs e)<br>    {<br>        if (!Page.IsPostBack)<br>        {<br>            BindData();<br>            string urlBase = Request.AppRelativeCurrentExecutionFilePath;<br>            string urlrelative = urlBase.Replace(Request.Url.Segments[Request.Url.Segments.Length - 1], GetRelativeLink(GetLocaleResource("Company.NewCompanyUrl")));<br><br>            this.btnAjouter.PostBackUrl = urlrelative;<br><br>        }<br><br>    }<br>    protected void Page_PreInit(object sender, EventArgs e)<br>    {<br>        if (!Page.IsPostBack && !Page.IsCallback)<br>        {<br>            if ((Request.QueryString.Get("DocumentGroup") != null) && (Request.QueryString.Get("DocumentGroup").ToString().Trim().Length > 0))<br>            {<br>                DocumentGroup = Request.QueryString.Get("DocumentGroup").ToString().Trim();<br>            }<br><br>        }<br>    }<br>    public string DocumentGroup<br>    {<br>        get<br>        {<br>            if (ViewState["DocumentGroup"] != null)<br>            {<br>                return (string)ViewState["DocumentGroup"];<br>            }<br>            return null;<br>        }<br>        set<br>        {<br>            ViewState["DocumentGroup"] = value;<br>        }<br>    }<br>    public string GetLocaleResource(string resourcename)<br>    {<br>        string reternedval = resourcename;<br>        if (!string.IsNullOrEmpty(resourcename))<br>        {<br>            GetResources();<br><br>            foreach (LocalizedResources lsr in LocalResources)<br>            {<br>                if (lsr.ResourceName == resourcename)<br>                {<br>                    reternedval = lsr.LocalizationResourceValue;<br>                    break;<br>                }<br>            }<br>        }<br>        return reternedval;<br>    }<br>    private LocalizedResourceCollection LocalResources<br>    {<br>        get<br>        {<br>            if (ViewState["CompanyResources"] != null)<br>            {<br>                return (LocalizedResourceCollection)ViewState["CompanyResources"];<br>            }<br>            return null;<br>        }<br>        set<br>        {<br>            ViewState["CompanyResources"] = value;<br>        }<br>    }<br>    private DataSet MembersList<br>    {<br>        get<br>        {<br>            if (ViewState["MembersList"] != null)<br>            {<br>                return (DataSet)ViewState["MembersList"];<br>            }<br>            return null;<br>        }<br>        set<br>        {<br>            ViewState["MembersList"] = value;<br>        }<br><br>    }<br>    override protected void OnInit(EventArgs e)<br>    {<br>        InitializeComponent();<br>        base.OnInit(e);<br>    }<br>    private void InitializeComponent()<br>    {<br>        GetResources();<br>        LocalizeFilter();<br>    }<br>    private void GetResources()<br>    {<br>        if ((this.LocalResources == null) || (this.LocalResources.Count == 0))<br>        {<br>            LocalizedResourceCollection myresources = NSIResourceManager.GetResources(ResourceModules.Documentations, Norvatech.Common.Context.Current.CurrentLanguage.PkId);<br>            this.LocalResources = myresources;<br>        }<br><br>    }<br>    private void LocalizeFilter()<br>    {<br>        foreach (LocalizedResources lsr in LocalResources)<br>        {<br>            if (lsr.ResourceName == "GridFilter.AddExpressionToolTip") this.rfDocumentations.AddExpressionToolTip = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.AddGroupToolTip") this.rfDocumentations.AddGroupToolTip = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.ApplyButtonText") this.rfDocumentations.ApplyButtonText = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.Between") this.rfDocumentations.Localization.FilterFunctionBetween = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.BetweenDelimeterText") this.rfDocumentations.BetweenDelimeterText = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.Contains") this.rfDocumentations.Localization.FilterFunctionContains = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.DoesNotContain") this.rfDocumentations.Localization.FilterFunctionDoesNotContain = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.EndsWith") this.rfDocumentations.Localization.FilterFunctionEndsWith = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GreaterThan") this.rfDocumentations.Localization.FilterFunctionGreaterThan = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GreaterThanOrEqualTo") this.rfDocumentations.Localization.FilterFunctionGreaterThanOrEqualTo = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GroupOperationAnd") this.rfDocumentations.Localization.GroupOperationAnd = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GroupOperationNotAnd") this.rfDocumentations.Localization.GroupOperationNotAnd = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GroupOperationNotOr") this.rfDocumentations.Localization.GroupOperationNotOr = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GroupOperationOr") this.rfDocumentations.Localization.GroupOperationOr = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.IsEmpty") this.rfDocumentations.Localization.FilterFunctionIsEmpty = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.IsNull") this.rfDocumentations.Localization.FilterFunctionIsNull = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.LessThan") this.rfDocumentations.Localization.FilterFunctionLessThan = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.LessThanOrEqualTo") this.rfDocumentations.Localization.FilterFunctionLessThanOrEqualTo = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.NotBetween") this.rfDocumentations.Localization.FilterFunctionNotBetween = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.NotEqualTo") this.rfDocumentations.Localization.FilterFunctionNotEqualTo = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.EqualTo") this.rfDocumentations.Localization.FilterFunctionEqualTo = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.NotIsEmpty") this.rfDocumentations.Localization.FilterFunctionNotIsEmpty = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.NotIsNull") this.rfDocumentations.Localization.FilterFunctionNotIsNull = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.RemoveToolTip") this.rfDocumentations.RemoveToolTip = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.StartsWith") this.rfDocumentations.Localization.FilterFunctionStartsWith = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.ToolTip") this.rfDocumentations.ToolTip = lsr.LocalizationResourceValue;<br>            //if (lsr.ResourceName == "Filter.Usethistofilter") lbfilter.Text = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "Button.btnAdd") this.btnAjouter.Text = lsr.LocalizationResourceValue;<br><br><br>        }<br>    }<br>    public string GetRelativeLink(string slug)<br>    {<br>        return string.Concat("Ed/0101-", slug.Trim(), ".aspx");<br>    }<br>    public string FormatDate(DateTime date)<br>    {<br>        return string.Format("{0:dd MMM yyyy}", date);<br>    }<br>    private void BindData()<br>    {<br>        if (DocumentGroup != null)<br>            MembersList = DocumentationsManager.GetDocumentationAllSet(Norvatech.Common.Context.Current.CurrentLanguage.PkId, DocumentGroup);<br><br>        if (MembersList != null)<br>        {<br>            rlvDocumentations.DataSource = MembersList;<br>            rlvDocumentations.DataBind();<br>        }<br>        else<br>            this.Visible = false;<br>    }<br>    protected void rfDocumentations_FieldEditorCreated(object sender, RadFilterFieldEditorCreatedEventArgs e)<br>    {<br>        if (e.Editor.FieldName == "RaisonSociale") e.Editor.DisplayName = GetLocaleResource("Documentations.RaisonSociale");<br>        if (e.Editor.FieldName == "Title") e.Editor.DisplayName = GetLocaleResource("Documentations.Title");<br>        if (e.Editor.FieldName == "PublicationDate") e.Editor.DisplayName = GetLocaleResource("Documentations.PublicationDate");<br><br>    }<br>    protected void rlvDocumentations_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)<br>    {<br>        rlvDocumentations.DataSource = MembersList;<br><br>    }<br>}


**************************
END CODE BEHIND
*************************

DATA SAMPLE

<?xml version="1.0" encoding="utf-8" ?><br><ListInfo><br>    <itemInfo><br>        <RaisonSociale>SEMAFO GUINÉE SA.</RaisonSociale><br>        <PkId>1348D2D2-9E27-4750-80B3-7A54799A0819</PkId><br>        <CompanyID>46FF86E4-84FF-4504-A0B8-39D02523DFB2</CompanyID><br>        <PublicationDate>2010-12-17 16:20:45</PublicationDate><br>        <Auteur>Cherif Diallo</Auteur><br>        <Title>Formulaire d'enregistrement d'entreprise</Title><br>        <Slug>formulaire-d-enregistrement-d-entreprise</Slug><br>        <Visible>1</Visible><br>        <GroupTitle>Formulaires</GroupTitle><br>    </itemInfo><br></ListInfo><br>
Hany
Top achievements
Rank 1
 answered on 05 Jan 2014
3 answers
385 views
Do we need to install the telerik controls on the web server or can we just use the dll's in the bin directory of our web application?
Anand
Top achievements
Rank 1
 answered on 05 Jan 2014
3 answers
91 views
My grid is set up to batchedit mode with click-to-edit.

I've found a partial solution - use gridboundcolumn and gridcolumntemplate to control whether or not a column is batch editable. 

But can it be done programatically? preferrably on the server side during the databound event because i have to look at a value in the datarow.

Thanks
Raddy Rad
Top achievements
Rank 1
 answered on 04 Jan 2014
3 answers
250 views
   How to set max length of input area for editable RadAutoComleteBox  so that use can not enter more than specified max length?
Princy
Top achievements
Rank 2
 answered on 04 Jan 2014
1 answer
232 views
Hi,

I want to migrate Telerik to the version 2013.3.1217.40 and I notice that the button style in my EditFormSettings (usercontrol) has change.

I want to remove the default css for RadGrid_WebBlue input[type="button"] and to apply only mine.  I'm using the WebBlue skin with IE9.

My client like this skin except buttons!!!

I let you screenshot to explain what I'm trying to solve.

Thanks for your help

Steeve
<asp:Button ID="btnLinkEditCancel" runat="server" CssClass="Button" Style="margin-top: 6px;" ClientIDMode="Static" CommandName="Cancel" Text="<%$Resources:Application, Cancel %>" />
Princy
Top achievements
Rank 2
 answered on 04 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?