rush.svadi:if my select query returns multiple rows from datatable then how can i show it back to the grid? Is it possible?
use SqlDataAdapter Class Fill() method to call the query... It will returns a dataset or datatable. Then you can bind that datatable/dataset to gridview..
SqlConnection myConn = new SqlConnection (
"your connection string" );
SqlDataAdapter myAdapter = new SqlDataAdapter ( "your query", myConn );
DataSet myData = new DataSet ( );
myAdapter.Fill ( myData);
Gridview1.DataSource = myData;
Gridview1.DataBind();
rush.svadi:but that is not the actual sceatio i am working in.
From my understanding of the link that u specified in first post, I think its the scenario of 2 dropdownlists and a 1 gridview.
2nd dropdownlist depends on 1st dropdownlist..
and gridview depends on 2nd dropdownlist...
I think the scenario i explained there is same.. the difference is i used sqldatasources(without writing code.) now by using sqldataadapter's fill() method u can do it without using sqldatasource controls....
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him forever.