Sorry if this is a bad question but I want to configure the grid lines in the RadGridView. This Post https://www.telerik.com/forums/change-color-of-the-grid---radgridview says I have to use Visual Style Builder and edit the theme.... Do I really have to dig into this massive thing?! Thats a total overload...? All I want is to configure the grid lines?
I'm trying to figure out how to create some padding inside the coordinate space of the chart. Things I have done:
Set categorical axis axisplotmode to OnTicksPadded
Increased Padding on Chart.View.Margins (this seems to be the padding between the chart itself and stuff outside the chart)
See the picture below for an example. Basically datapoints aren't fully displaying because the points are being cutoff because the last Y-axis Tick is literally at the same Y location as the top of the chart. I'd like to move it down a bit to give the datapoints some space. Essentially create extra space around the edges of the axes. I have one axes that's a categorical axis and one that's a linear axis.
Create BarSeries:
_barModel = new BarSeries
{
ValueMember = "Model",
CategoryMember = "N",
LegendTitle = "Model",
IsVisible = false
};
_radChartViewGss.Series.Add(_barModel);
Set data source (dataTable):
_radChartViewGss.DataSource = _table;
After this, changing the property _barModel.IsVisible = true does not lead to anything - the bar series is not visible.
Why???
Hi.
Probably an easy question, but trying for a while, searching in the doc and the forum, I could not find the solution.
When I use a legend in radchartview, it shows the items below each other (vertically). But I would like to show them next to each other (horizontally).
Among others, I tried:
this.radChartView2.ChartElement.LegendElement.TextOrientation = Orientation.Horizontal;
or
this.radChartView2.ChartElement.LegendElement.StackElement.TextOrientation = Orientation.Horizontal;
But it does not seem to work...
Thank you
Hey, is there a way to change the popup location of RadDropDownButton? I'm currently trying to put it over the button and at the right side. See screenshot to know what I mean. It's is not showing correctly because the edge of the screen.
I've tried setting the popup bound but it don't work
btnOpcoesTela.DropDownButtonElement.DropDownMenu.PopupOpened += DropDownMenu_PopupOpened;
private
void
DropDownMenu_PopupOpened(
object
sender, EventArgs args)
{
var popup = sender
as
RadDropDownButtonPopup;
popup.SetBounds(10, 5, popup.Width, popup.Height);
}
I want to create a RadGridViewwhich allow the user to enter the multiple materials just click on add material
as well as after list of material adds, we can add the multiple labours also
I have this code modified from example for moving rows between grids:
GridDataRowBehavior:
public
class
RowSelectionGridBehavior : GridDataRowBehavior
{
private
List<GridViewRowInfo> selectedRows =
new
List<GridViewRowInfo>();
protected
override
bool
OnMouseDownLeft(MouseEventArgs e)
{
GridDataRowElement row =
this
.GetRowAtPoint(e.Location)
as
GridDataRowElement;
if
(row !=
null
)
{
RadGridViewDragDropService svc =
this
.GridViewElement.GetService<RadGridViewDragDropService>();
svc.AllowAutoScrollColumnsWhileDragging =
true
;
svc.AllowAutoScrollRowsWhileDragging =
true
;
svc.Start(row);
}
return
base
.OnMouseDownLeft(e);
}
}
My extension of RadGridView
public
delegate
void
MovingItemsEvent(List<GridViewRowInfo> rows,
object
source,
object
target);
public
event
MovingItemsEvent MovingItems;
//THIS IS THE PART I DON'T LIKE
private
void
ExtendedGrid_MouseDown(
object
sender, MouseEventArgs e)
{
if
(e.Button == System.Windows.Forms.MouseButtons.Left && EnableDragnDrop)
{
GridGroupContentCellElement row =
this
.ElementTree.GetElementAtPoint(e.Location)
as
GridGroupContentCellElement;
if
(row !=
null
)
{
RadGridViewDragDropService svc =
this
.GridViewElement.GetService<RadGridViewDragDropService>();
svc.AllowAutoScrollColumnsWhileDragging =
true
;
svc.AllowAutoScrollRowsWhileDragging =
true
;
svc.Start(row);
}
}
}
private
bool
_EnableDragnDrop;
[BrowsableAttribute(
true
)]
public
bool
EnableDragnDrop
{
get
{
return
this
._EnableDragnDrop; }
set
{
_EnableDragnDrop = value;
if
(value)
{
//register the custom row selection behavior
var gridBehavior =
this
.GridBehavior
as
BaseGridBehavior;
gridBehavior.UnregisterBehavior(
typeof
(GridViewDataRowInfo));
//gridBehavior.UnlockBehavior(typeof(GridGroupContentCellElement));
gridBehavior.RegisterBehavior(
typeof
(GridViewDataRowInfo),
new
RowSelectionGridBehavior());
}
}
}
private
void
svc_PreviewDragStart(
object
sender, PreviewDragStartEventArgs e)
{
if
(EnableDragnDrop)
e.CanStart =
true
;
}
private
void
svc_PreviewDragOver(
object
sender, RadDragOverEventArgs e)
{
if
(EnableDragnDrop)
e.CanDrop =
true
;
}
private
void
svc_PreviewDragDrop(
object
sender, RadDropEventArgs e)
{
if
(EnableDragnDrop)
{
var dropTarget = e.HitTarget
as
RadItem;
var targetGrid = dropTarget.ElementTree.Control
as
RadGridView;
//append dragged rows to the end of the target grid
List<GridViewRowInfo> rows =
new
List<GridViewRowInfo>();
if
(e.DragInstance
is
GridGroupContentCellElement)
{
e.Handled =
true
;
GridGroupContentCellElement group = e.DragInstance
as
GridGroupContentCellElement;
foreach
(var row
in
group.ViewInfo.CurrentRow.ChildRows)
{
rows.Add(row);
}
this
.MoveRows(targetGrid, rows);
}
else
if
(e.DragInstance
is
GridDataRowElement)
{
e.Handled =
true
;
foreach
(var row
in
this
.SelectedRows)
{
rows.Add(row);
}
this
.MoveRows(targetGrid, rows);
}
}
}
private
void
MoveRows(RadGridView targetGrid, List<GridViewRowInfo> dragRows)
{
this
.BeginUpdate();
targetGrid.BeginUpdate();
if
(MovingItems !=
null
)
{
MovingItems(dragRows,
this
, targetGrid);
}
this
.EndUpdate(
true
);
targetGrid.EndUpdate(
true
);
}
This works fine without any problem, but I would like if ther is a better way to allow Grouped rows to be dragged, like for example registering a GridBehavior like in the case of ordinary rows