Results 1 to 2 of 2

Thread: Change textbox column to combo box column in datagridview

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2010
    Posts
    25

    Change textbox column to combo box column in datagridview

    Hello All Experts,

    In my window application i have taken one combobox column with its collection as "amc", "war" etc.

    Now in my datagridview this combobox column is display as Textbox column, i want to change it to combobox with the above collection "amc","war".

    I have retreiving the result in datagrid through sql query, hence in datagrid edit column section we doesnot have that part to change to Combobox column.

    Please let me know how it will be possible by using vb.net code.

    Looking for the solution.

    Thanks,

    AKM

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Change textbox column to combo box column in datagridview

    You don't change a text box column to a combo box column any more than you change a dog into a cat. If you want a combo box column then you have to add a combo box column in the first place. Data-binding will never create one for you. Follow the CodeBank link in my signature and check out my thread on the topic.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width