How to add Textbox and combobox in gridview in design time ?

1 Answer 103 Views
GridView
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
Aravind asked on 06 Jun 2023, 07:42 AM

Hi,

  I want to add 2 columns in radgrid with textbox and combobox, i can add both in design time, but for values for combobox ,if i add values in collections and run it, i cant see that values in combo box list.

Sscreenshot when run time


Screenshot when design time


Pls reply asap.

Note. I don't want to add columns programmatically. ony when design time i need to add textbox and combobox value list.

Regards
Aravind

1 Answer, 1 is accepted

Sort by
1
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Jun 2023, 10:40 AM

Hello, Aravind,

Please have in mind that the GridViewComboBoxColumn expects a DataSource collection to be assigned which will be used by the activated editor at run time.

Please give this approach a try and see how it works on your end.

Regards,
Dess | Tech Support Engineer, Principal
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.

Aravind
Top achievements
Rank 2
Iron
Iron
Iron
commented on 15 Jun 2023, 10:17 AM

Is any other way to add data in comobobox ? i cant use data source to add data in combobox. i have 6 to 7 values must hard code in combobox.
Dess | Tech Support Engineer, Principal
Telerik team
commented on 19 Jun 2023, 03:07 PM

Hi, Aravind,

It is possible to use a standard GridViewTextBoxColumn and just replace the default editor with a drop down in the EditorRequired event. The second approach in the following KB article demonstrates this approach:

https://docs.telerik.com/devtools/winforms/knowledge-base/display-text-for-invalid-values-in-grid-combobox-column 

I believe that it would be applicable for your scenario.

Tags
GridView
Asked by
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or