----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: scienty77 Message 6 in Discussion Hello Preethi, Try something like this. This is a working peice from my project. ' ***************************************************************************************************************** ' Function : fnGetIndex ' Purpose : to set focus to the corresponding value in the combo ' Author(s) : Raghunandan H.J ' Start Date : 28-July-2003, ' End Date : ' Modified On : ' Modified By : ' Comments : Output - boolean ' ***************************************************************************************************************** Private Function fnGetIndex(ByVal TargetCombo As DropDownList, ByVal StrTagetValue As Integer, Optional ByVal BlnString As Boolean = False) As Boolean Try Dim IntCounter As Integer = 0 Dim blnFlag As Boolean = False If BlnString = False Then For IntCounter = 0 To TargetCombo.Items.Count - 1 TargetCombo.SelectedIndex = IntCounter If TargetCombo.SelectedItem.Value = StrTagetValue Then Exit Function Else ' End If Next ElseIf BlnString = True Then If TargetCombo.Items.Count <= 1 Then Exit Function For IntCounter = 1 To TargetCombo.Items.Count - 1 TargetCombo.SelectedIndex = IntCounter If TargetCombo.SelectedItem.Text = StrTagetValue Then Exit Function Else ' End If Next End If If blnFlag = False Then TargetCombo.SelectedIndex = 0 Catch ExfnGetIndex As Exception ' End Try End Function But before passing the combo find that using drigitem.findcontrol method regards raghu ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/BDOTNET/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
