private void radGridView1_ValueChanged(object sender, EventArgs e) |
{ |
if (this.radGridView1.ActiveEditor is RadCheckBoxEditor) |
{ |
if ((bool)(this.radGridView1.ActiveEditor.Value)) |
{ |
radGridView1.CurrentCell.RowElement.DrawFill = true; |
radGridView1.CurrentCell.RowElement.BackColor = Color.Red; |
} |
} |
} |
Hi,
How to make a column or cell read only based on some conditions.
I was exploring the CellFormatting event but cannot find how to achieve that.
Hi !
Is there a event where it passes over all the rows and display the row ?
On the display of my data, I would like to change the backcolor of the row.
I tried the RowFormatting event but It only go on the first row...
Thank you !
I have a RadGridView with a GridViewDecimalColumn. I want to allow the user to move up and down to other rows using the up/down arrow keys, but it changes the value instead. This occurs even if I set ShowUpDownButtons to false.
I found an old example on the forum that explains how to change this behavior here: https://www.telerik.com/forums/gridviewdecimalcolumn-up-down-key. However when I try the code there, I can't get it to work. GridSpinEditorElement is not found. I have the Telerik.WinControls and Telerik.WinControls.UI namespaces included.
I looked up GridSpinEditorElement, to see if I needed a different namespace, and it seems it's no longer available. I'm referencing this page:
https://docs.telerik.com/devtools/winforms/api/html/t_telerik_wincontrols_ui_gridspineditorelement.htm
It says it's obsolete and shows version 2018.1.220.40. I'm on version 2018.3.911.40.
How can I implement this code now without GridSpinEditorElement?
Thanks
I have 5 Collapsible panels I want to dock to the top of a panel. When I select them and choose TOP for Dock. the order seems to get randomly re-arranged.
What am I missing?
I need to determine if document is empty, even if the document was just created in other parts of the code. The code below throws the exception. If the commented lines are uncommented then the exception is not thrown. I could work around the problem also by carrying a flag to tell me if document was just created (and not call GetStatisticsInfo in that case). Is this exception a bug? Is there a smarter or more elegant way to determine if document is empty?
var d =
new
RadDocument();
//var p = new Telerik.WinForms.Documents.FormatProviders.Rtf.RtfFormatProvider();
//d = p.Import(p.Export(d));
var s = d.GetStatisticsInfo();
Hi,
I am binding data from a datatable to the VirtualGrid but currently there is no data in it, so I would like to have a blank row appear in the grid which will allow the user to enter new rows.
Currently if there are no data then nothing is showing in the grid, only when some data is there "Click here to add a new row" appears.
AllowAddNewRow is true.
hi i tasked to create a multi-button gridview column and how its go:
public class GridExtraItemsCell : GridCommandCellElement
{
public override bool IsEditable => false;
public override bool IsCurrent => false;
public override bool IsSelected => false;
private ExtraElementContents btns;
add a child and handle Click Events and Delegate
}
hi i tasked to create a multi-button gridview column and how its go:
public class GridExtraItemsCell : GridCommandCellElement{public override bool IsEditable => false;public override bool IsCurrent => false;public override bool IsSelected => false;private ExtraElementContents btns;
add a child and handle Click Events and Delegate
}
public class GridExtraItemsColumn : GridViewCommandColumn{public event EventHandler ButtonClick;public void Button_Click(object sender, EventArgs e){this.OnButtonClick(sender, e);}protected virtual void OnButtonClick(object sender, EventArgs e){if (this.ButtonClick != null){this.ButtonClick(sender, e);}}public GridExtraItemsColumn(string fieldName) : base(fieldName){}public override Type GetCellType(GridViewRowInfo row){if (row is GridViewDataRowInfo){return typeof(GridExtraItemsCell);}return base.GetCellType(row);}}
and its Work Perfectly but here's a thing when i click on the cell in run time in first click cell is selected and with the nest click Event fire My goal is run My-button_Click on a first click
In my Radgridview I have a combobox column with 3 predifined value.
1. "No Change"
2. "Partial Return"
3. "Full Return"
I want to set "No Change" as my default value. how can I do that?
My existing code
01.
'>>>>>Create combobox column "status". Datasource "return_status" table
02.
Dim
clm_status
As
New
GridViewComboBoxColumn
03.
clm_status =
CType
(dgv_return.Columns(
"status"
), GridViewComboBoxColumn)
04.
clm_status.DataSource = ds.Tables(
"return_status"
)
05.
clm_status.DisplayMember =
"status_display"
06.
clm_status.ValueMember =
"status_value"
07.
08.
09.
'>>>>>Populate Radgridview "dgv_return". Data source "due_bill_detail" table
10.
For
Each
row
As
DataRow
In
ds.Tables(
"due_bill_detail"
).Rows
11.
12.
Dim
rowInfo
As
New
GridViewDataRowInfo(dgv_return.MasterView)
13.
14.
rowInfo.Cells(dgv_return.Columns(
"status"
).Index).Value =
"No Change"
'This is the combobox column. Its not working
15.
rowInfo.Cells(dgv_return.Columns(
"item_code"
).Index).Value = row(
"item_code"
)
'This is working fine
16.
rowInfo.Cells(dgv_return.Columns(
"item_name"
).Index).Value = row(
"item_name"
)
'This is working fine
17.
dgv_return.Rows.Add(rowInfo)
18.
Next
row