473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Grid Problem

Alright, I cannot figure out what I'm doing wrong here.

As some of you know I've been stripping out C1 out of my current project,
and going back to native .NET controls.

However, on one of my grids I have the following code...
.....
chargeRows = oCharges.GetOpenChargesByFamily(_iFamID, dtSearch)

Me.BindingContext(Me.DsTransactions1, "rltInvChg").SuspendBinding()

Me.DsTransactions1.rltInvChg.Rows.Clear()

Me.DsTransactions1.Merge(chargeRows)

Me.BindingContext(Me.DsTransactions1, "rltInvChg").ResumeBinding()

.....

It works fine the first time through.. then the second time... I get this
exception...

No value at index -1.

at System.Windows.Forms.CurrencyManager.get_Item(Int3 2 index)

at System.Windows.Forms.CurrencyManager.get_Current()

at Assetta.ColumnStyles.LabelColumn.Paint(Graphics g, Rectangle bounds,
CurrencyManager source, Int32 rowNum, Brush backBrush, Brush foreBrush,
Boolean alignToRight)

at System.Windows.Forms.DataGridRelationshipRow.Paint CellContents(Graphics
g, Rectangle cellBounds, DataGridColumnStyle column, Brush backBr, Brush
foreBrush, Boolean alignToRight)

at System.Windows.Forms.DataGridRow.PaintData(Graphic s g, Rectangle bounds,
Int32 firstVisibleColumn, Int32 columnCount, Boolean alignToRight)

at System.Windows.Forms.DataGridRelationshipRow.Paint (Graphics g, Rectangle
bounds, Rectangle trueRowBounds, Int32 firstVisibleColumn, Int32
numVisibleColumns, Boolean alignToRight)

at System.Windows.Forms.DataGrid.PaintRows(Graphics g, Rectangle&
boundingRect)

at System.Windows.Forms.DataGrid.PaintGrid(Graphics g, Rectangle gridBounds)

at System.Windows.Forms.DataGrid.OnPaint(PaintEventAr gs pe)

at System.Windows.Forms.Control.PaintWithErrorHandlin g(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(M essage& m)

at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)

at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)

at
System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason,
Int32 pvLoopData)

at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason,
ApplicationContext context)

at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)

at System.Windows.Forms.Application.DoEvents()

It doesn't matter taht it is Assetta, this happens with the grid no matter
what. What am I clearly missing here...
Nov 16 '05 #1
0 930

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dimitri pater | last post by:
Hello, To be honest, I also posted this on the wxPython mailing list. But I thought maybe some of you on the python list can help me... I am trying to refresh a pane of a notebook that contains...
6
by: Richard Lewis | last post by:
Hi there, I've got a tree control in Tkinter (using the ESRF Tree module) but I can't get it to layout how I want it. I'd like to have it so that it streches north/south (anchored to the top...
2
by: Jordan O'Hare | last post by:
Hello Everyone, I am after some help with the following: I have a windows application that contains a list box and two data grids. All three controls are binded to a dataset that contains...
4
by: Carlos Lozano | last post by:
Hello Folks! I have a grid that populates from a table on SQL Server. All datetime with DBNull value show 1/1/1900 12:00AM ... Instead of just blank (""). I found a document with the following...
10
by: John Wilson | last post by:
My app produces some long datatables to display in a grid. So I put them in a div so users can scroll. But the grid headers scroll out of view. I would like to stop them doing this. Can I fix them...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
0
by: BH | last post by:
Hi, I am trying to build my own IHM with two treeCtrl and 1 grid, based on the wx.aui demos. My problem is with the Grid. It dosen't have scrollbars. I tried many methods (fit) but it always...
4
by: BH | last post by:
Hi ! I have a small problem with wx.Grid and scrollbars. Scrollbars definitively dissapears after resizing the frame. Thx for help ...
2
by: skanemupp | last post by:
so my little calculator works perfectly now. just having some trouble with the layout. this whole tkinter-thing seems to be more tricky than it should be. how can i make the 4 column of buttons...
1
by: Francesco Bochicchio | last post by:
Il Mon, 18 Aug 2008 12:15:10 +0100, dudeja.rajat ha scritto: Uhm, I don't think you should use the grid manager to obtain a window like that. The grid manager is for equally distributing...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.