7 Answers, 1 is accepted
Hello Tommy,
If I have understood you correctly, you want to disable the combobox inside the cell in edit mode on a particular row. In this case, you can get the editing element in the PreparingCellForEdit event. Can you check if this event will work for you? If not can you share a little more details about your scenario and what you want to modify/change?
Regards,
Dinko
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Thanks, Dinko! I think this is very close, however I am unable to modify the current row's controls. Below is my code, and my issue is that row.ItemsSource = null performs this on each row's Cell[4] when I only need that to happen on the current row only.
private void dgMainDetails_PreparingCellForEdit(object sender, Telerik.Windows.Controls.GridViewPreparingCellForEditEventArgs e) { if ((string)e.Column.Header == "Property") { var row = e.Row.Cells[4].DataColumn as Telerik.Windows.Controls.GridViewComboBoxColumn; row.ItemsSource = null; } }
Hi Tommy,
When the cell is edited for a GridViewComboBoxColumns, a RadComboBox control will appear with the items set to the column. To clear the source you can use the EditingElement property from the event arguments. This property represents the element that will be used for editing. In GridViewComboBoxColumn, that will be RadComboBox. You can set its ItemsSource property to null.
private void RadGridView_PreparedCellForEdit(object sender, Telerik.Windows.Controls.GridViewPreparingCellForEditEventArgs e)
{
if ((string)e.Column.Header == "PointSchemeID")
{
(e.EditingElement as Telerik.Windows.Controls.RadComboBox).ItemsSource = null;
}
}
Regards,
Dinko
Progress Telerik
Тhe web is about to get a bit better!
The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

Thanks, Dinko! I had this in the beginning, however what I can't seem to find is if, for example, the value is changed in COLUMN1, then how would I reference COLUMN2 to set COLUMN2 to "test" or make the itemsource for that column to null?
private void dgMainDetails_PreparedCellForEdit(object sender, Telerik.Windows.Controls.GridViewPreparingCellForEditEventArgs e) { if ((string)e.Column.Header == "COLUMN1") { (e.EditingElement as Telerik.Windows.Controls.RadComboBox).Text = "test"; //<-- Needs to be COLUMN2 } }
Hi Tommy,
I see what you mean here. May I ask you to share what type of columns you have? You can specify when you change the source of the RadComboBox, what is the type of the next column which you want to change. I am asking you this because, depending on the column type, I could try to think of a possible solution without breaking the binding for the whole column.
Regards,
Dinko
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly, just got a fresh new look + new and improved content, including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Hey Dinko. Below are the column defs. If I change COLUMN1 to a certain value, I need COLUMN2 to rebind with data associated only with COLUMN1's newly selected value.
<telerik:GridViewComboBoxColumn
x:Name="COLUMN1" Header="COLUMN1" Width="180" SelectedValueMemberPath="ccode" IsLightweightModeEnabled="True" IsComboBoxEditable="True"
DisplayMemberPath="cdesc" DataMemberBinding="{Binding JCODE}" IsSearchable="True" >
<telerik:GridViewComboBoxColumn.EditorStyle>
<Style TargetType="telerik:RadComboBox">
<Setter Property="OpenDropDownOnFocus" Value="True"/>
<Setter Property="IsFilteringEnabled" Value="True"/>
<Setter Property="IsEditable" Value="True" />
<Setter Property="TextSearchMode" Value="Contains" />
<Setter Property="StaysOpenOnEdit" Value="True"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<!--<EventSetter Event="LostFocus" Handler="COLUMN1_SelectedChanged" />-->
</Style>
</telerik:GridViewComboBoxColumn.EditorStyle>
</telerik:GridViewComboBoxColumn>
<telerik:GridViewComboBoxColumn
x:Name="COLUMN2" Header="COLUMN2" Width="180" SelectedValueMemberPath="please" IsLightweightModeEnabled="True" IsComboBoxEditable="True"
DisplayMemberPath="plwname" DataMemberBinding="{Binding JLEASE}" IsSearchable="True" >
<telerik:GridViewComboBoxColumn.EditorStyle>
<Style TargetType="telerik:RadComboBox">
<Setter Property="OpenDropDownOnFocus" Value="True"/>
<Setter Property="IsFilteringEnabled" Value="True"/>
<Setter Property="IsEditable" Value="True" />
<Setter Property="TextSearchMode" Value="Contains" />
<Setter Property="StaysOpenOnEdit" Value="True"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<!--<EventSetter Event="LostFocus" Handler="COLUMN2_SelectedChanged" />-->
</Style>
</telerik:GridViewComboBoxColumn.EditorStyle>
</telerik:GridViewComboBoxColumn>
Hello Tommy,
Thank you for the provided information.
My current understanding is that you want to populate the values inside a GridViewComboBox column depending on the value selected in another column and you also want to conditionally disable the cells inside a column. Feel free to correct, if I am wrong and elaborate on your requirements.
I believe that you can utilize the approach demonstrated in the CascadingComboboxColumns SDK example along with the IsReadOnlyBinding feature, which allows you to conditionally make specific cells inside a column readonly based on a property of the item.
I am attaching the above mentioned SDK example modified to demonstrate the IsReadOnlyBinding feature as well. Do check it out and let me know, if you find it helpful.
Regards,
Vladimir Stoyanov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.