wrote:
strsql="select * from subjects where sch_name='"& lblschool.text &"'"
Your database will perform better if you use numeric ids for your searches. Your school names would ideally be in a table, with ids, which you use elsewhere. This also means you don't duplicate data, and it's easy to change a school name.
I see you're using a label here, but if you build SQL like this where the user can enter the text, your database will not be secure, and can easily be deleted, or corrupted. This is called SQL Injection.
I am not sure why you posted your code that works. I can see it will work. What is your code that is broken ? All you need to do, is set your datasource to be the table from your SQL request. I am not sure if a datagrid generates columns by default. A gridview does. If a datagrid does not, you may well have to define templates in your ASPX to define how the data will be shown, which is analagous to your setting the text and value field in your drop list. As a grid shows many values, there is no value and text field, there's a template in the aspx that defines all of the data to show, and how it is shown. Of course, you still need to databind as well.
I would suggest you buy a basic ASP.NET book and read it, as they all cover this stuff in depth.