Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2007

Tip: Looking for answers? Try searching our database.

DataGridView and Binding Source

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mahesh Nimbalkar - 29 Jul 2007 23:56 GMT
Hi,

When I set DataGridView's DataSource property to Binding Source,
DataGridView becomes invisible. If I comment that line, DataGridView is
visible again.

I am using another thread to get data from server and then using
control.invoke on ui thread to set DataGridView's DataSource property to data
received from server which is  Binding Source object.

Any idea what could be the reason?

Signature

Thanks,
Mahesh

Mahesh Nimbalkar - 30 Jul 2007 02:06 GMT
Sorry, invisible means it is still there and I can see Grid but it is grayed
out and it is not showing column names which are created at design time.

When I comment set datasource line, columns are shown even if data is not
there in Grid.

Signature

Thanks,
Mahesh

> Hi,
>
[quoted text clipped - 7 lines]
>
> Any idea what could be the reason?
ClayB - 30 Jul 2007 09:44 GMT
Some things to check:

At design time, did you  properly set the DisplayPropertyName in the
DataGridView.Columns collection so that the DisplayPropertyName picks
outs the column in your data source?

If you inspect the BindingSource at the point you are setting it to
the DataGridView's Datasource property, does it contain the
information you expect (ie, the columns you set in the
DisplayPropertyName and that the rows hold valid data)

Is the DataGridView enabled, and is it not ReadOnly at the point you
set the DataSource?

====================
Clay Burch
Syncfusion, Inc.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.