Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Reply
read dropdownlist value from GridView?
Old 05-06-2010, 04:54 AM read dropdownlist value from GridView?
Experienced Talker

Posts: 37
Name: ahmad
Trades: 0
Dears,
How I can read the value of dropdownlist from grid view
for label column i read it as below
GridView1.Rows[e.RowIndex].Cells[1].Text.ToString();
but for the column have drop down list i cant read use this way
please help me
Thanks
EngAhmad is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-06-2010, 06:13 AM Re: read dropdownlist value from GridView?
Experienced Talker

Posts: 37
Name: ahmad
Trades: 0
i find the solution but when enter the value of dropdownlist to data base always take first value at index zero
EngAhmad is offline
Reply With Quote
View Public Profile
 
Old 07-26-2010, 10:19 PM Re: read dropdownlist value from GridView?
Super Talker

Posts: 112
Trades: 0
Do you have preset values assigned in your database or are do you have them hardcoded within the control property?
blogdog is offline
Reply With Quote
View Public Profile
 
Old 07-27-2010, 07:39 AM Re: read dropdownlist value from GridView?
Extreme Talker

Posts: 246
Trades: 0
DropDownList ddl = GridView1.Rows[e.RowIndex].FindControl("DropDownListID") as DropDownList;

if(ddl !+ null)
{
Do stuff...
}

this will give you the dropdownlist you are looking for the you can grab the value, the text the ... whatever you need.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 08-28-2010, 02:26 AM Re: read dropdownlist value from GridView?
Banned

Posts: 11
Name: Raj singla
Trades: 0
thanks you for this infromation
sbglobal79 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to read dropdownlist value from GridView?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20862 seconds with 12 queries