hey,
I'm using Windows 8 Theme in Telerik for Winforms 2018.1.116.40.
With this theme, in a GridViewCommandColumn, buttons are not really cutes, the cells likes grey and user doesn't see it's a button.
So, i want to reduce the size of buttons and center them in the cells.
I use command lines below in CellFormatting event
Dim
button
As
RadButtonElement =
CType
(e.CellElement.Children(0), RadButtonElement)
button.Margin =
New
Padding(2)
In this case, some borders are no more visible (cf attached file).
Have you got an idea please ?
Subsidiary question : If on a condition, i only want my html text but without button i use the code in cellFormating event
element.CommandButton.ButtonFillElement.NumberOfColors = 1
element.CommandButton.ButtonFillElement.BackColor = Color.FromArgb(255, 255, 255, 255)
button.BorderElement.Visibility = ElementVisibility.Hidden
it works, but it's surely a poor code, i have tried too with
button.BorderElement.Visibility = ElementVisibility.Hidden
and i don't see button and text.
If you have a better code ;)
Thanks for your help
--
Romain
Hello,
Is it possible to change the color of the selected text in MaskedTextBox? If you check the attached photo it shows a blue color that doesn't fit with our app's look and feel.
Kind Regards.
Fernando.
Hi,
I need to open existing word document and show that document in RadRichTextEditor with extra information (like Name of the person at the top of the document), and also have to add signature and names at the end of the document and save the document. I did using Microsoft.Office.Interop.Word.Document before with DSOFramer control but DSOFramer is having some issues and trying to achieve same using RadRichTextEditor.
Appreciate your help as soon as possible.
thank you!
Hello,
I'm trying to make a list with alternating row colors like the one in the attached image but I'm having troubles making the rows with different colors, it only get the
last one.
I'm attaching the code:
Any help will be appreciated.
Kind regards.
Private
Sub
lstProductos_VisualItemCreating(sender
As
Object
, e
As
ListViewVisualItemCreatingEventArgs)
Handles
listViewMSProductos.VisualItemCreating
If
Me
.listViewMSProductos.ViewType = ListViewType.IconsView
Then
e.VisualItem =
New
CustomListViewItemIconType(IdApp)
e.VisualItem.ImageLayout = ImageLayout.Center
e.VisualItem.ImageAlignment = ContentAlignment.TopCenter
e.VisualItem.TextAlignment = ContentAlignment.BottomCenter
Else
Dim
aux
As
Integer
= 1
For
Each
item
In
listViewMSProductos.ListViewElement.ViewElement.Items
If
aux
Mod
(2) = 0
Then
e.VisualItem =
New
CustomListViewItemListType(Color.Red)
Else
e.VisualItem =
New
CustomListViewItemListType(Color.Blue)
End
If
aux = aux + 1
Next
End
If
End
Sub
Public Class CustomListViewItemListType
Inherits SimpleListViewVisualItem
Public
Sub
New
( pColor
As
Color)
Me
.BackColor = _color
End
Sub
End Class
how can I detect if the cellclick comes from the template or the master grid?
thanks
andre
Hi,
Version: 2017.3.1017.20
Code to reproduce problem below. Just create new form and copy-paste code below.
public
partial
class
Form : System.Windows.Forms.Form
{
public
Form()
{
InitializeComponent();
}
private
void
Form_Load(
object
sender, EventArgs e)
{
RadGridView grid =
new
RadGridView();
grid.Dock = DockStyle.Left;
grid.SortDescriptors.Add(
"Id"
, ListSortDirection.Ascending);
grid.SelectionMode = GridViewSelectionMode.FullRowSelect;
BindingList <X> bindingList =
new
BindingList<X>();
bindingList.Add(
new
X() { Id = 1, Name =
"Row 1"
});
bindingList.Add(
new
X() { Id = 5, Name =
"Row 5"
});
bindingList.Add(
new
X() { Id = 3, Name =
"Row 3"
});
bindingList.Add(
new
X() { Id = 4, Name =
"Row 4"
});
bindingList.Add(
new
X() { Id = 2, Name =
"Row 2"
});
bindingList.Add(
new
X() { Id = 6, Name =
"Row 6"
});
bindingList.Add(
new
X() { Id = 7, Name =
"Row 7"
});
bindingList.Add(
new
X() { Id = 8, Name =
"Row 8"
});
bindingList.Add(
new
X() { Id = 9, Name =
"Row 9"
});
bindingList.Add(
new
X() { Id = 10, Name =
"Row 10"
});
Controls.Add(grid);
grid.DataSource = bindingList;
RadButton radButton =
new
RadButton();
radButton.Text =
"Delete row"
;
radButton.Dock = DockStyle.Right;
radButton.Click +=
delegate
{
var selected = (X)grid.CurrentRow.DataBoundItem;
bindingList.Remove(selected);
};
Controls.Add(radButton);
}
}
public
class
X
{
public
Int32 Id {
get
;
set
; }
public
String Name {
get
;
set
; }
}
My grid is connected to binding list. Clicking on the button remove currently selected row from binding list.
The problem is: Sometimes after deleting, nearest row is selected. Sometimes grid is clearing selection.
Please see attached gif.
I would like the next record to be always selected after deleting current one.
If deleted row was last row, it should select previous one.
I was trying to use GridNavigator.SelectPreviousRow(1) and GridNavigator.SelectNextRow(1) but it do not work, becouse sometimes after deleting row grid is clearing selection.
How can I set it up so that when a user selects a day in the Scheduler, then selects to create a recurring appointment, the Edit Recurring Appointment dialog will, when Weekly recurrence type is selected, set the Day of Week to the Day of Week selected in the calendar, NOT the Day of Week in real-time.
Thank you!
-Scott