473,811 Members | 1,881 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.GetOpe nChargesByFamil y(_iFamID, dtSearch)

Me.BindingConte xt(Me.DsTransac tions1, "rltInvChg").Su spendBinding()

Me.DsTransactio ns1.rltInvChg.R ows.Clear()

Me.DsTransactio ns1.Merge(charg eRows)

Me.BindingConte xt(Me.DsTransac tions1, "rltInvChg").Re sumeBinding()

.....

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

No value at index -1.

at System.Windows. Forms.CurrencyM anager.get_Item (Int32 index)

at System.Windows. Forms.CurrencyM anager.get_Curr ent()

at Assetta.ColumnS tyles.LabelColu mn.Paint(Graphi cs g, Rectangle bounds,
CurrencyManager source, Int32 rowNum, Brush backBrush, Brush foreBrush,
Boolean alignToRight)

at System.Windows. Forms.DataGridR elationshipRow. PaintCellConten ts(Graphics
g, Rectangle cellBounds, DataGridColumnS tyle column, Brush backBr, Brush
foreBrush, Boolean alignToRight)

at System.Windows. Forms.DataGridR ow.PaintData(Gr aphics g, Rectangle bounds,
Int32 firstVisibleCol umn, Int32 columnCount, Boolean alignToRight)

at System.Windows. Forms.DataGridR elationshipRow. Paint(Graphics g, Rectangle
bounds, Rectangle trueRowBounds, Int32 firstVisibleCol umn, Int32
numVisibleColum ns, Boolean alignToRight)

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

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

at System.Windows. Forms.DataGrid. OnPaint(PaintEv entArgs pe)

at System.Windows. Forms.Control.P aintWithErrorHa ndling(PaintEve ntArgs e,
Int16 layer, Boolean disposeEventArg s)

at System.Windows. Forms.Control.W mPaint(Message& m)

at System.Windows. Forms.Control.W ndProc(Message& m)

at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)

at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)

at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)

at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg)

at
System.Windows. Forms.Component Manager.System. Windows.Forms.U nsafeNativeMeth o
ds+IMsoComponen tManager.FPushM essageLoop(Int3 2 dwComponentID, Int32 reason,
Int32 pvLoopData)

at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32 reason,
ApplicationCont ext context)

at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
ApplicationCont ext context)

at System.Windows. Forms.Applicati on.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 950

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

Similar topics

0
1451
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 a grid that contains data from a MySQL database. Here is the code (sorry, it's quite long): #!/usr/bin/env python import wx
6
8255
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 and bottom), is of a fixed width and is anchored to the left hand side. Here's my code (its derived from one of the examples from the ESRF web site):
2
4883
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 five tables, and three relations that I want to take advantage of. Everything works fine however I want to use the data grid table style editor to make it look more presentable. Currently I have successfully done this
4
2566
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 code, but didn't work. public void setGridColumnStyle() { DataGridColumnStyle newColStyle;
10
1943
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 in place at the top of the div? -- John Wilson
117
18608
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 elements in the HTML to get everything just right. When you consider the class attribute on the DIV elements, there's not much size savings anymore for using DIV. There are other disadvantages to not using TABLE/TR/TD, such as the lack of ability...
0
2260
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 fail. Can somebody point me where is the mistake ? Thx
4
2555
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 #---------------------------------------------------------------------- import wx,wx.grid #----------------------------------------------------------------------
2
3534
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 have the same distance and size between them as the other 3 columns? and how can i make the top entry end where the 2nd row entry ends(meaning the top entry will be longer)? why are the 4th row split from the others? hard to fix the problems...
1
1705
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 widgets both horizontally and vertically. And I'm not sure that you can realize that window look with Tkinter. You could get close by horizontally packing each widget row in a frame and then vertically packing the frames in the window. But the look...
0
9728
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10648
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10389
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9205
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7670
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.