473,884 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Index out of bound

Hi,

I am struck with the same probelm
could you please suggest any solution if you found any

Jun 27 '08 #1
3 2356
On May 14, 9:52 am, "ppkm" <u43587@uwewrot e:
I am struck with the same probelm
could you please suggest any solution if you found any
As Marc said, tell us what you're doing.

If possible, post a short but complete program demonstrating the
problem:
http://pobox.com/~skeet/csharp/complete.html

Jon
Jun 27 '08 #2
Jon Skeet [C# MVP] wrote:
>I am struck with the same probelm
could you please suggest any solution if you found any

As Marc said, tell us what you're doing.

If possible, post a short but complete program demonstrating the
problem:
http://pobox.com/~skeet/csharp/complete.html

Jon

Hi jon,

When the datagrid has multi rows and the vertical scrollbar hasn't appeared,
if I click the column near the bound or drag horizontal scrollbar, this
exception will be throwed. The trace stack as follows:

at System.Windows. Forms.DataGrid. CreateScrollabl eRegion(Rectang le scroll)
at System.Windows. Forms.DataGrid. set_HorizontalO ffset(Int32 value)
at System.Windows. Forms.DataGrid. ScrollRight(Int 32 columns)\
at System.Windows. Forms.DataGrid. ScrollToColumn( Int32 targetCol)
at System.Windows. Forms.DataGrid. EnsureVisible(I nt32 row, Int32 col)
at System.Windows. Forms.DataGrid. set_CurrentCell (DataGridCell value)
at System.Windows. Forms.DataGrid. OnMouseDown(Mou seEventArgs e)
at System.Windows. Forms.Control.W mMouseDown(Mess age& m, MouseButtons button,
Int32 clicks)
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.
UnsafeNativeMet hods+IMsoCompon entManager.FPus hMessageLoop(In t32
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.RunDialog(Fo rm form)
at System.Windows. Forms.Form.Show Dialog(IWin32Wi ndow owner)
at System.Windows. Forms.Form.Show Dialog()
Jun 27 '08 #3
On May 14, 3:11 pm, "ppkm" <u43587@uwewrot e:

<snip>
When the datagrid has multi rows and the vertical scrollbar hasn't appeared,
if I click the column near the bound or drag horizontal scrollbar, this
exception will be throwed. The trace stack as follows:
The stack trace doesn't really help us reproduce the problem.

A short but complete program would *definitely* help us reproduce the
problem.

Jon
Jun 27 '08 #4

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

Similar topics

2
1772
by: Uwe Mayer | last post by:
Hi, a class of mine should support the list interface and implements the __len__ and __getitem__ methods. Now when I ask for an unbounded slice: >>> len( myObj ) my __getitem__(self, y) method gets called with
10
3705
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. Andrew dalke@dalkescientific.com
3
4851
by: Oliver Drobnik | last post by:
Hi, I have a datagrid bound to a datatable. Now if I sort the datagrid by clicking on one of the column heads I can no longer use the index in the datagrid to find the corresponding row in the datagrid. How can I find out the new (sorted) index if I know the row in the datatable? kind regards
2
4286
by: martin | last post by:
Hi, I have a dropdown control tha is rendered with the follwoing HTML <select name="FirstStep:CmbTargetGroup" id="FirstStep_CmbTargetGroup" style="width:152px;"> <option value="1">Martin</option> <option value="2">Chris</option> <option value="5">adrian</option> <option value="7">Tony</option>
1
1611
by: Ashutosh Bhalerao | last post by:
Hi all, I have bound an Arraylist of Objects to a repeater. All the items from the Object display fine on the screen. Now I need the current index being bound inside the <ItemTemplate> </ItemTemplate>. If the zeroth element is being bound then I need to display 0 in a column, if the first element is being bound then I want to display 1 in the column and so on.
0
4814
by: JSantora | last post by:
Essentially, InsertAT is broken! For the past couple of hours, I've been getting this "Parameter name: '-2147483550' is not a valid value for 'index'." error. Apparently, its caused by having manually inserted a row in the table bound to the Combo box. The InsertAt Method of adding a row just does not work. Hope this helps anyone with this problem. john
2
8355
by: inpuarg | last post by:
Is it possible that - or is there any workarround for adding a new unbound row to a datagridview at bound mode ? Theese are not working. And i don 't want to add a row to dataset then rebind - cause i want to add this row to a specific location. and it does not match to sort order. Regards. and thanks. base.Rows.InsertCopy(base.CurrentRow.Index, 1); base.Rows.Insert(base.CurrentRow.Index, 1);
14
3053
by: oLgAa25 | last post by:
Hello all, I am back I have this question everything compiles fine, but I just need to check for an index that is more than the array size. Although it says out of bound, but it is still deleting the last element. Can someone help please Thank you all Olga I just wanted to test my function,so don't bother with main, and print
3
9129
by: Jerry West | last post by:
I'd like to get the upper bound index of an integer array. I've tried the following: Dim i as Integer Dim arrayIng() as Integer i = arrayIng.GetUpperBound This doesn't work. It seems GetUpperBound behaves more like a function in that it wants a passed parameter. Is there not a property similar to VB6
1
1820
by: .nLL | last post by:
Hi, i ma trying to change a dropdown box index to mathing value of on another dropdown box in same form. here is the form -------------------------------------------------------------------------------------------------------------------------- <form method="post" name="myform" action="default.asp"> <p> Select Month: <select name="mymonth" onChange="document.getElementById('myday').selectedIndex=0"> <option value="20080401"...
0
9953
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
9799
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
11167
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...
1
10868
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
9591
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...
0
6009
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4231
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3242
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.