BUG - Project add-ins and Form DataGrid

R

RMunjal

Hi
Can you help me.
I am tying to bulid Ms-Project Add-in
In this add in when I Show form with DataGrid
It does not works and givs me following error.
What can I do to resolve this.
Any Help would be appreciated.
Looks like a bug in Data grid contol
I am using .Net Framework 1.1 with Prject 2003.

To replicate this defect
Just add simple DataGrid to MyProjectAddin Sample. Supplyied with MS project 2003 SDK.
You can find this at

http://msdn.microsoft.com/library/d...-us/pjsdk/html/pjsdkMAOverview_HV01098482.asp

And the Form datagrid does not works.
Without Datagrid it works fine

ERROR---
************** Exception Text **************
System.ArgumentException: Invalid parameter used.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
at System.Windows.Forms.DataGridParentRows.PaintBorder(Graphics g, Rectangle bounds)
at System.Windows.Forms.DataGridParentRows.Paint(Graphics g, Rectangle visualbounds, Boolean alignRight)
at System.Windows.Forms.DataGrid.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
….
 
L

Linas Mikutaitis

Try setting ParentRowsVisible property of the grid to 'False'.

LM

RMunjal said:
Hi
Can you help me.
I am tying to bulid Ms-Project Add-in
In this add in when I Show form with DataGrid
It does not works and givs me following error.
What can I do to resolve this.
Any Help would be appreciated.
Looks like a bug in Data grid contol
I am using .Net Framework 1.1 with Prject 2003.

To replicate this defect
Just add simple DataGrid to MyProjectAddin Sample. Supplyied with MS project 2003 SDK.
You can find this at

http://msdn.microsoft.com/library/d...-us/pjsdk/html/pjsdkMAOverview_HV01098482.asp

And the Form datagrid does not works.
Without Datagrid it works fine

ERROR---
************** Exception Text **************
System.ArgumentException: Invalid parameter used.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
at System.Windows.Forms.DataGridParentRows.PaintBorder(Graphics g, Rectangle bounds)
at System.Windows.Forms.DataGridParentRows.Paint(Graphics g, Rectangle
visualbounds, Boolean alignRight)
at System.Windows.Forms.DataGrid.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs
e, Int16 layer, Boolean disposeEventArgs)
 
R

Rajender

Thanks Linas
Rajender


Linas Mikutaitis said:
Try setting ParentRowsVisible property of the grid to 'False'.

LM


visualbounds, Boolean alignRight)
e, Int16 layer, Boolean disposeEventArgs)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top