Click here to Skip to main content
15,914,160 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Now I get the access denied exception .... Pin
Slow Learner15-May-07 3:54
Slow Learner15-May-07 3:54 
GeneralRe: Now I get the access denied exception .... Pin
daisylh15-May-07 14:32
daisylh15-May-07 14:32 
Questionlogin control + asp.net 2.0 + c# Pin
ritu432114-May-07 3:38
ritu432114-May-07 3:38 
AnswerRe: login control + asp.net 2.0 + c# Pin
Not Active14-May-07 4:51
mentorNot Active14-May-07 4:51 
GeneralRe: login control + asp.net 2.0 + c# Pin
ritu432114-May-07 19:56
ritu432114-May-07 19:56 
QuestionSearch By Date Pin
Khan.Bangash14-May-07 3:34
Khan.Bangash14-May-07 3:34 
AnswerRe: Search By Date Pin
kubben14-May-07 3:51
kubben14-May-07 3:51 
QuestionDatagrid Dropdown list - setting initial value problems Pin
robw188814-May-07 3:33
robw188814-May-07 3:33 
Hi

I'm using the following code to try and retrieve the current value of a database field to set that as the initial value of a dropdownlist in an editable datagrid.

Function GetSelectedIndex(StatusID As String) As Integer
        'Loop through the DataSet DS
        Dim iLoop As Integer
        Dim DT As DataTable = DS.Tables("Statusds")
        For iLoop = 0 To DT.Rows.Count - 1
            If Int32.Parse(StatusID) = Int32.Parse(DT.Rows(iLoop)("StatusID")) Then
                Return iLoop
            End If
        Next iLoop
    End Function


I get the following error - 'IndexOutOfRangeException: StatusID'

when I remove the selectedindex function call I can use the list to update the database so seems to be a problem with my coding to retrieve the current value.

The table I'm using has StatusID as the primary key field and 'Status' as the field I'm using for the ddl.

any help would be much appreciated!

Thanks


Rob

AnswerRe: Datagrid Dropdown list - setting initial value problems Pin
kubben14-May-07 3:54
kubben14-May-07 3:54 
GeneralRe: Datagrid Dropdown list - setting initial value problems Pin
robw188814-May-07 4:09
robw188814-May-07 4:09 
GeneralRe: Datagrid Dropdown list - setting initial value problems Pin
kubben14-May-07 4:34
kubben14-May-07 4:34 
AnswerRe: Datagrid Dropdown list - setting initial value problems Pin
kapiljadhav14-May-07 21:44
kapiljadhav14-May-07 21:44 
GeneralRe: Datagrid Dropdown list - setting initial value problems Pin
robw188815-May-07 4:50
robw188815-May-07 4:50 
QuestionCR 9.2 export error Pin
samerh14-May-07 3:23
samerh14-May-07 3:23 
QuestionTwo instances of the same wizard on 1 page Pin
digsy_14-May-07 3:12
digsy_14-May-07 3:12 
QuestionIssues in loading images in Word Automation Pin
Sankara Narayana14-May-07 3:12
Sankara Narayana14-May-07 3:12 
QuestionHow to get large image when clicked on Thumbnail image Pin
honeysip14-May-07 1:30
honeysip14-May-07 1:30 
AnswerRe: How to get large image when clicked on Thumbnail image Pin
enjoycrack14-May-07 1:35
enjoycrack14-May-07 1:35 
AnswerRe: How to get large image when clicked on Thumbnail image Pin
sulabh202014-May-07 1:39
sulabh202014-May-07 1:39 
Questionproblem in imagebutton? Pin
sulabh202014-May-07 1:19
sulabh202014-May-07 1:19 
AnswerRe: problem in imagebutton? Pin
enjoycrack14-May-07 1:33
enjoycrack14-May-07 1:33 
GeneralRe: problem in imagebutton? Pin
sulabh202014-May-07 1:41
sulabh202014-May-07 1:41 
GeneralRe: problem in imagebutton? Pin
enjoycrack16-May-07 23:49
enjoycrack16-May-07 23:49 
QuestionASP.NET COOKIE Pin
Socheat.Net14-May-07 1:16
Socheat.Net14-May-07 1:16 
AnswerRe: ASP.NET COOKIE Pin
enjoycrack14-May-07 1:34
enjoycrack14-May-07 1:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.