.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Showing thousands of rows in datagrid, need cursor to wait while loading rows

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :WPF
I´m creating DataGrid columns dynamicly in C# and loading data into a list at the same time. Cursor is waiting at the same time. Now, after columns are created and data is loaded into a list. I set the myDataGrid.Itemssouce = mylist; Cursor=Curosrs.Arrow; Andafter that, I set the Cursor to arrow again as you can see. But when the list contains thousands of rows it takes about 5-10 seconds for the datagrid to show the rows. Its ok but I need the cursor to be in waiting stage allso while data is not shown but the cursor is not waiting, its arrow. Any suggestions, please?

View Complete Post

More Related Resource Links

WPF Datagrid SelectionChanged event is triggering Multiple times while loading the rows.



When i use DataGridComboBoxColumn in my WPF DataGrid, the DataGrid SelectionChanged event is triggering multiple times based on the number of rows while loading the rows in the WPF DataGrid.

How can i stop this? Because of this I am facing Performance issue.



Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This will help other members to find the solution easily.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Cutting Edge: Moving DataGrid Rows Up and Down


Imagine opening your Inbox one morning and finding a message that reads "Dear Mr. DataGrid, I urgently need an ASP.NET DataGrid that lets my users move rows on the client. You're my last hope. Will you please help me?"

Dino Esposito

MSDN Magazine March 2005

Showing the rows of a gridview as hyperlinks


Hi all, 
In the following code i have to continuing showing the rows of the gridview as links. For example: the user will click on a customer and will see more detailed information. Please suggest how to continue with an example. Thank you

    protected void Button1_Click(object sender, EventArgs e)
        //List<Customer> customersresult = new List<Customer>(); does not match the type here
        CustomerWebServiceClient.Customer[] cust;
        CustomerWebServiceClient.CustomerWebService client = new CustomerWebServiceClient.CustomerWebService();
        cust = client.GetCustomerContract(TextBox1.Text); //coming across now..
        //if (cust.va) validate if there is data
        GridView1.DataSource = cust;

// this is showing the gridview with the data coming. What would be next steps to show the rows as hyperlinks.

Thank you

How to have all rows of a datagrid editable (ASP.NET 1.1)

HelloI have a datagrid and I would like to know if there is a way to make all rows editable, currently now I have the user selecting a checkbox on the leftmost column that makes the row editable (using the EditItemIndex property). Thanks, 

ASP.NET Events and Pageload not firing when Datagrid containing large number of rows of data

Hi All, I have a datagrid in aspx page.Inside of datagrid i am using around 15 controls such as Button,dropdownlist and text box controls.Once the datagrid binds then the events in the aspx page not firing.Issue occured when the number of rowsgreater than 500.The number of rows less then its works fine.If anybody knows the solution please let me know."Platform i am working on ASP.NET1.1"Regards Hareesh

GridView Pager not showing proper number of rows

I have created an out-of-the-box  (default everything) ASP.NET Dynamic Data Entities Web Site using VS2010, C# and the .NET Framework 4. Created an ADO.NET Entity Data Model based off a MS SQL 2008 R2 database and registered that EF data model for my dynamic data. Everything works great except for the one change I would like to make. By default, the GridViewPager.ascx file provides the values 5, 10, 15 and 20 in the dropdown for GridView's "Results per page" option. I would like to change that to 10, 20, 30 and 40 - with 40 being the default selected option. I went to the code behind file and modified it to have the values I am wanting. Those values now show in the dropdown, and work if I select them. Problem: when the page is first rendered only 10 rows will show. How can I change this? Any help would be greatly appreciated.   Thanks

How to sum a column in a datagrid for just the multiselected rows?

I have a WPF4 datagrid, populated via linq to sql, which has some numeric fields. How do I sum the value of one of these fields for just the selected rows? (multiselect is turned on)  

Adding new rows to Datagrid with a Combobox column generate "two-way binding requires path or xpath"



    I have datagrid control with a template combobox column like:

 <DataGridTemplateColumn Header="Fault code" Width="75">
                                    <TextBlock Text="{Binding FaultCode1}" />

iterate throw rows of Template Column in Datagrid



I am using WPF DataGrid (VS 2008). i am using Template column with a button in it i want to change the content of the button(Caption) when it is clicked .i am doing it in its click event ,but it  changes the content of only the button clicked(only one row). i want to change the content of button in all rows.

how can access the button instance of all rows in this template column.



Iterate the rows in the datagrid and compare it with the systemclock



How would I iterate the rows in the datagrid? The 4th column contains the time, I would like to compare it with the systemclock and enter "ACTIVE" in the 5th column if the time value in the 4th column is equal to the system clock?

I tried FOR EACH.. but I can't get it right.. Please help.

WinForms: Filling Rows in DataGrid Using Threading and yet gridcontrol should be responsive.


WinForms Application. C#, .NET 3.5.


I have a function with searchs data into a non RDBMS Source, collects data and Inserts each found records into DataSet and finally it returns DataSet to main module.  The main module binds returned Dataset to WinForms Grid Control.  When user click on any row, it should display details of selected row.

The search takes quite long time and hence i want to use threading such that as the function find the data it returns the data to main module and main module adds the data into a DataSet object which will be already binded to Grid Control. The Grid control should automatically refresh itself as he finds new data in its underlying databset.  While search is going on the Grid control should remain responseive so that when user clicks on any row, I can call anothr function to retrieve details of the selected row.

I tried using BackgroundWorker still the UI freezes. I observe the grid control does not refresh itself and is non-responsive.

Please guide on how to achieve this and I would really like if there is any sample on similar lines with GridControl.







SSIS data flow task not loading all rows from sybase server



Using a data flow task I am trying to load data from a table in sybase server to sql server. There are approx 10000 rows in the sybase table, however for some reason which I am not able to find out, at random certain no of rows are getting inserted. e.g. in one run 800 rows then 200 rows etc.

Can somebody please guide me on this?

Datagrid Read Only Rows


Hi All, I wonder if I could pick your brains.

I have a wpf datagrid and want to make ROWS disabled/read only if a certain value is in the row. i.e. Date Approved present therefore row cannot be edited.

Is that possible? Many thanks Scott

programmatically add/edit datagrid rows



I'm new to WPF, and I'd like to add rows with data at runtime, and edit data manually in a DataGrid, just as it was possible to do with the WinForms DataGridView.

WPF DataGrid control is really awesome, but lacks some simplicity and generality of WinForms, like unbound data...

Can someone please give me a hint?



TSQL cell balance from previous non null row table contains 20mill + rows so cursor not practical


I have a requirement to carry a running total forward in a table containing multiple periods and accounts, the table extract below shows an example

for row_num 5 the RunningTotal is -32.98, I would like to UPDATE the value of row_nums 6 through 9 to be -32.98 as they are at present NULL, the row_num 9 has a RunningTotal value of -32.69 I would like to UPDATE all preceding NULL values with -32.69 (10 through 13), the pattern being NULL value to be updated with populated value untill new populated value encountered 

I have set a field to be row_num using ROW_NUMBER () based upon TenancyNumber and WeeklyPeriod, a cursor is not practical in this instance as this table has rapid growth and presently has population of 20 mill + rows


rttdrtcw_id TenancyNumber WeeklyPeriod Tran_Year Tran_Week Receipt Debit Credit Adjustment row_num RunningTotal

18947           111                 200005        2000            5              -247.4   247.69 0     0            

Drag & Drop expander group / rows in datagrid



I am wondering how I can find some help, sample about reordering datagrid rows by using drag & drop feature.

In my case, I have a grid (.NET 3.5 gridview in a listview or WPF Toolkit Datagrid) bound to a CollectionViewSource with 2 propertyGroupDescriptions (Category/Sub category)

I need to be able to reorder rows either by using drag & drop on rows or on group descriptions (represented by expanders)

I've past my day with my friend google to find some info, but without any success...:(

Someone have already done this ?

By advance, thank you for your help


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend