Telerikスケジューラ「UniqueIDプロパティ」 - それにアクセスする方法

StackOverflow https://stackoverflow.com/questions/1920665

  •  20-09-2019
  •  | 
  •  

質問

私は私のベースとしてTelerikデモShedulerを使用しています。私はこのようなデータロードを変更しています:

public class SessionAppointmentCollection : ObservableCollection<SessionAppointment>, IAppointmentFactory 
    { 

        /// <summary> 
        /// Gets sample appointments. 
        /// </summary> 
        /// <value>The appointments.</value> 
        public SessionAppointmentCollection(RadScheduler scheduler) 
        { 
//            int month = DateTime.Now.Month; 
//            DateTime mondayDate = CalendarHelper.GetFirstDayOfWeek(DateTime.Today, DayOfWeek.Monday); 
//            DateTime satDate = CalendarHelper.GetFirstDayOfWeek(DateTime.Today, DayOfWeek.Saturday); 
//            DateTime lastsundayDate = CalendarHelper.GetEndOfMonth(DateTime.Today); 



            DataTable dtActions = SqlHelper.GetTable("base_Action_Search");//, new string[] { "@CompanyName", client, "@TaskTypeID", db_TaskTypeID.SelectedValue.ToString() });//, "@Users", Users }); 
            foreach (DataRow dr in dtActions.Rows) 
            { 
                SessionAppointment appointmentas = new SessionAppointment(); 

                appointmentas.UniqueId = dr["ActionID"].ToString(); 
                appointmentas.Subject = dr["ActionName"].ToString(); 
                appointmentas.Body = dr["Comments"].ToString(); 
                DateTime start = Convert.ToDateTime(dr["StartDate"].ToString()); 
                appointmentas.Start = start; 
                appointmentas.End = start.AddMinutes(Convert.ToInt32(dr["Duration"].ToString())); 
                appointmentas.SessionRoom = "01"; 
                appointmentas.Speaker = "Testinis vartotojas"; 
                appointmentas.Level = 300; 
                appointmentas.Category = dr["Priority"].ToString().Equals("-1") ? scheduler.Categories.GetCategoryByName("WebDevelopement") : scheduler.Categories.GetCategoryByName("WindowsAndFrameworks"); ; 

                Add(appointmentas); 
            } 

今私は、削除を実装したいです。しかし、私は一意IDプロパティにアクセスカント?私はそれを行うことができますどのように..?

役に立ちましたか?

解決

ポストは、以下のようにいくつかの光を投げかけています。 のhttp:// WWW。 telerik.com/community/forums/wpf/scheduler/uniqueid-property-how-to-access-it.aspxする

ユニークIDにアクセスするためにRadSchedulerのAppointmentオブジェクトへのAppointmentDeletedEventArgsの(それがタイプIAppointmentであるため)

基本的に、あなたはe.Appointment引数をキャストする必要があります。

他のヒント

この記事あなたのために働く必要があり、以下の答えを、与えます:

Appointment appointment = appointmentElement.Appointment as Appointment;
Guid appId = appointment.UniqueId;
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top