or
if ((ToggleState)e.Row.Cells[
"RegleActive"
].Value == ToggleState.On)
ThemeResolutionService.LoadPackageResource(
"MyProject.MyCustomTheme.tssp"
)
ThemeResolutionService.ApplicationThemeName =
"MyCustomTheme"
public
class
TMRibbonBar:RadRibbonBar
{
}
Private Sub RGV_ContextMenuOpening(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.ContextMenuOpeningEventArgs)
e.ContextMenu =
Me.RadContextMenuForGrids
End
Sub
Why is the compiler seeing the 2 objects as being different. Here is the error?
RadContextMenu cannot be converted to RadDropDownMenu?
Thanks,
Mark
RadGridView_ViewCellFormatting(
object
sender, CellFormattingEventArgs e)
{
GridDataCellElement dataCell = e.CellElement
as
GridDataCellElement;
if
(dataCell !=
null
)
{
Color borderColor = Color.Transparent;
if
(!dataCell.IsSelected)
borderColor = Color.Red;
dataCell.BorderColor = borderColor;
}
}
Partial
Class
Example
Public
Function
LoadData()
As
Boolean
Me
.DropDownList1.DataSource = Types.ConfirmationType
If
Not
CustomerName
Is
Nothing
Then
' Where the DropDownlist ID is DropDownList1
Me
.DropDownList1.SelectedText =
"Driver"
' Calls the method directly passing the appropriate sender
Me
.DropDownList1_SelectedIndexChanged(
Me
.DropDownList1,
Nothing
)
End
If
End
Function
Protected
Sub
DropDownList1_SelectedIndexChanged(sender
As
System.
Object
, e
As
Telerik.WinControls.UI.Data.PositionChangedEventArgs)
Handles
DropDownList1.SelectedIndexChanged
Dim
options
As
String
=
Me
.DropDownList1.SelectedText
Select
Case
options
Case
"Driver"
'Display the Driver mobile fields
Me
.lblDriverMobile.Visible =
True
Me
.txtDriverMobile.Visible =
True
Me
.ddlDriverMobileCode.Visible =
True
Me
.pbDriverMobile.Visible =
True
Case
Else
'Hide the Driver mobile fields
Me
.lblDriverMobile.Visible =
False
Me
.txtDriverMobile.Visible =
False
Me
.ddlDriverMobileCode.Visible =
False
Me
.pbDriverMobile.Visible =
False
End
Select
End
Sub
End
Class
Me
.DropDownList1_SelectedIndexChanged(
Me
.DropDownList1,
Nothing
)
void
gvEmployes_RowSourceNeeded(
object
sender, GridViewRowSourceNeededEventArgs e)
{
if
(e.Template == gvtEmployeLogiciels)
{
using
( var repo =
new
EmployesRepository())
{
foreach
(LogicielDTO l
in
repo.GetLogicielsOfEmploye((EmployeDTO)e.ParentRow.DataBoundItem))
{
GridViewRowInfo gridRow = e.Template.Rows.NewRow();
gridRow.Cells[
"nom"
].Value = l.nom;
gridRow.Cells[
"nbLicense"
].Value = l.nbLicense;
e.SourceCollection.Add(gridRow);
}
}
}
}
void
gvEmployes_UserDeletingRow(
object
sender, GridViewRowCancelEventArgs e)
{
foreach
(var row
in
e.Rows)
{
switch
(row.DataBoundItem.GetType().Name)
// This will error if you are deleting a LogicielDTO row.
{
case
"EmployeDTO"
:
MessageBox.Show(
"Deleteing "
+ ((EmployeDTO)row.DataBoundItem).nom);
break
;
case
"LogicielDTO"
:
MessageBox.Show(
"Deleteing "
+ ((LogicielDTO)row.DataBoundItem).nom);
break
;
}
}
}