or
public enum EProductType |
{ |
None = 0, |
Soft = 1, |
Hard = 2 |
} |
class Product |
{ |
EProductType _productType; |
public EProductType ProductType |
{ |
get { return _productType; } |
set { _productType = value; } |
} |
string _key; |
public string Key |
{ |
get { return _key; } |
set { _key = value; } |
} |
string _name; |
public string Name |
{ |
get { return _name; } |
set { _name = value; } |
} |
} |
private void AddMapping() |
{ |
IList<ValueMapping> mappings = new List<ValueMapping>(); |
mappings.Add(new ValueMapping(EProductType.None, "")); |
mappings.Add(new ValueMapping(EProductType.Hard, "Hardware")); |
mappings.Add(new ValueMapping(EProductType.Soft, "Software")); |
Telerik.WinControls.UI.GridViewComboBoxColumn comboColumn = radGridView1.Columns[0] as Telerik.WinControls.UI.GridViewComboBoxColumn; |
comboColumn.DataSource = mappings; |
comboColumn.ValueMember = "ValueMember"; |
comboColumn.DisplayMember = "DisplayMember"; |
} |
class ValueMapping |
{ |
public ValueMapping(object value, string displayMember) |
{ |
_valueMember = value; |
_displayMember = displayMember; |
} |
string _displayMember; |
public string DisplayMember |
{ |
get { return _displayMember; } |
} |
object _valueMember; |
public object ValueMember |
{ |
get { return _valueMember; } |
} |
} |
var mAgentsInList = from a
in
cAgentList
where a.AgentId.ToLower() == p_AgentId.ToLower()
select a;
foreach
(DTLAgent feAgentToUpdate
in
mAgentsInList)
{
feAgentToUpdate.OutboundCalls = 99;
if
(p_Direction.ToUpper() ==
"IN"
)
{
feAgentToUpdate.Direction =
"In"
;
}
}
grdAgents.MasterTemplate.Refresh();
Hi
By default if validation for row failed there is icon with exclamation mark in row header (I use GridViewRowInfo.ErrorText to define text for tool tip).
I would like to use my own icon. How can I do it?
Regards
Public
Class
Form1
Private
Sub
Form1_Load(sender
As
System.
Object
, e
As
System.EventArgs)
Handles
MyBase
.Load
Me
.KeyPreview =
True
Dim
x
As
Boolean
x = LogIntoSQL()
If
x =
True
Then
Try
myList =
New
BindingList(Of CompanyHistory)()
LoadNewCompanyHistory()
RadGridView1.DataSource = myList
Catch
ex
As
Exception
MsgBox(ex.Message)
End
Try
End
If
End
Sub
Private
tbSubscribed
As
Boolean
=
False
Private
Sub
radGridView1_CellEditorInitialized(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.WinControls.UI.GridViewCellEventArgs)
Dim
tbEditor
As
RadTextBoxEditor = TryCast(
Me
.RadGridView1.ActiveEditor, RadTextBoxEditor)
If
Not
tbEditor
Is
Nothing
Then
If
(
Not
tbSubscribed)
Then
tbSubscribed =
True
Dim
tbElement
As
RadTextBoxEditorElement =
CType
(tbEditor.EditorElement, RadTextBoxEditorElement)
AddHandler
tbElement.KeyDown,
AddressOf
tbElement_KeyDown
End
If
End
If
End
Sub
Private
Sub
tbElement_KeyDown(
ByVal
sender
As
Object
,
ByVal
e
As
KeyEventArgs)
If
e.Control
Then
If
e.KeyCode = Keys.F1
Then
CType
(sender, RadTextBoxEditorElement).Text =
"F1"
End
If
If
e.KeyCode = Keys.F2
Then
CType
(sender, RadTextBoxEditorElement).Text =
"F2"
End
If
If
e.KeyCode = Keys.L
Then
CType
(sender, RadTextBoxEditorElement).Text =
"LLLL"
End
If
End
If
End
Sub
Public
Sub
New
()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
AddHandler
RadGridView1.CellEditorInitialized,
AddressOf
radGridView1_CellEditorInitialized
End
Sub
End
Class