Hi, i need help... i have a windows application, in which there a datagrid, and i have to show details in the grid in such a way, that when i click "Show Details"(which i can get as a row in the datagrid), the grid expands showingme more rows which get inserted where i clicked on show details... Similarly, when i click 'Hide Details", the rows are not shown...
Does any one has code for this funnctionality of datagrid? plz do help me... thanx, Deepa
5 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
I saved dohop.com in my local system and found that they r using javascript . Of u want u can also use the same method . But the values are not from database . Cheers, Raghu
plz check website :www.dohop.com, then perform some search ..u'll get recordswith hidden details..then when u click on 'Show Details" it expands
i have datatable with all details at first, then i need to manipulate it in such a way in the datagrid which will make it look like in the website :-/ plz check it...plz help me..its urgent...im confused
deepaPosted Jul 26, 2006, 8:11 AM
You can mail me at '[email protected]'
Thanks lots :)
senthil kannanPosted Jul 25, 2006, 3:49 AM
i searched
in net but could not find out a solution for this so i came up with my own application. as i couldnt post my whole appln here i can send u thru mailraghuPosted Jul 25, 2006, 12:28 AM
Cheers,
Raghu
deepaPosted Jul 24, 2006, 6:26 AM
plz check website :www.dohop.com, then perform some search ..u'll get recordswith hidden details..then when u click on 'Show Details" it expands
i have datatable with all details at first, then i need to manipulate it in such a way in the datagrid which will make it look like in the website :-/
plz check it...plz help me..its urgent...im confused
thanks a lot...
Deepa
senthil kannanPosted Jul 24, 2006, 5:50 AM
if u want the datagrid to show nothing just set its datasource to null.
Here is the sample code,
private
void Execute(string qry){
OleDbConnection oconn=
new OleDbConnection(Connstr);OleDbCommand ocomm=
new OleDbCommand(Query,oconn);OleDbDataAdapter oadap=
new OleDbDataAdapter();oadap.SelectCommand=ocomm;
ds.Clear();
oadap.Fill(ds,"tblSTU");
}
private void btnShow_Click(object sender, System.EventArgs e){
Query = "SELECT * FROM tblSTU";
Execute(Query);
dataGrid1.DataSource = ds.Tables[0];
}
private void btnHide_Click(object sender, System.EventArgs e){
dataGrid1.DataSource =
null;}
Hope this helps u.