Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Using Tasks on DataGrid Controls on WinForms

$
0
0

h

Hi,

Recently, i am using tasks on datagrid controls and In my application there are almost 20 datagrid in different forms.

I do this because sometimes data retrieving takes a long time over database and that's application screens freezes.

Here is my example binding;

string getAlert ="select * from testtable";DataTable dtAlert =newDataTable();OracleDataAdapter odaAlert =newOracleDataAdapter();publicvoid getAlertGrid(){
dtAlert.Clear();
odaAlert =newOracleDataAdapter(getAlert, oradb);
odaAlert.Fill(dtAlert);
ugAlert.DataSource= dtAlert;
ugAlert.DataBind();}

I would like to know what's your thoughts on it ? Is it safe or not ?


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>