hi telerik
i'm use Telerik themes "Fluent" and "FluentDark" in my project. with a "ToggleSwitcher" and below code, change my project theme at runtime without any issue.
but, most controls like button, have image. in "Fluent" i'm use Black image, and must use White image in "FluentDark" theme. Now, have any solution to change all (maybe 100 Controls) image/icon at runtime? or have any solution for switch iamge between Dark and Light theme?
ThemeResolutionService.ApplicationThemeName =
"Fluent"
;
I have a GridView where I am changing the cell BackColor when the value is changed:
void
TelerikGridView_CellValueChanged(
object
sender, GridViewCellEventArgs e)
{
if
(e.Row.Tag ==
null
)
e.Row.Tag = e.Column.Name;
if
(!e.Row.Tag.ToString().Contains(e.Column.Name))
e.Row.Tag += e.Column.Name;
}
void
TelerikGridView_CellFormatting(
object
sender, CellFormattingEventArgs e)
{
if
(e.Row.Tag !=
null
&& e.Row.Tag.ToString().Contains(e.Column.Name))
{
e.CellElement.DrawFill =
true
;
e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
e.CellElement.BackColor = Color.Red;
}
else
{
e.CellElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.GradientStyleProperty, Telerik.WinControls.ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, Telerik.WinControls.ValueResetFlags.Local);
}
}
This is working as expected, now I want to add a "Reset" button, when I click on it I would like to reset or remove the format of all the cells that have been changed, how can I accomplish this?
Regards,
Alberto
How I can loop through all row of my grid and detect only row with checkbox column checked ?
i use this solution and got error :
-------------------------------------------------------------------------------------------------------
Error:
"System.NullReferenceException: 'Object reference not set to an instance of an object.'Telerik.WinControls.UI.GridViewCellInfo.Value.get returned null."
-------------------------------------------------------------------------------------------------------
Code:
IList<GridViewRowInfo> gridRows = new List<GridViewRowInfo>();
foreach (GridViewRowInfo rowInfo in radGridView.ChildRows)
{
bool isChecked = (bool)rowInfo.Cells["CheckboxColumn"].Value;
if (isChecked == true)
{
gridRows.Add(rowInfo);
}
}
How I can search through all row of my grid and detect only row with checkbox column checked ? ( Note : user change value and select checkbox at run time ... )
i use this code and got an error :
------------------------------------------------------------------------------------------------------------------------------------
Error :
System.NullReferenceException: 'Object reference not set to an instance of an object.'
Telerik.WinControls.UI.GridViewCellInfo.Value.get returned null.
------------------------------------------------------------------------------------------------------------------------------------
Code :
IList<GridViewRowInfo> gridRows = new List<GridViewRowInfo>();
foreach (GridViewRowInfo rowInfo in radGridView.ChildRows)
{
bool isChecked = (bool)rowInfo.Cells["CheckboxColumn"].Value;
if (isChecked == true)
{
gridRows.Add(rowInfo);
}
}
------------------------------------------------------------------------------------------------------------------------------------
XML sample:
<?xml version="1.0" encoding="utf-8"?>
<TemplateLibrary xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="1.0" xmlns="http://www.example.org/NewXMLSchema">
<Category name="Decks">
<Category name="Standard Templates">
<Category name="Deck Slabs">
<Template name="Slab with constraints - 2 Lanes" guid="e4d44934-ff00-4c54-9de7-304896e0df45" lastRevisedDate="2015-08-31" lastRevisedBy="Sri.Kanneganti" versionMajor="1" versionMinor="32">
</Template>
</Category>
</Category>
</Category>
</TemplateLibrary>
my expected effect is like the attcached picture.
How can I collapse the Titlebar ?
this.FormElement.TitleBar.Visibility = ElementVisibility.Collapsed;
=> Not working
Code
Public Function NuevoExport(ByVal Grilla As RadGridView, ByVal Grilla2 As RadGridView) As Boolean
For fila = 0 To Grilla.RowCount - 1
For col As Integer = 0 To Ncol - 1
exHoja.Cells.Item(fila + 2, col + 1) = Grilla.Item(col, fila).Value
Next
Next