Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Dropdown list select index change problem

Reply
Thread Tools

Dropdown list select index change problem

 
 
Thanigaimani thirumalai
Guest
Posts: n/a
 
      11-13-2007

Hi

i can explain with example in simple format

my page have two type categories of employee details

1. Client

2.Customer


Client category have only one employee details. employee name as
AsleyKumar.ok

Customer category have eight employee details .employee names are
Benjamin,catreena,david,Harinath,Ramnath,Thanigaim ani,veena,Xavier.

My dropdown list having 3 types of category

1 . All ( Client and Customer)

2.Client

3. Customer.

i select All category, gridview binding both data for client and
customer category employee details.Every row with checkbox

Now i checked first four employee details employee names are
AsleyKumar,Benjamin,catreena,david..

i put these checkbox values in arraylist then put in viewstate..

whenever i select dropdownlist select index change these checkbox
values are not coming properly.if not post back na checkbox values are
getting properly,incase page is post back checkbox values are coming not
properly..

see my code behind

Public Sub getselected()
Dim arrayListContactGroup As New ArrayList

If ViewState("ArrayList") IsNot Nothing Then

arrayListContactGroup = CType(ViewState("ArrayList"), ArrayList)
ViewState.Remove("ArrayList")

End If

For Each row As GridViewRow In gridview1.Rows
Dim chkselectcontacts As CheckBox = CType(row.FindControl("chksel"),
CheckBox)

Dim arraylistlabel As Label = CType(row.FindControl("contid"), Label)
If chkselectcontacts.Checked Then

If Not arrayListContactGroup.Contains(arraylistlabel.Text ) Then

arrayListContactGroup.Add(arraylistlabel.Text)

End If

Else

If arrayListContactGroup.Contains(arraylistlabel.Text ) Then

arrayListContactGroup.Remove(arraylistlabel.Text)

End If

End If

Next

ViewState("ArrayList") = arrayListContactGroup
End Sub

Whats problem in my code..tel me

if u know any articles same as tel me ..

Advance wishes.


Thanigaimani.thirumalai

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dropdown box change index to matching .nLL Javascript 1 04-27-2008 08:40 AM
sorting index-15, index-9, index-110 "the human way"? Tomasz Chmielewski Perl Misc 4 03-04-2008 05:01 PM
List Util insert_at(index, value), delete_at(index) ngoc Perl Misc 5 05-11-2006 12:31 PM
<select tag> - how do I set the current index in a multiple select box? Ferd Berfel Javascript 4 04-06-2004 06:53 PM
Select dropdown box bleeds into Javascript dropdown menu Mike HTML 1 12-18-2003 09:49 PM



Advertisments