or
public
class
MyRadButtonElement:Telerik.WinControls.UI.RadButtonElement
{
private
String _blabla;
public
MyRadButtonElement(String blabla)
:
base
()
{
_blabla = blabla;
}
protected
override
Type ThemeEffectiveType
{
get
{
return
typeof
(Telerik.WinControls.UI.RadButtonElement);
}
}
}
if (someConditionIsTrue)
{
e.CellElement.BackColor = Color.Red;
return;
}
e.CellElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
Hi.
I want to show the new appointment Dialog (advanced) (see pictures attached) rather than the “inline” 3 option ( Save, Cancel, Options) dialog, when you DoubleClick on the RadSchduler to create a new appointment.
Your help will be appreciated.
Thank you
When I attempt to enable row reordering with a gridview bound to a DataTable rather than manually adding rows like in the demo application, nothing happens.
Is it possible to make reordering or drag/drop work when bound to a DataTable?
private
void
InitializeGridControl()
{
this
.rgDetails.TableElement.SetValue(DockLayoutPanel.DockProperty, Telerik.WinControls.Layouts.Dock.Top);
this
.rgDetails.TableElement.Margin =
new
Padding(10, 0, 10, 10);
this
.detailView =
new
GridViewDetailElement();
this
.rgDetails.GridViewElement.Panel.Children.Insert(1,
this
.detailView);
this
.detailView.SetValue(DockLayoutPanel.DockProperty, Telerik.WinControls.Layouts.Dock.Bottom);
this
.detailView.Margin =
new
Padding(10, 0, 10, 2);
}
public
class
GridViewDetailElement : GridVisualElement, IGridView
{
private
RadGridViewElement gridElement;
private
GridViewInfo viewInfo;
public
DetailElement detailPanel;
#region Fields
private
RadHostItem hostDetailView;
#endregion
#region Initialization
protected
override
void
InitializeFields()
{
base
.InitializeFields();
this
.UseNewLayoutSystem =
true
;
this
.Padding =
new
System.Windows.Forms.Padding(10);
this
.StretchHorizontally =
true
;
this
.MinSize =
new
Size(0, 250);
this
.MaxSize =
new
Size(0, 250);
this
.DrawFill =
true
;
this
.Class =
"RowFill"
;
this
.detailPanel =
new
DetailElement();
}
protected
override
void
CreateChildElements()
{
base
.CreateChildElements();
hostDetailView =
new
RadHostItem(detailPanel);
this
.Children.Add(hostDetailView);
}
public
void
Initialize(RadGridViewElement gridElement, GridViewInfo viewInfo)
{
this
.gridElement = gridElement;
this
.viewInfo = viewInfo;
this
.gridElement.GridControl.CurrentRowChanged +=
new
CurrentRowChangedEventHandler(GridControl_CurrentRowChanged);
}
public
void
Detach()
{
this
.gridElement.GridControl.CurrentRowChanged -=
new
CurrentRowChangedEventHandler(GridControl_CurrentRowChanged);
this
.gridElement =
null
;
this
.viewInfo =
null
;
}
public
void
UpdateView()
{
GridViewDataRowInfo dataRow =
this
.GridViewElement.GridControl.CurrentRow
as
GridViewDataRowInfo;
if
(dataRow !=
null
)
{
detailPanel.UpdateUCView(dataRow);
}
}
public
RadGridViewElement GridViewElement
{
get
{
return
this
.gridElement; }
}
public
GridViewInfo ViewInfo
{
get
{
return
this
.viewInfo; }
}
#endregion
#region Event Handlers
private
void
GridControl_CurrentRowChanged(
object
sender, CurrentRowChangedEventArgs e)
{
this
.UpdateView();
}
#endregion
...
}
public
partial
class
DetailElement : UserControl
{
public
DetailElement()
{
InitializeComponent();
}
public
void
UpdateUCView(GridViewDataRowInfo dataRow)
{
string
statusView;
if
(dataRow !=
null
)
{
statusView = GetSafeString(dataRow.Cells[
"State"
].Value.ToString());
switch
(statusView)
{
case
"Running"
:
picBoxStatus.Image = Properties.Resources.start24;
break
;
case
"Paused"
:
picBoxStatus.Image = Properties.Resources.pause24;
break
;
case
"Stopped"
:
picBoxStatus.Image = Properties.Resources.stop_red24;
break
;
default
:
picBoxStatus.Image = Properties.Resources.warning16;
break
;
}
this
.rTxtServiceOwner.Text = GetSafeString(dataRow.Cells[
"StartName"
].Value.ToString());
this
.rTxtServiceType.Text = GetSafeString(dataRow.Cells[
"ServiceType"
].Value.ToString());
....
}
private
void
rChkTrackService_Click(
object
sender, EventArgs e)
{
// How Do I pass an update from this CheckBox back to my main Grid ???????????????
}
}