Click here to Skip to main content
11,411,241 members (65,259 online)
Click here to Skip to main content
Add your own
alternative version

How can i fix that ?

, 6 Nov 2012 CPOL
I suggest checking for the possibility of gdCompany.CurrentRow.Cells(15).Value being null before you try to cast it to a byte array and try to populate the pictureBox.Update:if(gdCompany.CurrentRow.Cells(15).Value != null){//your code here..}

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 7-Nov-12 3:26 Available jim lahey
Showed OP how to check for null. Really.
1 No 6-Nov-12 4:16 Available jim lahey

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

jim lahey
Software Developer (Senior)
United Kingdom United Kingdom
First batch file in 1987

Messed around with the Bullfrog C++ Libraries for Syndicate in 1994

Web Developer since 2000

.net Developer since 2001

MCTS: Microsoft® .NET Framework 2.0 - Web-based Client Development

MCTS: Web Applications Development with Microsoft .NET Framework 4

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150414.5 | Last Updated 7 Nov 2012
Article Copyright 2012 by jim lahey
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid