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

How to have dropdownlist and textbox inside a radgrid

3 Answers 205 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ram
Top achievements
Rank 1
ram asked on 11 Nov 2016, 04:46 AM

Hello Guys,

I am new to Telerik Controls and my question is 

 

How do i embed dropdownlist ( Or radcombobox ) and editable text box indise a radgrid ?

Please refer to attachment 

( Dropdownlist or radgrid should populate from datasource)

I have already written the logic for edit delete save commands but to display them inside the grid is my doubt

 

 

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 15 Nov 2016, 09:13 AM
Hello Ram,

The most straightforward way of achieving this is placing a combo control inside the EditItemTemplate of GridTemplateColumn:
http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-types/defaultcs.aspx


And make avail of the SelectedValue property and the Bind expression:
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/form-template-update/defaultcs.aspx

https://msdn.microsoft.com/en-us/library/vstudio/ms178366%28v=vs.100%29.aspx


Alternatively, you can use GridDropDownColumn:
http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-types/defaultcs.aspx
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/columns/column-types#griddropdowncolumn

The GridDropDownColumn generates a combo control only during insert or edit mode:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/how-to/customize-griddropdowncolumn

Therefore, you can access it only during these modes:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/accessing-cells-and-rows#accessing-controls-in-editinsert-mode

If you use GridTemplateColumn approach, you can also bind the combo using its DataBinding event handler, similar to the first attached web site sample.

I hope this will prove helpful.


Regards,
Eyup
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
0
Mersiung
Top achievements
Rank 1
answered on 19 Apr 2018, 03:50 AM

Hi,

I am doing this hierarchical Radgrid

https://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/form-template-update/defaultcs.aspx

Is there any sample with the drop down list that get from the sql data source, and you can edit and insert value?

 

Thank you

0
Eyup
Telerik team
answered on 19 Apr 2018, 10:54 AM
Hello Mersiung,

I'm glad that you've managed to resolve this as stated in your other ticket. I will also share the link you mentioned and another additional one, which can prove helpful to other developers as well:
https://www.telerik.com/forums/binding-dropdown-inside-radgrid
http://www.telerik.com/forums/how-to-have-dropdownlist-and-textbox-inside-a-radgrid#A9aPQyI5vE-ENWi8clmy6Q

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
ram
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Mersiung
Top achievements
Rank 1
Share this question
or