dropdownlist problem

Posted by Suneel161 under Regular Expressions on 3/18/2010 | Views : 1309 | Status : [Member] | Replies : 4
hii

in my form one dropdownlist(statename) and one gridview. cityname,statename in gridview and when i select statename in dropdownlist then display allcitynames with state in gridview...how to solv this problem...




Responses

Posted by: SurajRane on: 3/18/2010 [Member] Starter

Up
0
Down
hi,
am not getting exactly what you want to say..

explain in detail ..

do you mean you have a Dropdown list and a gridview on page.
you want to show citys and states in gridview
but you want to filter gridview with selected satename in dropdown

explain more

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gttejas on: 3/18/2010 [Member] Starter

Up
0
Down
Hi,

Do you mean, you want to filter grid records by statename selected from dropdown list ?


if yes, then

1) make dropdownlist autopostback property to true.

2) write your query logic in selectedindexchanged event of the dropdownlist

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mkyal on: 3/18/2010 [Member] Starter

Up
0
Down
fist you add event in dropdown a selected indexchange and drop down property of autopsts back is true and

then write you grid bind code in select indexchange according to stata

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Syedshakeer on: 3/18/2010 [Member] Starter

Up
0
Down
Hi,
check the follwoing link
http://www.studentacad.com/post/2010/03/01/how-to-Access-dropdownlist-inside-the-gridview.aspx

Syed Shakeer Hussain

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response