c# - Displaying data on a datagrid too slow -
I have the DataGrade (WPF / C #), which is pulling from a large field into two fields. However, It takes a very long time to render on the screen and I want to know that there is a fast way?
Private Zero SetupDataGrid () {try {_con.Open ()} Var com = New MySqlCommand ("Select Record ID", `TLBTist by Company Name`; all)" { Connection = _con, commandtip = commandtip.text}; var dt = new dataTable (); var sdt = new MySqlDataAdapter (com); sdt.Fill (DT); DataGrade activitivity.datcontext = dt;} hold (exception before) {message Show the box (ex.ToString ());} _con.Close (); You can apply paging in the grid, and only remove the records from the database. Another way would be to remove data, cache, and then access the cache - but in this case it will slow down for the first time. If there is a problem removing large data sets , Then I can only remove items for the current page.
With MySQL you can do this in the following approach
SELECT * FROM [TABLE] LIMIT 5,10;
Comments
Post a Comment