I have a radGridView with MutliSelect set to true and SelectionMode set to FullRowSelect. A theme is applied, and this behavior is seen with other themes too. Several columns are pinned to the left.
When I multi-select rows using the shift or control buttons by clicking one of the cells under the frozen columns, the row is selected and colored accordingly, except for the cell that was actually clicked which remains with the unselected color.
If I multi-select by clicking on one of the cells under an unpinned column, the full row is selected as expected.
In the image below, I held down shift and selected the first and third row in sequence under the Officer column.
How can I fix this to show the complete row selected?
Please refer to the attached sample project. When the expander is in the columns that contains long text that has be resize the rows, the AutoSizeRows functionality doesn't work properly:
Workaround: set the MasterTemplate.SelfReferenceExpanderColumn property to a column that contains very short content:
Me.RadGridView1.MasterTemplate.SelfReferenceExpanderColumn = Me.RadGridView1.Columns(1)
Hello,
I am using a radGridView on a Windows touch screen. When I am trying to scroll the rows by hand (EnableKineticScrolling was set to true), the scrolling process is very slow. If I will use the vertical scrollbar, then it is ok. How can I achieve this without using the vertical scrollbar?
I used EnableFastScrolling=true, but I did not see any improvement.
Regards,
Yannis
Hi,
when I select the column chooser multiple times via context menu, the column chooser dialog scales multiple times.
Reproduced here with the Telerik sample application. 150 % dpi scaling.
Regards
Erwin
I'm just starting with RadGridView and trying to figure out how to create a combobox column inside my RadGridView. I've added a column that is of type GridViewComboBoxColumn. I've created a BindingSource that Contains the values for the combobox. I can't figure out how to set the datasource property of the Column to use that BindingSource. Google search says to set the datasource property but when I'm going through the "Open Properties Builder" and I select my combobox column I don't see that property listed under advanced for the column.
Thanks
Lee
If you want to use Conditional Formatting via code (expression based formatting) you will see that it throws an exception if you set TRIM() condition.
ExpressionFormattingObject expressionCondition = new ExpressionFormattingObject(
expressionCondition.Expression = "TRIM(ContactName) = 'Maria Anders'";
expressionCondition.CellBackColor = Color.Aqua;
this.radGridView1.Columns["CustomerID"].ConditionalFormattingObjectList.Add(expressionCondition);
There is no exception if you use the same condition via "Conditional Formatting Rules Manager" form.
It seems that the GridViewColumnGroup.MinHeight has a big influence on the height of the filter cell.
Workaround:
this.radGridView1.AutoSizeRows = true;
I am currently working in Telerik v2019.3.917 and .Net 4.5.2. I have multiple theme's setup for a local application for my users but I am seeing something odd with the Telerik.WinControls.Themes.HighContrastBlack theme. It appears that I am unable to select more than one cell in this theme. My grid has multiselect as true and SelectionMode as CellSelect. I have tried holding ctrl and clicking cells, clicking the row header, holding the mouse down and dragging, and using Ctrl+A but none of these select more than one cell.
I am setting the application theme on launch:
var _t =
new
Telerik.WinControls.Themes.HighContrastBlackTheme();
ThemeResolutionService.ApplicationThemeName =
"HighContrastBlack"
;
Themes that work: All Fluents, All Material, All VS.
Is this a bug or am I missing something?
Please refer to the attached gif file. You will notice that for the GridViewMaskBoxColumn with numeric mask the filtering doesn't work. For the other columns each key stroke filters the grid rows.
Workaround: either use a GridViewDecimalColumn or change the default editor for the GridViewMaskBoxColumn :
In my gridview need support of different heights of rows. I solved it with the autosize property.
But now I have a side action that the header row and filter row also react to the autosize property.
Attached you can see this behaviour...
Here my code:
Grid.MasterView.TableFilteringRow.MinHeight = 40
Grid.AutoSizeRows = True
Is there a chance to separate data rows from filter and header row?
Regards,
Dimitri
Hello,
I am having issues with DateTime editor in the grid. We have custom date/time format for our dates - "HH:mm:ss dd-MMM-yyyy" and the datetime editor is set to free form date time with this mask. When user typed a value in the editor it is passed to FreeFormDateTimeProvider.Validate method, which calls DateInput.ParseDate. DateTimeLexer splits this kind of values just fine, but obviously time related tokens comes first and then the date related tokens.
Unfortunately DateTimeParser.Parse method is made the way that it parse date at first and then time from the tokens list. In my case this means time value is parsed and the date value is dropped to default. Why didn't you check that if after ParseDate and ParseTime calls the date portion is null but there are still remaining tokens in the list, so you may call ParseDate one more time?
Do you have any suggestion how could I resolve this issue? Everything related to date time parsing is not extendable at all, starting from DateInput, most of the classes and methods are not public and even some public methods are not virtual. Can I have the Telerik free form date time typing capabilities in the editor but still have time part before date part?
To reproduce:
- Add items with the same display member open the drop-down and select the second.
- Select another control on the form and then reopen the popup.
- The first item is selected.
Workaround:
class MyMultiColumnComboBox : RadMultiColumnComboBox
To reproduce: please run the attached sample project and follow the steps illustrated in the attached gif file: Scrolling to a newly added row does not work when inner templates are visible. Add data to the inner templates of several rows near the bottom using the button. Expand these inner templates so they are all visible. Scroll back up to the top. Add a new item to the outer grid normally. The table will jump to where it things the new item is but will fall short, instead scrolling to a location in one of the inner templates. Workaround: private void RadGridView1_UserAddedRow(object sender, GridViewRowEventArgs e) { foreach (GridViewRowInfo row in this.radGridView1.Rows) { if (row.IsExpanded) { row.IsExpanded = false; row.IsExpanded = true; } } }
How to reproduce: 1. Click DrugName Filter Icon. 2. Uncheck Combivent 3. OK 4. Click name Filter Icon 5. Uncheck Christoff 6. OK 7. Click DrugName Filter Icon 8. Uncheck Dilantin 9. OK In this scenario the grid should display only 2 rows but it displays 3. public partial class RadForm1 : Telerik.WinControls.UI.RadForm { public List<Drug> DrugList { get; set; } public RadForm1() { InitializeComponent(); DrugList = new List<Drug>(); LoadDrugList(); radGridView1.DataSource = DrugList; radGridView1.EnableFiltering = true; this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; this.radGridView1.MultiSelect = true; } protected override void OnLoad(EventArgs e) { base.OnLoad(e); radGridView1.MasterTemplate.ShowFilteringRow = false; radGridView1.MasterTemplate.ShowHeaderCellButtons = true; } void LoadDrugList() { DrugList.Add(new Drug { Dosage = 25, DrugName = "Indocin", Name = "David"}); DrugList.Add(new Drug { Dosage = 50, DrugName = "Enebrel", Name = "Sam" }); DrugList.Add(new Drug { Dosage = 10, DrugName = "Hydralazine", Name = "Christoff"}); DrugList.Add(new Drug { Dosage = 21, DrugName = "Combivent", Name = "Janet"}); DrugList.Add(new Drug { Dosage = 100, DrugName = "Dilantin", Name = "Melanie"}); } } Workaround: use a custom filter popup public partial class RadForm1 : Telerik.WinControls.UI.RadForm { public List<Drug> DrugList { get; set; } public RadForm1() { InitializeComponent(); DrugList = new List<Drug>(); LoadDrugList(); radGridView1.DataSource = DrugList; radGridView1.EnableFiltering = true; this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; this.radGridView1.MultiSelect = true; this.radGridView1.FilterPopupRequired += RadGridView1_FilterPopupRequired; } private void RadGridView1_FilterPopupRequired(object sender, FilterPopupRequiredEventArgs e) { e.FilterPopup = new CustomRadListFilterPopup(e.Column); } protected override void OnLoad(EventArgs e) { base.OnLoad(e); radGridView1.MasterTemplate.ShowFilteringRow = false; radGridView1.MasterTemplate.ShowHeaderCellButtons = true; } void LoadDrugList() { DrugList.Add(new Drug { Dosage = 25, DrugName = "Indocin", Name = "David"}); DrugList.Add(new Drug { Dosage = 50, DrugName = "Enebrel", Name = "Sam" }); DrugList.Add(new Drug { Dosage = 10, DrugName = "Hydralazine", Name = "Christoff"}); DrugList.Add(new Drug { Dosage = 21, DrugName = "Combivent", Name = "Janet"}); DrugList.Add(new Drug { Dosage = 100, DrugName = "Dilantin", Name = "Melanie"}); } } public class CustomRadListFilterPopup : RadListFilterPopup { public CustomRadListFilterPopup(GridViewDataColumn dataColumn) : base(dataColumn) { } protected override void OnButtonOkClick(EventArgs e) { FilterMenuTreeItem treeMenuItem = this.Items.FirstOrDefault(i => i is FilterMenuTreeItem) as FilterMenuTreeItem; if (treeMenuItem == null) { base.OnButtonOkClick(e); } FilterMenuTreeElement listFilterElement = treeMenuItem.TreeElement; FilterOperator filterOperator = FilterOperator.IsEqualTo; switch (listFilterElement.SelectedMode) { case ListFilterSelectedMode.All: filterOperator = FilterOperator.None; break; case ListFilterSelectedMode.Null: filterOperator = FilterOperator.IsNull; break; case ListFilterSelectedMode.NotNull: filterOperator = FilterOperator.IsNotNull; break; } if (filterOperator != FilterOperator.IsEqualTo) { SetFilterOperator(filterOperator); this.ClosePopup(RadPopupCloseReason.CloseCalled); } else { CompositeFilterDescriptor compositeFilterDescriptor = new CompositeFilterDescriptor(); compositeFilterDescriptor.PropertyName = this.DataColumn.Name; RadListFilterDistinctValuesTable distinctValues = this.GetDistinctValuesTable(); string blanksKey = RadGridLocalizationProvider.CurrentProvider.GetLocalizedString(RadGridStringId.FilterMenuBlanks); bool blanks = listFilterElement.SelectedValues.Contains(blanksKey); compositeFilterDescriptor.LogicalOperator = FilterLogicalOperator.And; foreach (DictionaryEntry entry in distinctValues) { object key = entry.Key; if (string.IsNullOrEmpty(Convert.ToString(key))) { key = blanksKey; } if (this.DataColumn is GridViewDateTimeColumn || this.DataColumn.DataType == typeof(DateTime) || this.DataColumn.DataType == typeof(DateTime?)) { DateTime dateTime; if (DateTime.TryParse(key.ToString(), out dateTime)) { object dataKey; if (RadDataConverter.Instance.TryFormat(treeMenuItem.TreeElement.GroupedDateValues ? dateTime.Date : dateTime, typeof(string), this.DataColumn, out dataKey) == null) { key = dataKey; } } } if (!listFilterElement.SelectedValues.Contains(key)) { foreach (object value in (ArrayList)entry.Value) { FilterDescriptor descriptor; if (value == DBNull.Value) { descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, null); } else if (this.DataColumn is GridViewDateTimeColumn || this.DataColumn.DataType == typeof(DateTime) || this.DataColumn.DataType == typeof(DateTime?)) { descriptor = new DateFilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, (DateTime?)value, false); } else { descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, value); } compositeFilterDescriptor.FilterDescriptors.Add(descriptor); } } } if (this.DataColumn.FilterDescriptor != null) { CompositeFilterDescriptor compositeFilter = this.DataColumn.FilterDescriptor as CompositeFilterDescriptor; if (compositeFilter != null) { foreach (var item in compositeFilter.FilterDescriptors) { if (listFilterElement.SelectedValues.Contains(item.Value)) { continue; } FilterDescriptor descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, item.Value); compositeFilterDescriptor.FilterDescriptors.Add(descriptor); } } else if(!listFilterElement.SelectedValues.Contains(this.DataColumn.FilterDescriptor.Value)) { FilterDescriptor descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, this.DataColumn.FilterDescriptor.Value); compositeFilterDescriptor.FilterDescriptors.Add(descriptor); } } this.FilterDescriptor = compositeFilterDescriptor; OnFilterConfirmed(); } } }
Workaround: private void radGridView1_ConditionalFormattingFormShown(object sender, EventArgs e) { ConditionalFormattingForm f = sender as ConditionalFormattingForm; if (f != null) { f.Width += 5; } }
A possible workaround is to use the following KB and change how it is implemented to iterate the MasterTemplate.Rows collection instead of the ViewInfo.Rows collection https://www.telerik.com/support/kb/winforms/gridview/details/add-check-all-in-the-header-cell-for-a-gridviewcheckboxcolumn
To reproduce: - Add ColumnGroupsViewDefinition and set ShowHeader to false. - Set AutoSizeRows to true. Workaround: Manually set the row height. ViewDefinition.ColumnGroups(0).Rows(0).MinHeight = 50