Since GridView.ClearSelection Method is totaly crap(See attached file: NoSelectionFormatting.png)
i need to handle the rowformatting and cellformattiong when no Selection on gridview is done.
Removing the Backcolor was not the problem. But now i need to get the Default Border Color for GridViewCells and GridViewRows when its not selected.(See attached file: NoSelectionFormattingV1.png)
I am using Windows8 Theme in my application but this could be different for other customers, so i tried to get the Theme for the Current Theme like that:
Dim theme As Theme = ThemeResolutionService.GetTheme(ThemeResolutionService.ApplicationThemeName)
Just for testing if the Propertys exists that i need i implemented the following code:
Dim styleGroup As StyleGroup = theme.FindStyleGroup("Telerik.WinControls.UI.RadGridView")
For Each propertyGroup In styleGroup.PropertySettingGroups
For Each setting In propertyGroup.PropertySettings
Select Case setting.Name
Case "BorderColor"
e.RowElement.BorderColor = setting.Value
Case "BorderColor2"
e.RowElement.BorderColor2 = setting.Value
Case "BorderColor3"
e.RowElement.BorderColor3 = setting.Value
Case "BorderColor4"
e.RowElement.BorderColor4 = setting.Value
End Select
Next
Next
But the BorderColor was never set to the default.
Thanks for any help.
The problem is described here:
http://www.telerik.com/support/kb/winforms/details/radgridview-crud-in-object-relational-hierarchy-mode
Due to performance considerations, the RadGridView bound to an object-relational hierarchy supports CRUD operations only for its first level.
I don't want performance but I need to write at less as possible code to achieve this. Performance isn't an issue if I can ignore manually handling of operations for next levels.
Also another related question is that does ASP.NET RadGridView act like WinForms or it can support unlimited level of CRUD operations ?
I have a problem with RadGridView on Winform C# that is couldn't change any properties of RadGridView such as IsCurrent, IsSelected, CurrentRow, ... It's not effect yet.
For example:
My grid isn't readonly, and I changed some values below:
this
.myGridView.CurrentRow =
this
.myGridView.Rows[0];
... then the value of CurrentRow when I watch is still null.
this
.myGridView.Rows[0].IsCurrent =
true
;
... then it's still show as false for that.
I wanted to show a clear button to either clear the value or text of the control.
The idea is the same as the clear button in
dateTimePicker.DateTimePickerElement.Calendar.ClearButton
But I don't see any ClearButton from its child elements.
I came up with the idea to rename the Close Button in
radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.ButtonElement
and to add a clear action on its Click Event.
I came up with this code:
radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.ButtonElement.Text = "Clear";
(radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.Children[0] as RadButtonElement).TextElement.Text = "Clear";
(radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.Children[0] as RadButtonElement).ToolTipText = "Clear";
radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.ButtonElement.Click +=
delegate(object sender, EventArgs e) { radTimePicker.Value = null; };​
The tooltiptext works as well as the clearing of value. with this, I know that I am using the right button element.
But the Text always revert/return to "Close".
Am I forgetting something?
Hey!
How to align the values in the pivot grid cells?
The text seems to be centered by default but i found no obvious property to change this behaviour. I need right alignment.
In the Silverlight version of this control they seem to be aligned to the right by default.
Cheers,
Jens
I have a column group that contains 5 rows. I wish to hide the headers of the last 4 rows. I did put in the following code in the viewcellformatting event (below, but it did not hide the column group rows. My headertext on those rows are empty, and the images are attached. "Capture2.jpg" is the image before using the viewcellformatting event code. "Before.jpg" is the event code below being implemented, and "result.png" is what I am attempting to achieve. Thanks in advance for any help.
Private Sub RadGridView1_ViewCellFormatting(sender As Object, e As CellFormattingEventArgs) Handles RadGridView1.ViewCellFormatting
If TypeOf sender Is GridHeaderCellElement Then
e.CellElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
e.CellElement.AutoSize = False
e.CellElement.MaxSize = New Size(0, 0)
e.CellElement.MinSize = New Size(0, 0)
e.CellElement.Size = New Size(0, 0)
End If​