This is a migrated thread and some comments may be shown as answers.

Not able to make GridViewComboBoxColumn editing to work

3 Answers 118 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Albert
Top achievements
Rank 1
Albert asked on 05 Oct 2020, 02:20 PM

The requirement is to have a dropdown of string collection which can be different from row to row. So I used ItemsSourceBinding according to the document. But the combox didn't show up when I clicked the cell.

<telerik:GridViewComboBoxColumn Header="Reason"
DataMemberBinding="{Binding MyReason}"
HeaderCellStyle="{StaticResource GridHeaderStyle}"
ItemsSourceBinding="{Binding ValidReasons}"
IsComboBoxEditable="True"
EditTriggers="CurrentCellClick"
IsReadOnly="False"
GroupMemberPath="Check"
/>

"GroupMemberPath" was there before. I added "IsComboBoxEditable", "EditTriggers" and "IsReadOnly" and found nothing changed. I assumed that IsComboBoxEditable can be used if the reason is not found in "ValidReasons".

3 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 08 Oct 2020, 08:56 AM

Hello Albert,

Thank you for the provided code snippet.

I am not sure why Combobox is not visible in your application. To test this, I have created one on my side, and the combo box control appears when the cell is in edit mode. Can you check the attached project and let me know what I am missing from your implementation to reproduce this behavior?

I am looking forward to your reply.

Regards,
Dinko
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Albert
Top achievements
Rank 1
answered on 08 Oct 2020, 07:33 PM

Hi Dinko,

Thanks for the reply. Later on I realized that the style used by grid has readonly specified. Once I made the grid readonly as false, I was able to see the ComboxBox. 

I have two other questions related -

1) The dropdown arrow is not visible by default. Is there a way to always display the dropdown arrow.

2) I can type letter into combobox in the test app, but only backspace key is effective when the component integrated into the application. Any hint how to check why the keyboard is not working?

Regards,

Albert

0
Dinko | Tech Support Engineer
Telerik team
answered on 13 Oct 2020, 09:55 AM

Hello Albert,

1) The dropdown arrow is not visible by default. Is there a way to always display the dropdown arrow?

The RadComboBox control will be visible only in edit mode. To show the dropdown button you will need to use regular RadComboBox control and placed it inside CellTemplate of a column. I have modified the project to demonstrate this approach.

2) I can type letter into combobox in the test app, but only backspace key is effective when the component is integrated into the application. Any hint how to check why the keyboard is not working?

You can check if you have custom logic somewhere that handles key input in your application.  You can try to isolate it by removing parts of your code.

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/.

Tags
GridView
Asked by
Albert
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Albert
Top achievements
Rank 1
Share this question
or