or
protected void RadGrid1_ItemCreated(object sender, Telerik.WebControls.GridItemEventArgs e) { if (e.Item is GridDataItem) { Button btn = (e.Item as GridDataItem)["TemplateColumn"].FindControl("Button1") as Button; ScriptManager1.RegisterPostBackControl(btn); } if (e.Item is GridCommandItem) { Button btncmd = (e.Item as GridCommandItem).FindControl("Button2") as Button; ScriptManager1.RegisterPostBackControl(btncmd); } }protected void ItemsGrid_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem) { Guid candidaturaId = new Guid(ItemsGrid.MasterTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString()); // create a new instance of ContactsManager with default provider CandidatureManager cm = new CandidatureManager(); // get the desired candidatura and set the values of the form ICandidatura candidatura = cm.GetCandidatura(candidaturaId); string ext = Path.GetExtension(candidatura.AllegatoFilename).ToLower(); CustomDownload cd = new CustomDownload { Filename = candidatura.AllegatoFilename, MimeType = (ext == ".pdf") ? MediaTypeNames.Application.Pdf : "application/unknown", Data = candidatura.Allegato.ToArray(), }; ScriptManager sm = (ScriptManager)Page.FindControl("TheScriptManager"); Response.ClearHeaders(); Response.ClearContent(); Response.AddHeader("Accept-Ranges", cd.Data.Length.ToString()); Response.AddHeader("Content-Disposition", "attachment;filename=" + cd.Filename); Response.ContentType = cd.MimeType; if (cd.Data.Length > 0) Response.BinaryWrite(cd.Data); Response.End(); } }Hi All,
Please go through the below link in Firefox 4.
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/headercontextmenu/defaultcs.aspx
When I Show/Hide the columns using Context Menu it is not auto - adjusting the width of the grid. It leaves an empty space
at the right hand side.Though it is working fine in IE(Internet Explorer) and lower versions of Firefox.
Can you please suggest how to get rid of this space so that it auto-adjusts itself.
Expecting for an early reply.
Thanks,
Amrita Mandal
if (content == "" || content == null || jQuery.trim(content) == "") { content = "<p> </p>"; } $("#telerik-editor").dialog("option", "title", title);$("#telerik-editor").dialog("open");var editor = $find("<%= radEditor.ClientID %>"); editor.set_html(content);$('input:visible').eq(0).trigger('focus');setTimeout(function(){ editor.setFocus(); if ($telerik.isFirefox){ setTimeout(function(){ editor.pasteHtml(""); editor.undo(1); }, 200); }; },200);<%@ Control Language="VB" AutoEventWireup="false" CodeFile="shoppingcart.ascx.vb" Inherits="ctl_shoppingcart" %><%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %><%@ Register assembly="DevExpress.Web.ASPxGridView.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dxwgv" %><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><script type="text/javascript"> function showSubDetail(URL) { var oWnd = radopen(URL, "windowItemDetail"); }</script><div class="shoppingcart"> <div class="heading"> Current Items in Your Cart </div> <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="true" EnableAJAX="true" DataSourceID="SqlDataSource1" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"> <MasterTableView AutoGenerateColumns="False" DataKeyNames="lineID" DataSourceID="SqlDataSource1" EditMode="InPlace"> <Columns> <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="editcolumn"></telerik:GridEditCommandColumn> <telerik:GridBoundColumn DataField="quoteID" DataType="System.Int32" HeaderText="quoteID" UniqueName="quoteID"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="lineID" HeaderText="lineID" UniqueName="lineID"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="enteredByContactID" HeaderText="enteredByContactID" UniqueName="enteredByContactID"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="containersOrdered" HeaderText="containersOrdered" UniqueName="containersOrdered"></telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> <br /><br /> <telerik:RadButton ID="btnCheckout" Text="Checkout" runat="server"> </telerik:RadButton> <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> <Windows> <telerik:RadWindow ID="windowItemDetail" CssClass="itemDetailWindow" runat="server" Modal="true" Behaviors="Close" Animation="Fade" AnimationDuration="500" width="500" Overlay="true" Title="Assorted Species Tray Detail" VisibleTitlebar="true" VisibleStatusbar="false"> </telerik:RadWindow> </Windows> </telerik:RadWindowManager> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues" ConnectionString="<%$ ConnectionStrings:RakerDBConnectionString %>" SelectCommand="spSelectQuoteDetailInfoByQuoteID" SelectCommandType="StoredProcedure" UpdateCommand="spUpdateQuoteDetailLineByCriteria" UpdateCommandType="StoredProcedure"> <SelectParameters> <asp:Parameter Name="quoteID" Type="Int32" DefaultValue="1229" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="quoteID" Type="Int32" /> <asp:Parameter Name="lineID" Type="Int32" /> <asp:Parameter Name="containersOrdered" Type="Int32" /> <asp:Parameter Name="enteredByContactID" Type="Int32" /> </UpdateParameters> </asp:SqlDataSource></div>Imports System.DataImports Telerik.Web.UIPartial Class ctl_shoppingcart Inherits System.Web.UI.UserControlEnd Class
<telerik:RadMenuItem runat="server" Text="Admin" Visible='<%# iif(session("UserID") = "1", "True", "False") %>'>