473,569 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Losing Datagrid Content when Adding TableStyle

I have an issue with a datagrid 'losing' it's contents when I add a
tablestyle to it.

I have one simple line:

MyDataGrid.Tabl eStyles.Add(MyT ableStyle)

When run in debug and put a break point on this line, I can see the contents
of the datagrid, i.e. MyDataGrid (0,0) returns a value.

However as soon as I run this line and try doing the MyDataGrid(0,0) again I
get the following error:

Run-time exception thrown : System.Argument OutOfRangeExcep tion - Specified
argument was out of the range of valid values.
Parameter name: rowIndex
Has anyone else had this problem?
Any ideas what is going on?
Nov 22 '05 #1
0 1188

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

Similar topics

0
292
by: Supa Hoopsa | last post by:
I have an issue with a datagrid 'losing' it's contents when I add a tablestyle to it. I have one simple line: MyDataGrid.TableStyles.Add(MyTableStyle) When run in debug and put a break point on this line, I can see the contents of the datagrid, i.e. MyDataGrid (0,0) returns a value.
5
5554
by: Jeff Cook | last post by:
Hi I have a DataGrid that I am using to display a .xml file (that has a schema in a .xsd), like this:- ds.ReadXmlSchema(sDataPath + "Data.xsd"); ds.ReadXml(sDataPath + "Data.xml", XmlReadMode.InferSchema); grdXXXX.DataSource = ds; FormatGridColumns(grdXXXX, ds.Tables); // my routine below.
3
5363
by: bismarkjoe | last post by:
Hello, I am trying to set the widths on the columns of a DataGrid component, and I'm not sure if I'm doing it correctly. My code is below: //load some inital data table = db.GetDataTable( "SELECT 'Task' AS 'Type', title AS 'Title', IFNULL(u.name, 'Nobody') AS 'Assigned To' FROM tasks t LEFT JOIN users u ON t.assigned_to=u.user_id LIMIT...
2
2491
by: Josef Meile | last post by:
Hi, I'm using a ComboBox, some Textboxes, and a DataGrid to represent a many-to-many relationship between Person and Course. Each time that I change the value in the ComboBox (which for now is the OID of Person), the information of the person matching the selected OID is shown in the Textboxes (Name, Address, id, etc) and the courses this...
2
3111
by: Scott | last post by:
Hi all. A few days ago i ask this question and got a good quick response. I tried out what they said and it worked. However I have now come to try the same thing in another program and it does not seem to be working.
2
6384
by: CSL | last post by:
I am using the DataGrid in a Windows Application, how can I adjust the widths of each column individually.
1
10227
by: ElenaR | last post by:
I need to figure out how to name my column headers in a DataGrid. In VB6, I could write DataGrid1.Columns(0).Caption = "ID". What is the format for VB.NET? Thanks in Advance!
6
3746
by: Ron L | last post by:
I have a dataset whose source is a SQL 2k stored procedure that I am trying to display in a datagrid. This datasource has 4 columns that I am interested in here, a text column and 3 value columns corresponding to permissions to certain data classes. I want to put the permission values in combo boxes in the grid and instead of displaying the...
4
1103
by: Geoff Jones | last post by:
Hi It is possible to associate several TableStyles with one DataGrid e.g. Dim tableStyle1 As New DataGridTableStyle Dim tableStyle2 As New DataGridTableStyle DataGrid1.TableStyle.Add(tableStyle1) DataGrid1.TableStyle.Add(tableStyle2)
7
2026
by: Earl | last post by:
Any known fixes for the wacky right-alignment bug in the WinForms datagrid (VS2003)? I've tried Ken's workaround (http://www.windowsformsdatagridhelp.com/default.aspx?ID=4bfab32d-9cff-4f5c-ba95-49bb9074a8bc), but I get no alignment at all when calling the class. George Shephard's site, while imminently useful, does not have an anwer for...
0
7694
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...
0
7921
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. ...
0
8118
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...
0
7964
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6278
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...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2107
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
1
1208
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.