Hello,
I have a Radgrid.
What i want to do is, that when a numeric value is negative it should be in forecolor red. This is not the Problem.
But when i group the grid by any of the header other values have forecolor red although the value is not negative and its fieldname is not "erfolg" or "erfolgprozent".
My code is:
If TypeOf e.CellElement.ColumnInfo Is GridViewDataColumn Then
If DirectCast(e.CellElement.ColumnInfo, GridViewDataColumn).FieldName.ToLower = "erfolg" Or DirectCast(e.CellElement.ColumnInfo, GridViewDataColumn).FieldName.ToLower = "erfolgprozent" Then
If IsNumeric(e.CellElement.Value) Then
If CDbl(e.CellElement.Value) < 0 Then
e.CellElement.ForeColor = System.Drawing.Color.Red
Else
e.CellElement.ForeColor = System.Drawing.Color.Black
End If
End If
End If
End If
Hello,
Is there a way to have RadDataEntry controls read only? I know I can set Enabled =False for the whole RadDataEntry control but i"d like to limit it for some users while allow others to make changes. Also, users with read only access should be able to copy RadDataEntry controls values which is not the case for Enabled=False scenario.
Any clue is appreciated.
Thanks
Wojciech
Hello,
how can I change the "GridViewPdfExport.PageSize Property" from Default 210 x 297 mm to Din A 4 Landscape 297 x 210 mm?
Namespace "Telerik.WinControls.Export" is imported.
Using PdftoExport is not an option because I need the header feature.
I am using VB.Net.
Thanks in advance,
F. Schulze
hi ,
I want my binding data source to update or refresh after adding a new record to the database.When I add one it won't update till closing and re-opening the form.
I would like the Ribbonbar to always appear collapsed even when I select some of the tabs on it. I want to be able to expand it only when certian criteria are met.
So far I have been unable to get the ribbonbar to start off Collapsed, nor can I get it to remain collapsed.
Please Advise
Thanks
Jason
I have a RadSplitbutton with 6 subitems. When I click on the arrow, I expect the dropdown menu to be displayed, instead it is first firing the click event of the button, then displaying the menu. This is not what I wan to happen!
How to I prevent this from happening when trying to select the Arrow?
Thanks
Jason
Grid is cleared and then Loaded with data. User selects "new row" and the system puts them on a specific cell. User enters a value and TABS or ENTERS. Then does other tasks. User returns to the grid which is again cleared and then Loaded with data. The user selects "new row" and the system puts them on a specific cell, which is prepopulated with the previous value entered.
>>> Would like not to have the new row cell pre-populated
Steps:
1. Add a value to a cell (a) on a new grid row and commit it.
2. Perform other tasks on the form
3. Return to the Grid in (1) and open a new row.
> The value from (1) is set as the default for the cell (a)
Although I clear the grid before repopulating, I haven't been able to remove this default (previous) value.
Just before I Load the grid:
dgvItems.Rows.Clear()
Any ideas how to prevent it from pre-populating?
Hi,
I'm working on a project where I need to display data in Telerik RadGridView.
One of the column is going to display icons (can be multiple, displayed horizontally). These icons will be provided from .resx file of the project.
I was exploring custom column, tried creating custom column with RadPanelElement assuming that I'll be able to add picturebox windows control to the RadPanelElement object like
protected override void SetContentCore(object value)
{
if (this.Value != null && this.Value != DBNull.Value)
{
//this.radProgressBarElement.Value1 = Convert.ToInt16(this.Value);
//this.radImageList
foreach(string strImgIndex in this.Value.ToString().Split(','))
{
PictureBox pbIcon = new PictureBox();
switch (int.Parse(strImgIndex))
{
case 0:
pbIcon.Image = WindowsFormsApplication1.Properties.Resources.binoculars;
break;
case 1:
pbIcon.Image = WindowsFormsApplication1.Properties.Resources.open;
break;
case 2:
pbIcon.Image = WindowsFormsApplication1.Properties.Resources.printer;
break;
}
//this.radImageList.Controls.Add (NOT ABLE TO ADD CONTROLS DYNAMICALLY)
//pbIcon.Image = Image.
}
}
It didn't work as not able to add controls to RadPanelElement. Please provide a way out to achieve the required custom column.
Thanks & Regards
Brajendra Singh
Hello,
I have a grid view with a cell containing either a TextBox which is ReanOnly or a ComboBox for which the user has to select a value.
The arrow button of ComboBox cell is only visible when user clicks on cell to edit it. Thus, the user does not know if he has to select or not a value
I'd like that the arrow button of ComboBox cell is always visible to indicate to user that a value has to be selected.
I've tried to set the visibility of arrow button in EditorRequired event but it has no effect.
void QualityControlsEntryGridView_EditorRequired(object sender, EditorRequiredEventArgs e)
{
if (QualityControlsEntryGridView.Columns["Result"].IsCurrent)
{
if (QualityControlsEntryGridView.CurrentRow.Cells["ReferenceValueToType"].Value.ToString() != "")
{
e.Editor = new RadTextBoxEditor();
e.EditorType = typeof(RadTextBoxEditor);
}
else
{
e.Editor = new RadDropDownListEditor();
e.EditorType = typeof(RadDropDownListEditor);
RadDropDownListEditorElement editorElement = (RadDropDownListEditorElement)((RadDropDownListEditor)e.Editor).EditorElement;
editorElement.ArrowButton.Visibility = ElementVisibility.Visible;
}
}
}