Radlistbox fires both OnClientItemChecked and OnClientSelectedIndexChanged when an item is checked in Firefox and IE but not in Chrome.
Chrome seems to have the proper behavior. Is there a reason for this? Can I make IE and Firefox behave accordingly as well?
<telerik:RadListBox ID="radListBox0" runat="server" Height="400" Width="275"SelectionMode="Single" CheckBoxes="true" Visible="true"CssClass="RadListBox_SlidingPanel" EnableEmbeddedSkins="False"EnableEmbeddedBaseStylesheet="False"OnClientItemChecked="ListBoxIndexCheckToggled"OnClientSelectedIndexChanged="ListBoxIndexChanged" />
protected void gridReport_ExcelMLExportStylesCreated(object source, GridExportExcelMLStyleCreatedArgs e) { StyleElement oneDecimalStyle = new StyleElement("oneDecimalStyle"); oneDecimalStyle.NumberFormat.FormatType = NumberFormatType.Fixed; oneDecimalStyle.NumberFormat.Attributes["ss:Format"] = "0/.0"; e.Styles.Add(oneDecimalStyle); } protected void gridReport_ExcelMLExportRowCreated(object source, GridExportExcelMLRowCreatedArgs e) { if (e.RowType == GridExportExcelMLRowType.DataRow) { CellElement cell = e.Row.Cells.GetCellByName("airDuration"); cell.StyleValue = "oneDecimalStyle"; } } Protected Sub RadGrid1_ItemCreated1(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated .... Dim btn_excel As LinkButton = TryCast(item.FindControl("btn_excel"), LinkButton) ScriptManager.GetCurrent(Page).RegisterPostBackControl(btn_excel) ....End SubSub buildExport(ByVal type As String) RadGrid1.MasterTableView.Columns.Clear() Dim boundColumn As GridBoundColumn For Each column As DataColumn In Datasource.Columns If GridDataKeyNames <> "" Then If Not GridDataKeyNames.Contains(column.ColumnName.ToString()) Then If column.ColumnName.ToString().ToLower().IndexOf("_hidden") < 0 And column.ColumnName.ToString().ToLower().IndexOf("rowclick") < 0 Then boundColumn = New GridBoundColumn RadGrid1.MasterTableView.Columns.Add(boundColumn) boundColumn.DataField = column.ColumnName boundColumn.HeaderText = column.ColumnName.Replace("_", " ") Else boundColumn = New GridBoundColumn RadGrid1.MasterTableView.Columns.Add(boundColumn) boundColumn.DataField = column.ColumnName boundColumn.HeaderText = column.ColumnName boundColumn.Visible = False End If Else End If Else If column.ColumnName.ToString().ToLower().IndexOf("_hidden") < 0 And column.ColumnName.ToString().ToLower().IndexOf("rowclick") < 0 Then boundColumn = New GridBoundColumn RadGrid1.MasterTableView.Columns.Add(boundColumn) boundColumn.DataField = column.ColumnName boundColumn.HeaderText = column.ColumnName.Replace("_", " ").ToLower() Else boundColumn = New GridBoundColumn RadGrid1.MasterTableView.Columns.Add(boundColumn) boundColumn.DataField = column.ColumnName boundColumn.HeaderText = column.ColumnName.ToLower() boundColumn.Visible = False End If End If Next RadGrid1.DataSource = Datasource RadGrid1.DataBind() RadGrid1.PageSize = Datasource.Rows.Count() RadGrid1.ExportSettings.IgnorePaging = True Select Case type Case "excel" RadGrid1.ExportSettings.ExportOnlyData = True RadGrid1.MasterTableView.ExportToCSV() Case "pdf" RadGrid1.ExportSettings.OpenInNewWindow = True RadGrid1.MasterTableView.ExportToPdf() End Select End SubPrivate Sub addMenuItem(ByVal sender As Object, ByVal e As System.EventArgs) Dim menu As RadContextMenu = RadGrid1.HeaderContextMenu Dim item As New RadMenuItem item.Text = "Save Layout" item.Value = "save" item.Attributes("ColumnName") = String.Empty item.Attributes("TableID") = String.Empty menu.Items.Add(item) item = New RadMenuItem item.Attributes("ColumnName") = String.Empty item.Attributes("TableID") = String.Empty item.Text = "Export to CSV" item.Value = "csv" menu.Items.Add(item)End SubHi,
I am facing a problem in bachupdate on the radgrid. I have used the same demo as the following(http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx).
On the double-click I am changing the row values still I am getting "No pending changes to be processed" all the time. In the demo when we change the values it gives dashes around the data. But in my case the dashes is not coming. In my row I am only editing 2 columns. one is textbox and other one is dropdown.
Can somebody please help me.
Thanks.
Jessy
| <body> |
| <form id="form1" runat="server"> |
| <div> |
| <telerik:RadScriptManager ID="radScriptManager" runat="server" /> |
| <telerik:RadGrid ID="radGrid" AutoGenerateColumns="false" AllowMultiRowEdit="true" AllowPaging="true" AllowSorting="true" PageSize="10" OnNeedDataSource="radGrid_NeedDataSource" OnPreRender="radGrid_PreRender" runat="server"> |
| <ClientSettings> |
| <Scrolling UseStaticHeaders="true" /> |
| </ClientSettings> |
| <PagerStyle Mode="NumericPages" /> |
| <MasterTableView DataKeyNames="Name" EditMode="InPlace" TableLayout="Fixed"> |
| <Columns> |
| <telerik:GridBoundColumn DataField="Name" DataType="System.String" HeaderText="Name" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AllowSorting="true" ReadOnly="true" UniqueName="Name" /> |
| <telerik:GridCheckBoxColumn DataField="Select1" DataType="System.Boolean" HeaderText="Select1" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AllowSorting="false" ReadOnly="false" UniqueName="Select1" /> |
| <telerik:GridCheckBoxColumn DataField="Select2" DataType="System.Boolean" HeaderText="Select2" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AllowSorting="false" ReadOnly="false" UniqueName="Select2" /> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| </div> |
| </form> |
| </body> |
| public partial class RadGridWithCheckBoxes : Page |
| { |
| private List<Data> _data; |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!IsPostBack) |
| { |
| this._data = Data.Load(); |
| Session["DATA"] = this._data; |
| } |
| else |
| { |
| this._data = (List<Data>)Session["DATA"]; |
| } |
| } |
| protected void radGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) |
| { |
| this.radGrid.DataSource = this._data; |
| } |
| protected void radGrid_PreRender(object sender, System.EventArgs e) |
| { |
| foreach (GridDataItem item in this.radGrid.Items) |
| { |
| item.Edit = true; |
| } |
| this.radGrid.Rebind(); |
| } |
| } |
| public class Data |
| { |
| public string Name { get; set; } |
| public bool Select1 { get; set; } |
| public bool Select2 { get; set; } |
| public Data(string name, bool select1, bool select2) |
| { |
| Name = name; |
| Select1 = select1; |
| Select2 = select2; |
| } |
| public static List<Data> Load() |
| { |
| List<Data> data = new List<Data>(); |
| for (int i = 0; i < 25; i++) |
| { |
| data.Add(new Data(String.Format("Data{0}", i), false, false)); |
| } |
| return data; |
| } |
| } |
<%@ Page Language="C#" AutoEventWireup="true" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e) { // here is code for creating and saving thumbnail // ... e.IsValid = false; // now we want to discard uploaded image. // But this does not work :( } </script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body><form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" onfileuploaded="RadAsyncUpload1_FileUploaded" TargetFolder="images/_test"> </telerik:RadAsyncUpload> <asp:Button ID="Button1" runat="server" Text="Button" /> </form></body></html>