I'm trying to swap 2 columns within the RadGrid ColumnCreated event (see code below). When I step through the code with the debugger, it appears to be working, but when the page renders, the columns are not swapped. I have 2 columns in the markup (update & delete links) and a number of other columns that are auto-generated. I'm trying to swap the 2nd column in the markup with the last auto-generated column. Why are the columns not swapping? TIA, Gary.
| protected void rgContacts_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e) |
| { |
| switch (e.Column.UniqueName) |
| { |
| case "PartyId": |
| case "GUID": |
| case "Code": |
| case "Type": |
| e.Column.Visible = false; |
| break; |
| case "LastColumn": |
| GridColumn gcDelete = rgContacts.MasterTableView.Columns.FindByUniqueName("DeleteCommand"); |
| if (gcDelete != null) |
| e.OwnerTableView.SwapColumns(e.Column, gcDelete); |
| e.Column.Visible = false; |
| break; |
| } |
| private void buildContextMenu() |
| { |
| rscSchedule.AppointmentContextMenus.Clear(); |
| RadSchedulerContextMenu context = new RadSchedulerContextMenu(); |
| context.ID = "apptContext"; |
| RadMenuItem edit = new RadMenuItem("Open"); |
| edit.Value = "CommandEdit"; |
| context.Items.Add(edit); |
| RadMenuItem sep1 = new RadMenuItem(); |
| sep1.IsSeparator = true; |
| context.Items.Add(sep1); |
| IQueryable<AppointmentResourceType> resourceTypes = Appointments.AppointmentResourceTypesGet(MultiSite.SiteIDGet()); |
| foreach (AppointmentResourceType resourceType in resourceTypes) |
| { |
| RadMenuItem menuRType = new RadMenuItem(resourceType.ResourceTypeDesc); |
| IQueryable<AppointmentResourceTypeItem> statusItems = Appointments.AppointmentResourceTypeItemsGet(resourceType.ResourceTypeID); |
| foreach (AppointmentResourceTypeItem statusItem in statusItems) |
| { |
| RadMenuItem menuStatus = new RadMenuItem(statusItem.ResourceTypeItemDesc); |
| menuStatus.Value = statusItem.ResourceTypeItemID.ToString(); |
| menuRType.Items.Add(menuStatus); |
| } |
| context.Items.Add(menuRType); |
| } |
| RadMenuItem sep2 = new RadMenuItem(); |
| sep2.IsSeparator = true; |
| context.Items.Add(sep2); |
| RadMenuItem del = new RadMenuItem("Delete"); |
| del.Value = "CommandDelete"; |
| del.ImageUrl = "~/Presentation/Images/radDelete.gif"; |
| context.Items.Add(del); |
| rscSchedule.AppointmentContextMenus.Add(context); |
| } |
I keep having problems with disappearing line breaks.
For instance, in a empty project with the latest RadEditor in IE8:
In html mode write this:
| <p>first line</p> |
| <p>second line </p> |
In design you'll get
| first line |
| second line |
Place your cursor on the third line before the word "second" and press enter 3 times for instance.
This will result in this code in html view:
| <p>first line</p> |
| <p ><br /> |
| <br /> |
| second line </p> |

| <asp:ScriptManager runat="server"> |
| </asp:ScriptManager> |
| <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="btn"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="hField" /> |
| <telerik:AjaxUpdatedControl ControlID="textbox" /> |
| <telerik:AjaxUpdatedControl ControlID="btn" /> |
| <telerik:AjaxUpdatedControl ControlID="label" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| <ClientEvents OnRequestStart="requestStart" /> |
| </telerik:RadAjaxManager> |
| <asp:HiddenField ID="hField" runat="server" /> |
| <asp:TextBox ID="textbox" runat="server" /> |
| <asp:Button ID="btn" runat="server" OnClick="btn_Cick" OnClientClick="btn_ClientClick()" /><br /> |
| <asp:Label ID="label" runat="server" /> |
| <script type="text/javascript"> |
| function requestStart(sender, args) { |
| $get('hField').value = $get('textbox').value; |
| } |
| function btn_ClientClick() { |
| //$get('hField').value = $get('textbox').value; |
| } |
| </script> |
| protected void btn_Cick(object sender, EventArgs e) |
| { |
| label.Text = hField.Value; |
| } |
We are using Telerik dll Version 2009.3.1103.35. It includes the RadEditor (don't know its version). Our clients wants help on
using the editor as an end-user. So, we downloaded end-user manual (RadEditorAjaxEndUserManual.pdf) from Telerik's documentation
site; it is telling it's version is 2008.2.826.
But, our Clients are telling, what they see in the documentation, doesn't match with what they see in the web site rad editor -
especially when they are trying to use tables in the editor.
My question is, is the documentation we have downloaded is the one that we should give to our client, if you take into account
the Telerik dll version that we are using - cannot be changed? If not, then can you give the url where we can find it (if
possible as pdf).