8 Replies - 1176 Views - Last Post: 21 September 2015 - 11:09 PM

#1 develauper  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 10-February 15

How to databind a drop down field of a gridview

Posted 22 June 2015 - 09:57 AM

I have a gridview in which I am going to insert new data into my database. I have switched my textbox of one of my gridview fields to a drop down field and I am not sure how to data bind that field to insert into the table (the dropdown field is referring to a validator and is required in order to insert new information).

Any help is awesome, I am just not sure how to do it.
Is This A Good Question/Topic? 0
  • +

Replies To: How to databind a drop down field of a gridview

#2 andrewsw  Icon User is offline

  • lashings of ginger beer
  • member icon

Reputation: 6340
  • View blog
  • Posts: 25,562
  • Joined: 12-December 12

Re: How to databind a drop down field of a gridview

Posted 22 June 2015 - 10:01 AM

What kind of application? ASP.NET? WPF?
Was This Post Helpful? 0
  • +
  • -

#3 develauper  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 10-February 15

Re: How to databind a drop down field of a gridview

Posted 22 June 2015 - 10:03 AM

View Postandrewsw, on 22 June 2015 - 10:01 AM, said:

What kind of application? ASP.NET? WPF?


im creating a website
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is offline

  • lashings of ginger beer
  • member icon

Reputation: 6340
  • View blog
  • Posts: 25,562
  • Joined: 12-December 12

Re: How to databind a drop down field of a gridview

Posted 22 June 2015 - 10:10 AM

So.. ASP.NET? When you started Visual Studio, and created a new project, what type of project did you choose?
Was This Post Helpful? 0
  • +
  • -

#5 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 5101
  • View blog
  • Posts: 9,283
  • Joined: 08-June 10

Re: How to databind a drop down field of a gridview

Posted 22 June 2015 - 10:17 AM

I think this is pretty clearly a WebForms project, considering the references to DataGrid. If it were MVC it would just be a loop and a table.
Was This Post Helpful? 0
  • +
  • -

#6 develauper  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 10-February 15

Re: How to databind a drop down field of a gridview

Posted 22 June 2015 - 10:21 AM

View Postandrewsw, on 22 June 2015 - 10:10 AM, said:

So.. ASP.NET? When you started Visual Studio, and created a new project, what type of project did you choose?


yes, i created a web form in c#. sorry for the confusion
Was This Post Helpful? 0
  • +
  • -

#7 andrewsw  Icon User is offline

  • lashings of ginger beer
  • member icon

Reputation: 6340
  • View blog
  • Posts: 25,562
  • Joined: 12-December 12

Re: How to databind a drop down field of a gridview

Posted 22 June 2015 - 10:39 AM

Topic moved to ASP.NET, WebForms forum.
Was This Post Helpful? 0
  • +
  • -

#8 andrewsw  Icon User is offline

  • lashings of ginger beer
  • member icon

Reputation: 6340
  • View blog
  • Posts: 25,562
  • Joined: 12-December 12

Re: How to databind a drop down field of a gridview

Posted 22 June 2015 - 02:01 PM

I am not an ASP.NET person myself, but there is a tutorial here:

How to bind data to DropDownList in GridView in ASP.Net

The forum is for specific questions, so give it a go, or find another tutorial, then come back if you are struggling.

This post has been edited by andrewsw: 22 June 2015 - 02:01 PM

Was This Post Helpful? 0
  • +
  • -

#9 articlemirror  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 21-September 15

Re: How to databind a drop down field of a gridview

Posted 21 September 2015 - 11:09 PM

hi,
Please refer to given link hope it helps you...

Dropdownlist in Gridview data control in Asp.net

Thanks,
vijay
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1