We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DataboundGrid PushButton Cell & Visual Studio 2003

Hi I have a simple form on which I have placed a DGB. Using the designer I have made one of these columns a "pushbutton". When I close the form I am editing then go back into it. I get a build error appear on the VS task list saying: "Object reference not set to an instance of an object.". If I remove the pushbutton column from my grid the error disappears. From my code I dont see what I have done wrong as all I used was the designer. I attach the source code for the form in question. Mark markdev_8449.zip

7 Replies

AD Administrator Syncfusion Team July 23, 2004 11:57 AM UTC

Update: I think I have found the problem. I didnt specify a mapping name for the column. The reason I didnt specify one is becuase I just wanted a column with a button in it that uses a value from one of the other columns, so I didnt see a reason to enter a mapping name. Just out of interest is there a way around this behaviour? Mark

AD Administrator Syncfusion Team July 23, 2004 12:03 PM UTC

Bah scratch that last post. It seems that the error went away after I had edited the grid control using the designer then when I closed and re-opened the form back it came. Mark

AD Administrator Syncfusion Team July 23, 2004 12:13 PM UTC

This appears to be a bug. If you open up the designer generated code and comment out (or remove) this line Me.col_reprint.StyleInfo.Text = "" the problem will go away (until the next time you touch this GridBoundColumn in the designer.) This is been entered into our Open Issues database as #497. In a day or so, it should be exposed in our Opens Issues area of our website so you can track it.

AD Administrator Syncfusion Team July 23, 2004 12:17 PM UTC

Ok, well at least im not going mad. Just as an aside did you ever get that grid resize problem on mdi forms sorted out. As I keep putting my grids on panels to make them size correctly. Just I cant see it on the open issues page. Mark

AD Administrator Syncfusion Team July 23, 2004 12:23 PM UTC

Can you refresh my memory about this problem? Were we able to reproduce it here is a sample? This is one of the requirements of adding a problem to our open issue database.

AD Administrator Syncfusion Team July 26, 2004 09:41 AM UTC

Yes you sent me a sample that showed the problem. Basically you stick a grid on a mdi child form resize it about a bit then minimize and maximise and the grid flys off the edge of the form. I cant find the thread at the moment. You need a better search facilty. :P Mark

AD Administrator Syncfusion Team July 26, 2004 10:04 AM UTC

No, this has not been fixed. I think you can work around it by putting a Panel where you have the grid, and then adding the grid to the Panel with grid.DockStyle = fill.

Live Chat Icon For mobile
Up arrow icon