| | |
GetSelectedIndex Datagrid? Dropdownlist
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2004
Posts: 6
Reputation:
Solved Threads: 0
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.
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.
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.
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.
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
![]() |
Similar Threads
- Sqldatasource with dropdownlist (ASP.NET)
- AccessDataSource (in 2.0) (ASP.NET)
- DataGrid: Edit mode, the index of a dropdownlist does not start at the right Value (ASP.NET)
- prblem:use a control in datagrid (ASP.NET)
- GetSelectedIndex Datagrid? Dropdownlist (C#)
- How do I save an index to a particular index of a dropdownlist in a datagrid. (C#)
Other Threads in the ASP.NET Forum
- Previous Thread: Database Connection in Visual Studio 2005
- Next Thread: How to store data in data grid to database by single mouse click in Asp.net
| Thread Tools | Search this Thread |
.net 3.5 activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer button c# cac checkbox class commonfunctions countryselector dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash formatdecimal formview gridview gudi iframe iis javascript list listbox microsoft mono mouse mssql multistepregistration nameisnotdeclared news novell numerical opera panelmasterpagebuttoncontrols problem radio redirect registration relationaldatabases reportemail rotatepage schoolproject search security sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos vista visualstudio vs2008 web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers





