I am creating the webpart in share point
I am having the the Rad schedular in side the Ajax Panel.Every thing is working fine
I need to acheive the same functionality like this(export to icalandar)
http://demos.telerik.com/aspnet-ajax/scheduler/examples/export/defaultcs.aspx.
I tried to export the individual events, at the time i got the error.Because individual item export image button inside the Ajax panel.I need to exclude this image button from Ajax inside the share point.How can i do this?
Here is my code
public class AppTemplate : ITemplate
    {
        private DataTable dtfinalResult = new DataTable();
        private ScriptManager _ScriptManager;
        public AppTemplate(DataTable dtResult, ScriptManager ScriptManager)
        {
            dtfinalResult = dtResult.Copy();
            _ScriptManager = ScriptManager;
        }
        
        public void InstantiateIn(Control container)
        {
            ImageButton imgexport = new ImageButton();
            imgexport.CommandName = "Export";
            imgexport.ImageUrl = "/_layouts/images/smallOutlook.gif";
            imgexport.Width = new Unit(20);
            //Exclude from the Ajax
            //_ScriptManager.RegisterPostBackControl(imgexport);
            //imgexport.Attributes.Add("onclick", string.Format("realPostBack(this, \"\"); return false;"));
                //container.Controls.Add(imgexport);
            Literal subject = new Literal();            
            subject.DataBinding += subject_DataBinding;            
            container.Controls.Add(subject);
            CalendarPlus calendarplus = new CalendarPlus();  
            
        
        }
        private void subject_DataBinding(object sender, EventArgs e)
        {
            Literal subject = (Literal)sender;
            IDataItemContainer aptContainer = (IDataItemContainer)subject.BindingContainer;
            //Access the appointment object and set its AllowEdit property:
            SchedulerAppointmentContainer aptCont = (SchedulerAppointmentContainer)subject.Parent;
            Appointment app = aptCont.Appointment;
            int APPID = int.Parse(app.ID.ToString());
            app.AllowEdit = false;
            DataView dvFinalresult = dtfinalResult.DefaultView;
            dvFinalresult.RowFilter = "FieldID=" + APPID;
            DataTable dtCurrentApp = dvFinalresult.ToTable();
            DateTime dtevent = DateTime.Parse(dtCurrentApp.Rows[0]["EventDate"].ToString());
            string strSubject = HttpUtility.HtmlEncode((string)DataBinder.Eval(aptContainer.DataItem, "Subject"));
            if (dtCurrentApp.Rows.Count > 0)
            {
                subject.Text = "<span id=\"spanID\" curDivDate=\"" + dtevent.ToString().Replace("/","_").Replace(" ","_")+ "\" title='' onmouseover=\"wsc_showmenu(this); return false\" ><A  HREF=\"javascript:void(window.open('" + dtCurrentApp.Rows[0]["URL"].ToString().Trim() + "'))\">" + strSubject + "</a></span>";
            }
            else
            {
                subject.Text = strSubject;
            }
        }
    }
Regards
Vairam
