Hello Telerik Support Team,
I have 2 issues with the RadRangeSelector:
1. The Scale doesn't use the format settings of the chart. The category member datatype of the barseries is DateTime and I use this code to set the format:
BarSeries.HorizontalAxis.LabelFormat = "{0:dd.MM}";
In the first screenshot you can see that the rangeselector shows the full DateTime format with hours, minutes and seconds.
2. The RangeSelector doesn't respect the minimum and maximum values of the chart. I use this code to set then:
LinearAxis verticalAxis = cvChart.Axes.Get<LinearAxis>(1);
if
(verticalAxis !=
null
)
{
verticalAxis.Minimum = 0;
verticalAxis.Maximum = 100;
//verticalAxis.MajorStep = 100;
}
On the second screenshot i marked the behaviour, if the ValueMember for all items in the datasource is 0.
Are there possibilities for the RangeSelector to set the formatting options and the minimum and maximum values?
Regards,
Stephan
Is possible to copy cell content from one row to onther new added row in radgridview
winform
Thanks a lot
I've been playing with the 2020 R1 demo and am having trouble setting and getting column widths of the VirtualGrid.
To set the column widths I've tried both TableElement, as in the documentation, and MasterViewInfo, which I found in the forums.
A little insight would be great!
Thanks!
using
System;
using
System.Collections.Generic;
using
Telerik.WinControls.UI;
namespace
TelerikWinFormsApp1
{
public
partial
class
RadForm1 : Telerik.WinControls.UI.RadForm
{
List<Foo> data =
new
List<Foo>();
public
RadForm1()
{
InitializeComponent();
this
.Text =
"Foo"
;
radVirtualGrid1.AutoSize =
false
;
this
.radVirtualGrid1.CellValueNeeded +=
new
Telerik.WinControls.UI.VirtualGridCellValueNeededEventHandler(
this
.radVirtualGrid1_CellValueNeeded);
this
.radVirtualGrid1.ColumnWidthChanged +=
new
Telerik.WinControls.UI.VirtualGridColumnEventHandler(
this
.radVirtualGrid1_ColumnWidthChanged);
//These methods do not set the column width
radVirtualGrid1.MasterViewInfo.SetColumnWidth(0, 300);
radVirtualGrid1.MasterViewInfo.SetColumnWidth(1, 150);
radVirtualGrid1.TableElement.SetColumnWidth(0, 300);
radVirtualGrid1.TableElement.SetColumnWidth(1, 150);
LoadData();
}
private
void
radVirtualGrid1_ColumnWidthChanged(
object
sender, VirtualGridColumnEventArgs e)
{
//This is always 100
int
i = e.ViewInfo.ColumnWidth;
}
private
void
radVirtualGrid1_CellValueNeeded(
object
sender, Telerik.WinControls.UI.VirtualGridCellValueNeededEventArgs e)
{
if
(e.ViewInfo ==
this
.radVirtualGrid1.MasterViewInfo)
{
if
(e.ColumnIndex < 0)
{
return
;
}
e.FieldName = Foo.FieldNames[e.ColumnIndex];
if
(e.RowIndex == RadVirtualGrid.HeaderRowIndex)
{
e.Value = e.FieldName;
}
else
if
(e.RowIndex >= 0)
{
e.Value = data[e.RowIndex][e.ColumnIndex];
}
}
}
private
void
LoadData()
{
Random random =
new
Random();
for
(
int
i = 0; i < 10; i++)
{
Foo Foo =
new
Foo();
Foo.Me = i;
Foo.Yu = i;
data.Add(Foo);
}
this
.radVirtualGrid1.RowCount = data.Count;
this
.radVirtualGrid1.ColumnCount = Foo.FieldNames.Length;
}
}
public
class
Foo
{
public
static
readonly
string
[] FieldNames = {
"Me"
,
"Yu"
};
public
int
Me {
get
;
set
; }
public
int
Yu {
get
;
set
; }
public
int
this
[
int
index]
{
get
{
switch
(index)
{
case
0:
return
Me;
case
1:
return
Yu;
default
:
return
0;
}
}
}
}
Hi,
I have an issue where I had originally set the combobox textbox alignment to the right with:
// **** Align Drop Down Box Text to Right
revPurgeCodeDropList.MultiColumnComboBoxElement.TextBoxElement.TextAlign = HorizontalAlignment.Right;
addPurgeCodeDropList.MultiColumnComboBoxElement.TextBoxElement.TextAlign = HorizontalAlignment.Right;
scrapCodeDropList.MultiColumnComboBoxElement.TextBoxElement.TextAlign = HorizontalAlignment.Right;
scrapRsnDropList.MultiColumnComboBoxElement.TextBoxElement.TextAlign = HorizontalAlignment.Right;
// ************************
And it worked correctly. But then I decided I didn't want the user to be able to input anything, only select from drop down. So I added raddropdownstyle.dropdownlist:
// **** not allow use to type in
scrapCodeDropList.DropDownStyle = RadDropDownStyle.DropDownList;
scrapRsnDropList.DropDownStyle = RadDropDownStyle.DropDownList;
revPurgeCodeDropList.DropDownStyle = RadDropDownStyle.DropDownList;
addPurgeCodeDropList.DropDownStyle = RadDropDownStyle.DropDownList;
// ************************
The raddropdownstyle.dropdownlist worked, but the alignment isn't working any longer. I tried to put this before and I tried after before it's the same. Am I doing something wrong? Here's what I have now:
// **** not allow use to type in
scrapCodeDropList.DropDownStyle = RadDropDownStyle.DropDownList;
scrapRsnDropList.DropDownStyle = RadDropDownStyle.DropDownList;
revPurgeCodeDropList.DropDownStyle = RadDropDownStyle.DropDownList;
addPurgeCodeDropList.DropDownStyle = RadDropDownStyle.DropDownList;
// ************************
// **** Align Drop Down Box Text to Right
revPurgeCodeDropList.MultiColumnComboBoxElement.TextBoxElement.TextAlign = HorizontalAlignment.Right;
addPurgeCodeDropList.MultiColumnComboBoxElement.TextBoxElement.TextAlign = HorizontalAlignment.Right;
scrapCodeDropList.MultiColumnComboBoxElement.TextBoxElement.TextAlign = HorizontalAlignment.Right;
scrapRsnDropList.MultiColumnComboBoxElement.TextBoxElement.TextAlign = HorizontalAlignment.Right;
// ************************
Hi all,
I just downloaded the Telerik UI for Winforms 2018_2_621 and started "tinkering" around with the RadImageEditor control for a specific project I am currently working on for work. I was wondering, is there a way to "hide" or "disable" the buttons on the toolbar on the left hand side of the image editor? Or (perhaps the most ideal for me) is there a way to completely hide the toolbar altogether on the left hand side?
I thought this would be a simple "enable" or "disable" on a property of the control, but I can't seem to find any documentation on this matter. Thank you and I look forward to the response.
private
void
PasteClipboard()
{
char
[] rowSplitter = {
'\r'
,
'\n'
};
char
[] columnSplitter = {
'\t'
};
// Get the text from clipboard
IDataObject dataInClipboard = Clipboard.GetDataObject();
string
stringInClipboard = (
string
)dataInClipboard.GetData(DataFormats.Text);
// Split it into lines
string
[] rowsInClipboard = stringInClipboard.Split(rowSplitter, StringSplitOptions.RemoveEmptyEntries);
// Get the row and column of selected cell in grid
int
r = ColumnsGrid.SelectedCells[0].RowIndex;
int
c = ColumnsGrid.SelectedCells[0].ColumnIndex;
// Add rows into grid to fit clipboard lines
if
(ColumnsGrid.Rows.Count < (r + rowsInClipboard.Length))
{
ColumnsGrid.Rows.Add(r + rowsInClipboard.Length - ColumnsGrid.Rows.Count);
}
// Loop through the lines, split them into cells and place the values in the corresponding cell.
for
(
int
iRow = 0; iRow < rowsInClipboard.Length; iRow++)
{
// Split row into cell values
string
[] valuesInRow = rowsInClipboard[iRow].Split(columnSplitter);
// Cycle through cell values
for
(
int
iCol = 0; iCol < valuesInRow.Length; iCol++)
{
// Assign cell value, only if it within columns of the grid
if
(ColumnsGrid.ColumnCount - 1 >= c + iCol)
{
DataGridViewCell cell = ColumnsGrid.Rows[r + iRow].Cells[c + iCol];
if
(!cell.ReadOnly)
{
cell.Value = valuesInRow[iCol];
}
}
}
}
}