Click here to Skip to main content
13,094,732 members (68,369 online)
Click here to Skip to main content


Posted 5 Nov 2012

How can i fix that ?

, 6 Nov 2012
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..}



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


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


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

You may also be interested in...

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