or
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 IfEnd SubHi,
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"); | |
| } | |
| } | |