How to have dropdownlist and textbox inside a radgrid

4 posts, 0 answers
  1. ram
    ram avatar
    2 posts
    Member since:
    Nov 2016

    Posted 10 Nov 2016 Link to this post

    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

     

     

  2. Eyup
    Admin
    Eyup avatar
    3962 posts

    Posted 15 Nov 2016 Link to this post

    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.
  3. Mersiung
    Mersiung avatar
    1 posts
    Member since:
    Apr 2018

    Posted 18 Apr 2018 in reply to Eyup Link to this post

    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

  4. Eyup
    Admin
    Eyup avatar
    3962 posts

    Posted 19 Apr 2018 Link to this post

    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.
Back to Top