473,385 Members | 1,409 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.

IBindingList and Datagrid Refresh Issue

I have a DataGrid bound to a custom collection that
implements IBindingList. The collection returns true for
AllowNew. The collections AddNew() method creates a new
object, adds it to the collection and returns the new
object.

The SupportsChangeNotification property returns true and
the appropriate ListChangedEventArgs are used in the
ListChanged event. All fine no problem. However:

If there are items in the collection, and therefore items
in the DataGrid, when the AddNew() method of the
collection is called, all is well and the datagrid adds a
new blank row bound to the new object. Super.

If however the collection is empty, and therefore no rows
in the DataGrid, when AddNew() method of the collection is
called, the DataGrid responds by adding a new row, but
with no columns. Just a tiny bit of white on the left hand
side of the area where the columns are supposed to be.

I have tried calling Invalidate and refresh on the Grid
but this has not helped.

Any help would me most appreciated.

Many thanks

Phillip.
Jul 21 '05 #1
0 1160

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phillip | last post by:
I have a DataGrid bound to a custom collection that implements IBindingList. The collection returns true for AllowNew. The collections AddNew() method creates a new object, adds it to the...
3
by: Cary Linkfield | last post by:
I have created a custom class inheriting CollectionBase and implementing IBindingList. I am binding the list to a datagrid. I would like to have a property on the class that works like the...
0
by: David Elliott | last post by:
I have a Collection that inherits from CollectionBase and Implements IBindingList which I have bound to a DataGrid. So far everything works fine. However, I am missing one piece to the...
1
by: alex n | last post by:
hello. i'm trying to implement IBindingList to wrap DataTable (like DataView) with hierarchy capabilities and bind it to DataGrid. The problem is i don't know yet all the stuff i need to know....
0
by: Jongmin | last post by:
I met a problem when implementing IBindingList interface. I made CustomerList class, copied from MSDN, to implement CollectionBase and IBindingList. My problem took place after setting...
5
by: Matthew Woods | last post by:
bool A = Is this the right place to ask this question? if (A) { Where can i find a good example of an ArrayList bound to a datagrid that automatically updates the grid when the public data...
3
by: Matthew Woods | last post by:
Hi, is there any way to format and order the columns displayed in a datagrid bound to a class that inherits from IBindingList? i have used DataGridTableStyle and added DataGridTextBoxColumns to it...
0
by: d pak | last post by:
Here is a snippit which replicates my issue. I have a datagrid which contains an input textbox on each row, binded on the serverside. However it seems that when I perform a postback to refresh teh...
2
by: simon | last post by:
hello, new to vb.net, have a few questions about DataGrid. I have a dataGrid that is working pulling a dataset back from a stored proc and binding to the datagrid for display the datagrid's...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.