c# - How to Refresh gridview contents -


i have 2 gridviews, gridview1 , gridview2.

i want refresh gridview2 on mouseclick event of gridview1. when click on gridview1, gridview2 loads data based on primary key. example, if select first row (id 1) in gridview1, corresponding data loads in gridview2, if select row 2 (id 2) gridview2 loads id 2 data , removes id 1 data.

here code have far, didn't work. loads data gridview2 many times many times select row in gridview1. please help.

private void gridview1_mouseclick(object sender, mouseeventargs e)     {         sendvalues();         gridview2.datasource = null;         gridview2.rows.clear();         gridview2.columns.clear();         gridview2.refresh();          posting_log();     } 


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -