944,144 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 8671
  • ASP.NET RSS
Sep 20th, 2004
0

GetSelectedIndex Datagrid? Dropdownlist

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
macsgirl is offline Offline
6 posts
since Sep 2004
Sep 24th, 2004
0

Re: GetSelectedIndex Datagrid? Dropdownlist

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.
Moderator
Reputation Points: 322
Solved Threads: 28
The C# Man, Myth, Legend
Tekmaven is offline Offline
914 posts
since Feb 2002
Mar 29th, 2007
0

Re: GetSelectedIndex Datagrid? Dropdownlist

I had the same problem. This worked for me:

http://www.thescripts.com/forum/thread305581.html
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gemisphere is offline Offline
1 posts
since Mar 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Database Connection in Visual Studio 2005
Next Thread in ASP.NET Forum Timeline: How to store data in data grid to database by single mouse click in Asp.net





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC