471,082 Members | 748 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,082 software developers and data experts.

vb.net: How to use dropdownlist to resort datagrid

hello, everyone

im a newbie to asp.net, getting nut with just a simple stuff
please give me some direction
How to use dropdownlist when user select one of the method in dropdownlist
The fields inside dropdownlist are personnel_number, firstname,lastname,email.position_title

I have a datagrid that view out all my data when:
---1st time page load, user will key in firstname or lastname then result will be display in the datagrid
---2nd time,user select oneof the person in datagrid then datagrid refresh and view new data

everytime datagrid refresh and view data where default value of sorting is from DropDownList1.SelectedValue.ToString,default value is personnel_number

My question is
I want to refresh datagrid without changing data, just want to change the method of sorting
Hence, I should modify/ write my coding in DropDownList1_SelectedIndexChanged
unfortunately , I don't know how to write the coding.
att: I don't want lose my data once the datagrid refresh and what I want just is the different of sorting and my sql statement for 1st time and 2nd time are different
Please teach me..
Thanks
Aug 6 '08 #1
1 1648
r035198x
13,262 8TB
You don't need a dropdown list to implement sorting on a datagrid. See this thread.
Aug 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Chris | last post: by
4 posts views Thread by Ziv Riezman | last post: by
2 posts views Thread by Shiju Poyilil | last post: by
1 post views Thread by George Durzi | last post: by
3 posts views Thread by Tim::.. | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.