GetSelectedIndex Datagrid? Dropdownlist

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2004
Posts: 6
Reputation: macsgirl is an unknown quantity at this point 
Solved Threads: 0
macsgirl macsgirl is offline Offline
Newbie Poster

GetSelectedIndex Datagrid? Dropdownlist

 
0
  #1
Sep 20th, 2004
Edit mode the index of a dropdownlist does not start at the right value.
I have having problem when in edit mode the dropdownlist the index does not
start at the right value. I use Inner Join for my two dropdownlists.



tbl_Users_StoreID
StoreID Store
1 Name1
2 Name2

tbl_Users_AccessLevelD
AccessLevelD AccessLevel
1 Administration
2 Calling Card Manager
3 Cashier

These StoreID, AccessLevelID are in my

tbl_Users table.
UserID
StoreID
AccessID
UserName
FullName

Now suppose for UserID =1
StoredID = 2

But when I am in editmode the Store is starting
at Name1 instead of Name2.
It is saved in the Database as StoredID =2 which corresponds to Name2.
Please help me.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 898
Reputation: Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light 
Solved Threads: 28
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend

Re: GetSelectedIndex Datagrid? Dropdownlist

 
0
  #2
Sep 24th, 2004
Is the databind to the datagrid in an IsPostBack conditional? Are you executing it each time?

It sounds like when the page gets posted back, your data is being rebound and resetting.
-Ryan Hoffman

.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1
Reputation: gemisphere is an unknown quantity at this point 
Solved Threads: 0
gemisphere gemisphere is offline Offline
Newbie Poster

Re: GetSelectedIndex Datagrid? Dropdownlist

 
0
  #3
Mar 29th, 2007
I had the same problem. This worked for me:

http://www.thescripts.com/forum/thread305581.html
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC