A title or caption that can be positioned on the top or bottom of RadGridView that shows a text defined by developer.
After populating the RadGridView, unbound in this example, I use RadGridView1.ClearSelection. This works when using some themes such as Crystal and Office2013, but not others, like Fluent. See attached..... believe me that the code is EXACTLY the same for each, just the application theme is difference. This should be an easy one to replicate.
To reproduce: public RadForm1() { InitializeComponent(); this.radGridView1.EnableFiltering = true; this.radGridView1.ShowHeaderCellButtons = true; this.radGridView1.FilterPopupRequired += radGridView1_FilterPopupRequired; } private void radGridView1_FilterPopupRequired(object sender, Telerik.WinControls.UI.FilterPopupRequiredEventArgs e) { e.FilterPopup.PopupOpening -= FilterPopup_PopupOpening; e.FilterPopup.PopupOpening += FilterPopup_PopupOpening; } private void FilterPopup_PopupOpening(object sender, CancelEventArgs args) { args.Cancel = true; } Workaround: either set the ShowHeaderCellButtons property to false or closed the popup immediately after it is opened. private void radGridView1_FilterPopupRequired(object sender, Telerik.WinControls.UI.FilterPopupRequiredEventArgs e) { e.FilterPopup.PopupOpening -= FilterPopup_PopupOpening; e.FilterPopup.PopupOpening += FilterPopup_PopupOpening; } private void FilterPopup_PopupOpening(object sender, CancelEventArgs args) { RadListFilterPopup popup = sender as RadListFilterPopup; popup.PopupOpened -= popup_PopupOpened; popup.PopupOpened += popup_PopupOpened; } private void popup_PopupOpened(object sender, EventArgs args) { RadListFilterPopup popup = sender as RadListFilterPopup; popup.ClosePopup(RadPopupCloseReason.Mouse); }
To reproduce: GridViewCheckBoxColumn chkCol = new GridViewCheckBoxColumn(); chkCol.HeaderText = "I have wrap text set yet I cannot see full column header text."; chkCol.Width = 90; chkCol.WrapText = true; chkCol.EnableHeaderCheckBox = true; chkCol.EditMode = EditMode.OnValueChange; radGridView1.Columns.Add(chkCol); Workaround: private void RadGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { var cell = e.CellElement as GridCheckBoxHeaderCellElement; if (cell != null) { cell.CheckBox.TextWrap = true; } }
Use attached to reproduce! Workaround: remove the Begin\End update block.
To reproduce: private void radButton1_Click(object sender, EventArgs e) { RadPrintDocument printDocument = new RadPrintDocument(); printDocument.DefaultPageSettings.Landscape = true; printDocument.DocumentName = "Example Case"; GridPrintStyle style = new GridPrintStyle(this.radGridView1) { FitWidthMode = PrintFitWidthMode.FitPageWidth, PrintGrouping = false, PrintSummaries = false, PrintHeaderOnEachPage = true, PrintHiddenColumns = false, }; TableViewDefinitionPrintRenderer renderer = new TableViewDefinitionPrintRenderer(this.radGridView1); renderer.PrintPages.Add( this.radGridView1.Columns[1], this.radGridView1.Columns[2], this.radGridView1.Columns[3], this.radGridView1.Columns[4], this.radGridView1.Columns[5], this.radGridView1.Columns[6]); style.PrintRenderer = renderer; this.radGridView1.PrintStyle = style; this.radGridView1.PrintCellFormatting += RadGridView1_PrintCellFormatting; radGridView1.Print(true, printDocument); } private void RadGridView1_PrintCellFormatting(object sender, Telerik.WinControls.UI.PrintCellFormattingEventArgs e) { } Workaround: use the PrintCellFormatting of the TableViewDefinitionPrintRenderer
To reproduce: run the sample approach an follow the steps: 1. Filter the "Mask" column by entering " " in the filter cell. Press Enter. The grid is filtered as expected. 2. Activate the editor again and press Backspace+Enter. You will notice that it is not possible to clear the applied filter. Workaround: use GridViewTextBoxColumn
Add a new property AllowSelection/EnableSelection in order to control whether the use can select a cell/row. Workaround: Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.ProductsTableAdapter.Fill(Me.NwindDataSet.Products) Me.RadGridView1.CurrentRow = Nothing AddHandler Me.RadGridView1.SelectionChanging, AddressOf Grid_SelectionChanging AddHandler Me.RadGridView1.CurrentRowChanging, AddressOf Grid_CurrentRowChanging End Sub Private Sub Grid_SelectionChanging(sender As Object, e As Telerik.WinControls.UI.GridViewSelectionCancelEventArgs) e.Cancel = True End Sub Private Sub Grid_CurrentRowChanging(sender As Object, e As Telerik.WinControls.UI.CurrentRowChangingEventArgs) e.Cancel = True End Sub
To reproduce: if (e.CellElement.ColumnInfo.HeaderText == "CategoryID") { e.CellElement.DrawText = false; } else { e.CellElement.ResetValue(LightVisualElement.DrawTextProperty, ValueResetFlags.Local); } Workaround: e.CellElement.DrawText = true;
Hi, We got an issue comparable to the one already described (see 245938), using the same demo project 1) I add LastDeliveryDateTimeLocal column 2) remove groups 3) click on "Start async notifications" 4) click on the filter icon next to "LastDeliveryDateTimeLocal" column name 5) uncheck some values (08/09/2016, 11/11/2016, 03/01/2017) 6) click Ok => NullReferenceException
Steps to reproduce: 1. Add a grid to a form and fill it with some data 2. Add a button and in the click event: a. Assign a new GridPrintStyle instance to the PrintStyle property b. Subscribe for the PrintCellFormatting event of the grid c. Call the PrintPreview method of the grid 3. Add a break point in the event handler of the PrintCellFormatting 4. Start the app and click the button. You will see that the break point is never hit.
"High Performance with RadGridView and Virtual Mode including Filtering, Sorting and Grouping" example is not working for RadGridView Q3 2015. When I click on the Column header for sorting ( same thing for grouping and filtering) and I m getting exception "Sorting operation is not supported in VirtualMode.". Same sample is working for Q3 2014. Following is the URL for the sample http://www.telerik.com/support/kb/winforms/gridview/details/high-performance-with-radgridview-and-virtual-mode-including-filtering-sorting-and-grouping
1. Create a new project and add RadGridView. 2. Bind it and set the IsVisible property for some rows to false. 3. Run the project. 4. Scroll to bottom.
Use attached to reproduce. Workaround: class MySpreadExportRenderer : SpreadExportRenderer { public override void SetWorksheetColumnWidth(int columnIndex, double value, bool isCustom) { if (value > 2000) { value = 2000; } base.SetWorksheetColumnWidth(columnIndex, value, isCustom); } }
how can i insert , update or delete? i tried after choosing the data source , it shows the data correctly but when i edit or add a new item the database is not affected (allow edit,delete and add row are set to true)
Hello, Please create a GridViewDateTimeOffsetColumn to support DateTimeOffset type. A datetimeoffset editor would be good and support of nullable date types. Thank you!
How to reproduce: check the attached project and comment the workaround Workaround: public partial class RadForm1 : Telerik.WinControls.UI.RadForm { private BindingList<TestDataObject> data; public RadForm1() { InitializeComponent(); this.data = new BindingList<TestDataObject>(); this.LoadData(); GridViewTextBoxColumn textColumn = new GridViewTextBoxColumn(); textColumn.Name = "Name"; textColumn.FieldName = "Name"; textColumn.HeaderText = "Name"; this.radGridView1.Columns.Add(textColumn); GridViewDateTimeColumn dateColumn = new GridViewDateTimeColumn(); dateColumn.Name = "Date"; dateColumn.FieldName = "Date"; dateColumn.HeaderText = "Date"; this.radGridView1.Columns.Add(dateColumn); GridViewMaskBoxColumn maskBoxColumn = new GridViewMaskBoxColumn(); maskBoxColumn.Name = "Price"; maskBoxColumn.FieldName = "Price"; maskBoxColumn.HeaderText = "Price"; maskBoxColumn.MaskType = MaskType.Numeric; maskBoxColumn.Mask = "C"; maskBoxColumn.TextAlignment = ContentAlignment.BottomRight; maskBoxColumn.FormatString = "{0:C}"; maskBoxColumn.DataType = typeof(decimal); this.radGridView1.Columns.Add(maskBoxColumn); this.radGridView1.DataSource = this.data; this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; //Workaround this.radGridView1.CellBeginEdit += RadGridView1_CellBeginEdit; this.radGridView1.EditorRequired += RadGridView1_EditorRequired; } void RadGridView1_EditorRequired(object sender, EditorRequiredEventArgs e) { if (e.EditorType == typeof(RadMaskedEditBoxEditor)) { e.EditorType = typeof(MyRadMaskedEditBoxEditor); } } private void RadGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e) { RadMaskedEditBoxEditor maskedEditBoxEditor = e.ActiveEditor as RadMaskedEditBoxEditor; if (maskedEditBoxEditor != null && e.Row.Cells[e.ColumnIndex].Value == null) { maskedEditBoxEditor.MaskTextBox.EnableNullValueInput = true; } else { maskedEditBoxEditor.MaskTextBox.EnableNullValueInput = false; } } private void LoadData() { for (int i = 0; i < 1000; i++) { decimal? price = null; if (i % 2 == 0) { price = i * 100; } this.data.Add(new TestDataObject { Name = "Name " + i, Date = DateTime.Now.AddDays(i), Price = price }); } } } public class TestDataObject { public string Name { get; set; } public DateTime Date { get; set; } public decimal? Price { get; set; } } public class MyRadMaskedEditBoxEditor : RadMaskedEditBoxEditor { public override object Value { get { return base.Value; } set { if (value == null && (this.MaskTextBox.EnableNullValueInput || this.MaskTextBox.MaskType != MaskType.Numeric)) { this.MaskTextBox.Value = this.NullValue; } else { base.Value = value; } } } }
To reproduce: please refer to the attached sample project and gif file. Workaround: add the column programmatically, not at design time.
To reproduce: private void RadGridView1_UserAddingRow(object sender, Telerik.WinControls.UI.GridViewRowCancelEventArgs e) { radGridView1.MasterView.TableAddNewRow.CancelAddNewRow(); } See attached video. Workaround: private void RadGridView1_UserAddingRow(object sender, Telerik.WinControls.UI.GridViewRowCancelEventArgs e) { radGridView1.MasterView.TableAddNewRow.CancelAddNewRow(); radGridView1.MasterView.ViewTemplate.DataView.CurrentItem.IsCurrent = false; }