template field gridview

Posted by Sahaj.seema under C# on 2/20/2010 | Views : 2526 | Status : [Member] | Replies : 2
hi genious,
in my application i want to create a new sales order.for that i have to create a grid which contain the first column as names of all the items(drop dawn list) from the database.the user will select one & all remaining fields like rate,tax,discount are filled from database.but how the drop dawn list will be filled from database at run time &how the user will able to select one(same should happen for each row until the user stops adding new item in order).somebody tell me about the template field gridview.but what's the code?
plz sombdy tell me.
thnx & regds,
sahaj




Responses

Posted by: Abhi2434 on: 2/20/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
This is no big deal...

When you require to fill using the Database use :

drpDwnObj.DataSource = listObj;
drpDwnObj.DataTextField = "Col1";
drpDwnObj.DataValueField = "Col2";
drpDwnObj.DataBind();

Everytime the lstObj is updated, go through the steps, and your dropdown will be updated.

:)

www.abhisheksur.com

Sahaj.seema, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nishithraj on: 2/24/2010 [Member] Bronze

Up
0
Down
Check

http://www.daniweb.com/forums/thread127468.html

Mark this as answer, if it is.....

With regards
Nishithraj Narayanan

Sahaj.seema, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response