Private
Sub
Grid_ValueChanged(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
Grid.ValueChanged
Dim
dce
As
GridDataCellElement
dce =
CType
(sender, GridDataCellElement)
If
dce.ColumnInfo.Name =
"Devol"
Then
If
Grid.CurrentRow.Cells(
"Devol"
).Value
Then
Grid.CurrentRow.Cells(
"DaysDefDev"
).
ReadOnly
=
False
Else
Grid.CurrentRow.Cells(
"DaysDefDev"
).
ReadOnly
=
True
Grid.CurrentRow.Cells(
"DaysDefDev"
).Value = 0
End
If
End
If
End
Sub
Hi,
I am using the scheduler in TimeLineView and create my appointments programmatically. I want the users to be able to amend the dates and duration of some of the appointments, but not others.
I have set the appointment.AllowEdit to false, but this doesn’t seem to work, as the user can still amend the appointment.
Any thoughts or suggestions
Karl
private void gvwManifestLines_CellBeginEdit(object sender, GridViewCellCancelEventArgs e) | |
{ | |
if (e.ColumnIndex == this.gvwManifestLines.Columns["saturdayDelivery"].Index) | |
{ | |
// A whole bunch of code omitted. | |
} | |
else if (e.ColumnIndex == this.gvwManifestLines.Columns["PackageChooser"].Index) | |
{ | |
RadComboBoxEditor comboEditor = this.gvwManifestLines.ActiveEditor as RadComboBoxEditor; | |
comboEditor.DropDownStyle = RadDropDownStyle.DropDownList; | |
comboEditor.AutoCompleteMode = AutoCompleteMode.Suggest; | |
comboEditor.PopupClosed += new RadPopupClosedEventHandler(comboEditor_PopupClosed); | |
//More code for processing - not relevant. | |
} | |
} | |
void comboEditor_PopupClosed(object sender, RadPopupClosedEventArgs args) | |
{ | |
RadComboBoxEditor comboEditor = sender as RadComboBoxEditor; | |
if (comboEditor != null) | |
{ | |
comboEditor.PopupClosed -= new RadPopupClosedEventHandler(comboEditor_PopupClosed); | |
SendKeys.Send("\r"); | |
} | |
} | |
RadScrollViewer
scrollViewer = new RadScrollViewer();
Telerik.WinControls.UI.RadPanel radPanel1= new Telerik.WinControls.UI.RadPanel();
this.Controls.Add(this.radPanel1);
WrapLayoutPanel wrapLayout = new WrapLayoutPanel();
wrapLayout.Orientation =
Orientation.Horizontal;
scrollViewer.Viewport = wrapLayout;
this.radPanel1.PanelElement.Children.Add(scrollViewer);
for(int i = 0 ; i < 100; i++)
{
wrapLayout.Children.Add(
new RadButtonElement() {Text = "Test" + i, Padding = new Padding(5), Margin = new Padding(2), Size = new Size(50,10)});
}