473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

DataGridView.SelectAll() doesn't select all.

1
Hi everyone;

I have a strange problem with a DataGridView bound to a BindingList. The grid is populated asynchronously by a thread which, when it completes, refreshes the grid by doing an Invoke on it, settings its DataSource to the new BindingList.

This works find and the list is clearly populated. However, when I press my Select All button, only the first element in the grid is populated. If I invoke SelectAll twice in a row, it works. Huh?

I've tried breaking just before the SelectAll invocation, and the grid's rowcount does reflect the new datasource. However, after the SelectAll invocation, the SelectedRows count is 1 and not the number of elements in the grid.

I'm at a loss to explain this. Has anyone here seen anything like this?

Thanks in advance.
Apr 7 '08 #1
1 2447
I think u have forget to call the method bindgrid() after this statement

DataGridView.selectall()
bindgrid() // Method that bind the data

since its necessary for datagridview to bind data in each server call. Try this ...
Apr 7 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: stevenhaochen | last post by:
I add a user control (a simple textbox control) to customize datagridview column to test how to add user control to datagridview. I found a weired behavior. I can not input "q", "!", "#". But I...
0
by: =?Utf-8?B?UmljaA==?= | last post by:
In a datagridview, the first column header cell is columnHeader(0), which is immediately to the right of the Top Left Corner Select All cell. And the first RowHeader cell is RowHeaderCell(0) which...
9
by: trint | last post by:
How can I retrieve all of the data from a datagridview? Any help is appreciated. Thanks, Trint
0
by: Andrus | last post by:
I tried to use modeless picklist for DataGridView custom ComboBoxColumn without success. Steps to reproduce issue: 1. Run code 2. Enter some character 3. Press Tab Observed:
1
nirmalsingh
by: nirmalsingh | last post by:
hai all i have selected datagridview by datagridview.selectAll(); now i want to deselect datagridview how to do this? with Cheers Nirmal
18
by: Andrus | last post by:
Marc, Thank you very much. I have issue on implementing add row properly using this. User presses down arrow in last row in grid starting adding new row. Then user changes its mind desiding...
6
by: Simon Harvey | last post by:
Hi all, I'm really hoping someone can help me with this as it's causing me some serious problems. I have a Windows Forms application using the gridview control. When the user selects a row,...
1
by: NvrBst | last post by:
I have a ListView (VirtualMode) and I want to implement a SelectAll. --1st Atempt-- The standard for loop takes way to long: "for(int i = 0; i < listView1.VirtualListSize - 1; i++)...
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.