Hi,
if datasource contains date/time field, it is expanded into Year, Quater, Month, etc. Is it possible to add custom aggregate e.g. Quater of hour (15 mins interval)?
Thanks
Alex

Hi!
I have problem with one of option from default ColumnHeaderContextMenu - after choose option Select Visible Columns (RadGridStringId.ColumnChooserMenuItem) we can see window that is always top. I focused my browser and this small window is still on top. How can I fix it?
While exporting the content of gridview to excel i am getting the below error but if i set the view defination as tableview it works fine.
Error :System.ArgumentOutOfRangeException was unhandled
Message="Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
Getting the above error for:
exporter.RunExport(fileName.ToString()) where exporter is object of ExportToExcelML
Columns of gridview are:
columnGroupsView = New ColumnGroupsViewDefinition()
columnGroupsView.ColumnGroups.Add(
New GridViewColumnGroup("City"))
columnGroupsView.ColumnGroups.Add(
New GridViewColumnGroup("Details"))
columnGroupsView.ColumnGroups(0).Rows.Add(New GridViewColumnGroupRow())
columnGroupsView.ColumnGroups(0).Rows(0).Columns.Add(gridViewStaus.Columns(
"LOCATION"))
columnGroupsView.ColumnGroups(0).Rows(0).Columns.Add(gridViewStaus.Columns(
"ID"))
columnGroupsView.ColumnGroups(1).Groups.Add(New GridViewColumnGroup("Fault"))...
Please help!

need programing created structure table and see for winForm.
user need insert any info and saving
Problem for one column have any typeof.
need used control or what ?
--------------------------------------------------------------
DataTable myDataTable = DataSet_PersonData.Tables.Add("PersonalData");
myDataTable.Columns.Add("id", typeof(string));
myDataTable.Columns.Add("row", typeof(string));
myDataTable.Rows.Add(new object[] { "Name" });
myDataTable.Rows.Add(new object[] { "Surname" });
myDataTable.Rows.Add(new object[] { "tel" });
myDataTable.Rows.Add(new object[] { "date" });
radGridView2PersonData.DataSource = DataSet_PersonData.Tables["PersonalData"];
------------------------------------------------------------------------and exit this:
-------------------------------
column1 | column2 |
-------------------------------
Name | *String |
Surname | *String |
telephone | *int |
Date | *DataTime |
-------------------------------
cell marked * - insert info user for winform.
need in cell "*DataTime" open radCalendar or set fo ONLY cell [Column2][row'*DataTime'] set typeof(DateTime)
please help changet typeof for ONLY this cell in this table
When radGridView's data is grouped by a column and the column's HeaderText is empty string then a colon sign (:) is shown on the groups of rows in grid. How can I hide this colon sign? For more details see the attached image please.
Here is shortened code:
1.grid.Columns["Code"].HeaderText = "";2.grid.GroupDescriptors.Add(new Telerik.WinControls.Data.GroupDescriptor("Code"));
If anyone need it, just use the code and drag and drop :) (Based on example code)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
using Telerik.WinControls.UI;
using System.Drawing;
namespace Project
{
public partial class RadDataGridViewDragDrop : RadGridView
{
public RadDataGridViewDragDrop()
{
InitializeComponent();
SubscribeForGridEvents();
this.ReadOnly = true;
this.MultiSelect = true;
this.MasterTemplate.AllowRowReorder = true;
this.GridBehavior = new RadGridViewDragDropBehavior();
}
private void SubscribeForGridEvents()
{
RadDragDropService dragDropService = this.GridViewElement.GetService<RadDragDropService>();
dragDropService.PreviewDragOver += new EventHandler<RadDragOverEventArgs>(dragDropService_PreviewDragOver);
dragDropService.PreviewDragDrop += new EventHandler<RadDropEventArgs>(dragDropService_PreviewDragDrop);
dragDropService.PreviewDragHint += new EventHandler<PreviewDragHintEventArgs>(dragDropService_PreviewDragHint);
}
private int GetTargetRowIndex(GridDataRowElement row, Point dropLocation)
{
int halfHeight = row.Size.Height / 2;
int index = row.RowInfo.Index;
if (dropLocation.Y > halfHeight)
{
index++;
}
return index;
}
private void InitializeRow(GridViewRowInfo destRow, GridViewRowInfo sourceRow)
{
foreach (GridViewCellInfo s in sourceRow.Cells)
{
destRow.Cells[s.ColumnInfo.Name].Value = s.Value;
}
}
private void MoveRows(RadGridView targetGrid, RadGridView dragGrid, IList<GridViewRowInfo> dragRows, int index)
{
for (int i = dragRows.Count - 1; i >= 0; i--)
{
GridViewRowInfo row = dragRows[i];
if (row is GridViewSummaryRowInfo)
{
continue;
}
GridViewRowInfo newRow = targetGrid.Rows.NewRow();
this.InitializeRow(newRow, row);
targetGrid.Rows.Insert(index, newRow);
row.IsSelected = false;
dragGrid.Rows.Remove(row);
index++;
}
}
#region Drag & drop logic
private void dragDropService_PreviewDragDrop(object sender, RadDropEventArgs e)
{
GridDataRowElement rowElement = e.DragInstance as GridDataRowElement;
if (rowElement == null)
{
return;
}
RadItem dropTarget = e.HitTarget as RadItem;
RadGridView targetGrid = dropTarget.ElementTree.Control as RadGridView;
if (targetGrid == null)
{
return;
}
RadGridView dragGrid = rowElement.ElementTree.Control as RadGridView;
if (targetGrid != dragGrid)
{
e.Handled = true;
RadGridViewDragDropBehavior behavior = (RadGridViewDragDropBehavior)dragGrid.GridBehavior;
GridDataRowElement dropTargetRow = dropTarget as GridDataRowElement;
int index = dropTargetRow != null ? this.GetTargetRowIndex(dropTargetRow, e.DropLocation) : targetGrid.RowCount;
this.MoveRows(targetGrid, dragGrid, behavior.SelectedRows, index);
}
}
private void dragDropService_PreviewDragOver(object sender, RadDragOverEventArgs e)
{
if (e.DragInstance is GridDataRowElement)
{
e.CanDrop = e.HitTarget is GridDataRowElement || e.HitTarget is GridTableElement || e.HitTarget is GridSummaryRowElement;
}
}
private void dragDropService_PreviewDragHint(object sender, PreviewDragHintEventArgs e)
{
GridDataRowElement dataRowElement = e.DragInstance as GridDataRowElement;
if (dataRowElement != null && dataRowElement.ViewTemplate.MasterTemplate.SelectedRows.Count > 1)
{
//e.DragHint = new Bitmap(this.imageList1.Images[6]);
e.UseDefaultHint = false;
}
}
#endregion
}
public class RadGridViewDragDropBehavior : BaseGridBehavior
{
List<GridViewRowInfo> selectedRows = new List<GridViewRowInfo>();
public List<GridViewRowInfo> SelectedRows
{
get { return this.selectedRows; }
}
public override bool OnMouseDown(MouseEventArgs e)
{
selectedRows.Clear();
bool result = base.OnMouseDown(e);
if ((Control.ModifierKeys & Keys.Control) == Keys.Control ||
(Control.ModifierKeys & Keys.Control) == Keys.Shift)
{
selectedRows.AddRange(this.GridControl.SelectedRows);
}
else
{
selectedRows.Add(this.GridControl.CurrentRow);
}
return result;
}
}
}
Dear All,
Right now, i'm using telerik RadDropdownList 2016 Q1. And ItemList have Icon Image above. It show ok on DropDown list, but not show when I selected one Item.
How can I config for it show icon image both in ItemList and Selected Item.
Thanks so much for all helping!!!
How can i show the values of an item while double clicking on any of the value.
I mean is when we point our mouse pointer to an of the item in grid,then there will be a tooltip showing the current details of that item.How can i show it in message box while double clicking on it?
Can anyone help me Please...

I have a requirement to add a default filter to the my GridView. Therefore I do this simply using the following code:
FilterDescriptor filterDescriptor = new FilterDescriptor();
filterDescriptor.PropertyName = "DistributionStatus";
filterDescriptor.Value = "Active";
filterDescriptor.Operator = FilterOperator.IsNotEqualTo;
filterDescriptor.IsFilterEditor = true;
This is simply code taken from the documentation and modified.
This applies the restriction that I require, but when I open up the filter on screen as a user, I do not see all the values available in the column, so I am unable to remove this filter... Please see attached file (1.png) for an example.
If however, I add a random filter that does not affect the results (2.png), I now see all my available options (3.png). Can anyone suggest if this is a bug? or maybe a setting I need to update or a forced refresh of some kind?