or
RadGrid Control: disabling drag and drop column is not working. User can pick the column and while dragging somewhere, following error comes
“
Unable to download.
Unspecified error
“
I have read the following link.
http://www.telerik.com/community/forums/aspnet/grid/disable-drag-and-drop.aspx
I have set the following properties in code behind and design view as well and both are not working.
telRadGrid.ClientSettings.AllowRowsDragDrop = False
telRadGrid.ClientSettings.ReorderColumnsOnClient = False
telRadGrid.ClientSettings.AllowDragToGroup = False
<ClientSettings AllowColumnsReorder="false" AllowDragToGroup="false" ReorderColumnsOnClient="false">
<Resizing AllowColumnResize="false" />
</ClientSettings>
<asp:FormView ID="frmDetail" runat="server" DataKeyNames="C_n_Id" OnItemUpdated="FormView_ItemUpdated" OnItemCommand="FormView_ItemCommand" DefaultMode="ReadOnly"> <ItemTemplate> <table style="padding:10px;"> <tbody style="vertical-align: top;"> <tr> <td width="80px"> <img src='<%# HttpUtility.UrlDecode(String.Format("{0}/_N{1}_small.png", HttpUtility.UrlEncode(Eval("C_s_ImageUrl").ToString()), Eval("C_n_Id"))) %>' width="64px" height="64px" class="RotatorImage" /> </td> <td> <asp:Label ID="lblDescription" runat="server" Text='<%# Bind("C_s_Description") %>' EnableTheming="true" /> </td> </tr> </tbody> </table> <br /> <b>Name:</b> <asp:Label ID="ProductNameLabel" runat="server" Text='<%# Bind("C_s_Name") %>' EnableTheming="true" /><br /> <b>Description:</b> <br /> <asp:Button ID="EditButton" Text="Edit" CommandName="Edit" runat="server" /> <asp:Button ID="Button1" Text="Insert" CommandName="Insert" runat="server" /> </ItemTemplate> <EditItemTemplate> <asp:Label runat="server" ID="lblTest" Text="Edit" /> <asp:TextBox ID="lblDescription2" runat="server" Text='<%# Bind("C_s_Description") %>' /> </EditItemTemplate> <InsertItemTemplate> <asp:Label runat="server" ID="lblTest" Text="Insert" /> </InsertItemTemplate> </asp:FormView>private Int64 LastID { get { return Convert.ToInt64(ViewState["LastID"]); } set { ViewState["LastID"] = value; } } protected void FormView_ItemUpdated(Object sender, FormViewUpdatedEventArgs e) { this.frmDetail.DataBind(); } protected void FormView_ItemCommand(object sender, FormViewCommandEventArgs e) { switch (e.CommandName) { case "Edit": this.frmDetail.ChangeMode(FormViewMode.Edit); break; } } protected void Page_Load(object sender, EventArgs e) { this.RebindRotator(); } private void RebindRotator() { thumbRotator.DataSource = DbContext.tblAccountNotifications.OrderBy(t=>t.C_s_Name); thumbRotator.DataBind(); } protected void BindForm() { this.frmDetail.DataSource = DbContext.tblAccountNotifications.Where(t => t.C_n_Id == this.LastID); this.frmDetail.DataBind(); } protected void GetSubscription(object sender, RadRotatorEventArgs e) { RadRotator rotator = sender as RadRotator; rotator.InitialItemIndex = e.Item.Index;// Persist the index this.LastID = Convert.ToInt64(((Label)e.Item.FindControl("lblId")).Text); this.BindForm(); }1,102,11,2,25,3,
| protected void RadReplies_PageIndexChanged(object source, GridPageChangedEventArgs e) |
| { |
| RadReplies.PageIndexChanged = e.NewPageIndex; |
| Bind_Posts(); |
| } |
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadMultiPage"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadMultiPage" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadTabStrip"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadMultiPage" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManager><telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /><div class="right"></div><div class="left"> <telerik:RadTabStrip ID="RadTabStrip" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage" CssClass="NoBg"> </telerik:RadTabStrip> <telerik:RadMultiPage ID="RadMultiPage" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage_PageViewCreated" /></div>
The usercontrols for the RadMultiPage are loaded as shown here: http://demos.telerik.com/aspnet-classic/TabStrip/Examples/Application/AddDynamicUserControls/DefaultCS.aspx.
Lastly the usercontrol with the problem:
<telerik:RadGrid ID="radGrid1" runat="server" DataSourceID="dsMatrix" AutoGenerateColumns="False" Width="100%">
<ClientSettings>
<Selecting CellSelectionMode="None"></Selecting>
</ClientSettings>
<MasterTableView Width="100%" EditMode="InPlace" AllowAutomaticDeletes="True" AllowAutomaticUpdates="true" AllowAutomaticInserts="True" DataKeyNames="ID, RowVersion">
<Columns>
<telerik:GridBoundColumn DataField="ID" Visible="false" />
<telerik:GridTemplateColumn DataField="Richtext" HeaderText="Richtext" HeaderStyle-Width="100%">
<ItemTemplate>
<telerik:RadEditor ID="txtRichtext" Runat="server" EditModes="Design" ToolsFile="RadEditorBasic.xml" EnableResize="False" Content='<%# Bind("Richtext") %>' AutoResizeHeight="True" Height="100px" Width="100%" Enabled="False" ReadOnly="True" />
</ItemTemplate>
<EditItemTemplate>
<telerik:RadEditor ID="txtRichtext" Runat="server" EditModes="Design" ToolsFile="RadEditorBasic.xml" EnableResize="False" Content='<%# Bind("Richtext") %>' AutoResizeHeight="True" Height="100px" Width="100%" />
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" />
</Columns>
<EditFormSettings>
<EditColumn ButtonType="ImageButton" ItemStyle-HorizontalAlign="Center"/>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
So again: When removing the RadAjaxManager from the container, the "Richtext" field is properly saved. When RadAjaxManager is present as shown above, the field is not saved at all. Any other type of field I add is saved properly.
Any suggestions to get this to work with still having the fancy "loading" animation instead of the full page postback?