Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
166 views
Hi,

My grid's column reorder settings:
_radGrid.ClientSettings.AllowColumnsReorder = true
_radGrid.ClientSettings.ReorderColumnsOnClient = true
_radGrid.ClientSettings.ColumnsReorderMethod = GridClientSettings.GridColumnsReorderMethod.Reorder; 

And have two columns: A and B, A's width is large and align left, B's width is small and align right, After reorder these two columns, the header and data swapped but can not keep its width and align attribute: A became small and align left, B is large and align right!

How to keep column's width and horizontal align?
Liu Peng
Top achievements
Rank 1
 answered on 03 Jun 2009
3 answers
127 views
Hi,

I am not sure this is a bug or I missed some settings. On nested template view, I able expand the nested template view however when there clicks page change on the grid.  The expand function is no longer working.

Regards,

Duy
Duy
Top achievements
Rank 1
 answered on 03 Jun 2009
0 answers
127 views
Hello, can anyone point in the direction or provide the recommended way in printing out the calendar appointments in our c# application in more detail since clicking on 'Print Preview' in the browser just shows the schedules in an image way and not the specifics of each item?

Thanks in advance.
.
Top achievements
Rank 1
 asked on 02 Jun 2009
0 answers
100 views
Hello, I have been tasked with updating some older code to work with the new version of the Rad Controls, and I've run into an issue I cannot resolve. The old code was making use of some javascript from RadControlsNamespace and calling an Ease method to animate certain RadPanelBarItems. I cannot find the new names or methods for this functionality.


David
Top achievements
Rank 1
 asked on 02 Jun 2009
3 answers
217 views
Background:

I have implemented Rad Scheduler in a MOSS 2007 SP1 web part. I have bound the scheduler to an object data source following this example:

http://www.telerik.com/help/aspnet-ajax/schedule_gettingstarted.html

The web part is rendering properly and the scheduler is binding data from the custom data source.

Problem:

On insert, update, and delete, my web part errors and throws the standard SharePoint "an unexpected error has occured" page. I have all my custom code wrapped in try/catch blocks, so I'm pretty sure it's not a problem with my custom code.

Since the scheduler is rendering and pulling the data, I know the control is properly configured (web.config, script manager, etc). I also know that the object data source select method is working - it's pulling the data properly.

To troubleshoot I have commented out all code in the actual InsertTask method - to ensure my custom code is not throwing the error.

So I'm pretty much stumped as to what is causing this. Here is my relavent code:

Data Source Creation - inside OnInit() method

                    ds = new ObjectDataSource();  
                    ds.ID = "dsTaskList";  
                    ds.TypeName = "WIT.TaskList.TaskList";  
                    ds.SelectMethod = "AllData";  
                    ds.SelectParameters.Add("siteurl", _site);  
                    ds.SelectParameters.Add("webname", _web);  
                    ds.SelectParameters.Add("tasklistname", _tasklist);  
                    ds.SelectParameters.Add("viewname", _view);  
                    ds.SelectParameters.Add("startdatefield", _datastarttimefield);  
                    ds.SelectParameters.Add("enddatefield", _dataendtimefield);  
                    ds.SelectParameters.Add("subjectfield", _datasubjectfield);  
                    ds.InsertMethod = "InsertTask";  
                    ds.InsertParameters.Add(new Parameter("Subject", System.Data.DbType.String));  
                    ds.InsertParameters.Add(new Parameter("Start", System.Data.DbType.DateTime));  
                    ds.InsertParameters.Add(new Parameter("End", System.Data.DbType.DateTime));  
                    ds.InsertParameters.Add("siteurl", _site);  
                    ds.InsertParameters.Add("webname", _web);  
                    ds.InsertParameters.Add("tasklistname", _tasklist);  
                    ds.InsertParameters.Add("viewname", _view);  
                    ds.InsertParameters.Add("startdatefield", _datastarttimefield);  
                    ds.InsertParameters.Add("enddatefield", _dataendtimefield);  
                    ds.InsertParameters.Add("subjectfield", _datasubjectfield);  
                    ds.UpdateMethod = "UpdateTask";  
                    ds.UpdateParameters.Add(new Parameter("ID", System.Data.DbType.Int32));  
                    ds.UpdateParameters.Add(new Parameter("Subject", System.Data.DbType.String));  
                    ds.UpdateParameters.Add(new Parameter("Start", System.Data.DbType.DateTime));  
                    ds.UpdateParameters.Add(new Parameter("End", System.Data.DbType.DateTime));  
                    ds.UpdateParameters.Add("siteurl", _site);  
                    ds.UpdateParameters.Add("webname", _web);  
                    ds.UpdateParameters.Add("tasklistname", _tasklist);  
                    ds.UpdateParameters.Add("viewname", _view);  
                    ds.UpdateParameters.Add("startdatefield", _datastarttimefield);  
                    ds.UpdateParameters.Add("enddatefield", _dataendtimefield);  
                    ds.UpdateParameters.Add("subjectfield", _datasubjectfield);  
                    ds.DeleteMethod = "DeleteTask";  
                    ds.DeleteParameters.Add(new Parameter("ID", System.Data.DbType.Int32));  
                    ds.DeleteParameters.Add("siteurl", _site);  
                    ds.DeleteParameters.Add("webname", _web);  
                    ds.DeleteParameters.Add("tasklistname", _tasklist);  
                    ds.DeleteParameters.Add("viewname", _view);  
                    ds.DeleteParameters.Add("startdatefield", _datastarttimefield);  
                    ds.DeleteParameters.Add("enddatefield", _dataendtimefield);  
                    ds.DeleteParameters.Add("subjectfield", _datasubjectfield);  
                    this.Page.Controls.AddAt(1, ds); 

Web Part - CreateChildControls()
                    //new instance of scheduler  
                    schedule = new RadScheduler();  
                    //set scheduler appearance  
                    schedule.Width = Unit.Percentage(100);  
                    schedule.Height = Unit.Percentage(100);  
                    schedule.Skin = _skin;  
                    schedule.SelectedView = _startview;  
                    //set scheduler data properties  
                    schedule.DataSourceID = ds.ID;  
                    schedule.DataKeyField = "_id";  
                    schedule.DataEndField = "_enddatetime";  
                    schedule.DataStartField = "_startdatetime";  
                    schedule.DataSubjectField = "_subject";  
                    //other scheduler properties  
                    schedule.AllowDelete = _allowdelete;  
                    schedule.AllowEdit = _allowedit;  
                    schedule.AllowInsert = _allowinsert;  
                    schedule.EnableAjaxSkinRendering = true;  
                    schedule.DayEndTime = _dayendtime;  
                    schedule.DayStartTime = _daystarttime;  
                    schedule.FirstDayOfWeek = _firstdayofweek;  
                    schedule.WorkDayEndTime = _workdayendtime;  
                    schedule.WorkDayStartTime = _workdaystarttime;  
                    schedule.StartInsertingInAdvancedForm = true;  
                    schedule.StartEditingInAdvancedForm = false;  
                    //add scheduler to control collection  
                    Controls.Add(schedule);  
                    schedule.DataBind(); 

TaskList.cs
        const string TasksKey = "TaskListScheduler_key";  
        public static List<TaskInfo> AllData(string siteurl, string webname, string tasklistname, string viewname, string startdatefield, string enddatefield, string subjectfield)  
        {  
            List<TaskInfo> sessApts = HttpContext.Current.Session[TasksKey] as List<TaskInfo>;  
            if (sessApts == null)  
            {  
                sessApts = new List<TaskInfo>();  
 
                SPSecurity.RunWithElevatedPrivileges(delegate()  
                {  
                    //get task list information  
                    using (SPSite site = new SPSite(siteurl))  
                    {  
                        SPWeb web = site.OpenWeb(webname);  
                        SPList tasklist = web.Lists[tasklistname];  
                        SPView view = tasklist.Views[viewname];  
                        SPListItemCollection lic = tasklist.GetItems(view);  
 
                        foreach (SPListItem item in lic)  
                        {  
                            if (item[startdatefield] != null)  
                            {  
                                if (item[enddatefield] != null)  
                                {  
                                    if (item[subjectfield] != null)  
                                    {  
                                        string subject = Convert.ToString(item[subjectfield]);  
                                        DateTime start = (DateTime)item[startdatefield];  
                                        DateTime end = (DateTime)item[enddatefield];  
 
                                        //if (start <= end)  
                                        //{  
                                        //    if (start == end)  
                                        //    {  
                                        //end = end.AddDays(1);  
                                        TaskInfo ti = new TaskInfo(Convert.ToInt32(item["ID"]), subject, start, end);  
                                        sessApts.Add(ti);  
                                        //    }  
                                        //}  
                                    }  
                                }  
                            }  
                        }  
                    }  
                });  
 
                HttpContext.Current.Session[TasksKey] = sessApts;  
            }  
            return sessApts;  
        }  
        public static void InsertTask(string Subject, DateTime Start, DateTime End, string siteurl, string webname, string tasklistname, string viewname, string startdatefield, string enddatefield, string subjectfield)  
        {  
 
            List<TaskInfo> sessApts = (List<TaskInfo>)HttpContext.Current.Session[TasksKey];  
 
            int ID = 0;  
            //try  
            //{  
            //    SPSecurity.RunWithElevatedPrivileges(delegate()  
            //    {  
            //        using (SPSite site = new SPSite(siteurl))  
            //        {  
            //            //open task list  
            //            SPWeb web = site.OpenWeb(webname);  
            //            SPList tasklist = web.Lists[tasklistname];  
            //            //add new item to list  
            //            SPListItem item = tasklist.Items.Add();  
            //            //get ID  
            //            ID = item.ID;  
            //            //set meta data values  
            //            item[subjectfield] = Subject;  
            //            item[startdatefield] = Start;  
            //            item[enddatefield] = End;  
            //            //update inserted item with meta data  
            //            item.Update();  
            //        }  
            //    });  
            //}  
            //catch (Exception ex) { HttpContext.Current.Response.Write(ex.ToString()); }  
 
            TaskInfo ti = new TaskInfo(ID, Subject, Start, End);  
            sessApts.Add(ti);  
            HttpContext.Current.Session[TasksKey] = sessApts;  
        }  
        public static void DeleteTask(int ID, string siteurl, string webname, string tasklistname, string viewname, string startdatefield, string enddatefield, string subjectfield)  
        {  
            try 
            {  
                List<TaskInfo> sessApts = AllData(siteurl, webname, tasklistname, viewname, startdatefield, enddatefield, subjectfield);  
 
                SPSecurity.RunWithElevatedPrivileges(delegate()  
                {  
                    using (SPSite site = new SPSite(siteurl))  
                    {  
                        //open task list  
                        SPWeb web = site.OpenWeb(webname);  
                        SPList tasklist = web.Lists[tasklistname];  
                        //delete item  
                        tasklist.Items.DeleteItemById(ID);  
                    }  
                });  
 
                sessApts.Remove(FindById(ID, sessApts));  
            }  
            catch (Exception ex) { HttpContext.Current.Response.Write(ex.ToString()); }  
        }  
        public static void UpdateTask(int ID, string Subject, DateTime Start, DateTime End, string siteurl, string webname, string tasklistname, string viewname, string startdatefield, string enddatefield, string subjectfield)  
        {  
            try 
            {  
                List<TaskInfo> sessApts = AllData(siteurl, webname, tasklistname, viewname, startdatefield, enddatefield, subjectfield);  
 
                SPSecurity.RunWithElevatedPrivileges(delegate()  
                {  
                    using (SPSite site = new SPSite(siteurl))  
                    {  
                        //open task list  
                        SPWeb web = site.OpenWeb(webname);  
                        SPList tasklist = web.Lists[tasklistname];  
                        //get list item to update  
                        SPListItem item = tasklist.GetItemById(ID);  
                        //set meta data values  
                        item[subjectfield] = Subject;  
                        item[startdatefield] = Start;  
                        item[enddatefield] = End;  
                        //update item with new meta data  
                        item.Update();  
                    }  
                });  
 
                TaskInfo ti = FindById(ID, sessApts);  
                ti._subject = Subject;  
                ti._startdatetime = Start;  
                ti._enddatetime = End;  
            }  
            catch (Exception ex) { HttpContext.Current.Response.Write(ex.ToString()); }  
        }  
        public static TaskInfo FindById(int ID, List<TaskInfo> sessTasks)  
        {  
            foreach (TaskInfo ti in sessTasks)  
            {  
                if (ti._id == ID)  
                {  
                    return ti;  
                }  
            }  
            return null;  
        } 

TaskInfo.cs
public class TaskInfo  
    {  
        public int _id { getset; }  
        public string _subject { getset; }  
        public DateTime _startdatetime { getset; }  
        public DateTime _enddatetime { getset; }  
 
        public TaskInfo(int id, string subject, DateTime start, DateTime end)   
        {  
            this._id = id;  
            this._subject = subject;  
            this._startdatetime = start;  
            this._enddatetime = end;  
         }  
    } 

Please let me know if I can provide any other information that would be helpful in resolving this issue. Thanks.
Joe
Top achievements
Rank 1
 answered on 02 Jun 2009
2 answers
88 views

HI all,

We're currently running with version 2009.1.527.20.  

Prior to this, with version 2009.1.311 I believe it was, we had a set of RadWindow pages that contained a vertical RadSplitter with content area above and a static set of buttons below.  With the previous version, this set up behaved correctly, with the Splitter resizing with the RadWindow and the top Splitter pane scrolling as needed.

When switching to the newest Telerik dll release, this set up no longer works correctly.  FullScreenMode, at least with a vertical (Orientation="Horizontal") Splitter set up, seems to be broken.

<telerik:RadSplitter id="RadSplitter1" runat="server" FullScreenMode="true" Width="100%" 
                    VisibleDuringInit="false" LiveResize="false"  
                    Skin="Web20" Orientation="Horizontal">             
            <telerik:RadPane ID="MasterPageRadContentPane" runat="server" Scrolling="Both">                   
              <div id="master_middle" style="font-size:.8em;"
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">   
                </asp:ContentPlaceHolder> 
              </div> 
            </telerik:RadPane> 
            <telerik:RadPane ID="FooterContentPane" runat="server" Scrolling="None" Height="40px"
             <div style="padding:5px 0px 10px 5px;"
              <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server"
              </asp:ContentPlaceHolder> 
             </div> 
            </telerik:RadPane>         
          </telerik:RadSplitter> 


Any information on changed layout css settings or set up that needs to be done with this new release would be very much appreciated.

Thanks,

Adam.g
Adam
Top achievements
Rank 1
 answered on 02 Jun 2009
29 answers
554 views
With the move to sprite files for the skins , it seems to me a worthwhile effort for telerik woud be a clear guide to which parts of the sprite are used for what.


Yes i could work backwards thro the css files decrypting all those negative positions markers  

Indeed i just started doing this for menu but i am sure a whole load of people are having to do the self same thing so telerik map out those  sprite files please



kmv
Kim
Top achievements
Rank 1
 answered on 02 Jun 2009
4 answers
128 views
Hi,
I'm using the grid and have created a nested master file.  However what is happening the Grid is not being placed in the correct column:

Can't attached the screen shot.  I changed the width and nothing happens can I adjust the Skin in the Grids?

thanks,
Joe
Top achievements
Rank 1
 answered on 02 Jun 2009
2 answers
78 views
Hi,

You can see a big problem : Image radscheduler

I have download the last build : 2009.1.527.35 but it is the same thing.
Do you have an idea ? 
Jean-Yves
Top achievements
Rank 1
 answered on 02 Jun 2009
2 answers
94 views
Hi,

Before using the Scheduler I was using the Calendar.
In this component, I had a methode : Calendar_DayRender where I can put :
c = e.Cell
c.Controls.Add(New LiteralControl("(s" + week.ToString + ")"))

This is to put the number of the week. Do you have a solution with the scheduler ?

Thank

Jean-Yves
Jean-Yves
Top achievements
Rank 1
 answered on 02 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?