473,320 Members | 1,914 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,320 software developers and data experts.

Exception accessing DataRow column value

Hi,
I have a custom DataGridColumnStyle, where in paint
of cells, it's accesing the value using GetColumnValueAtRow
(CurrencyManager source, Int32 rowNum)
where it's throwing this exception, when I tried to
debug it, the DataRowView.DataRowVersion property is
throwing exception when I tried to see it's value

System.NullReferenceException: Object reference not set to
an instance of an object.
at System.Data.DataView.IsOriginalVersion(Int32 index)
at System.Data.DataRowView.GetColumnValue(DataColumn
column)
at System.Data.DataColumnPropertyDescriptor.GetValue
(Object component)
at
System.Windows.Forms.DataGridColumnStyle.GetColumn ValueAtRo
w(CurrencyManager source, Int32 rowNum)
at Viper.UI.Base.DataGridTextBoxColumnEx.Paint(Graphi cs
g, Rectangle bounds, CurrencyManager source, Int32 rowNum,
Brush backBrush, Brush foreBrush, Boolean alignToRight)

Anybody plz help.

Thanks,
Shravan.

Nov 15 '05 #1
0 843

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

Similar topics

3
by: Allan Bredahl | last post by:
Hi All I have a bit of a problem with using a datarow to store data that is show in a form. On form load I set the Value/Text properties of my form elements to the specific Column values of...
2
by: Newbie | last post by:
Im getting an exception: System.FormatException: Input string was not in a correct format. at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at...
3
by: shamila | last post by:
we are trying to pass a value to format a value in the datacolumn. But when we pass the datacolumn , it does not give me the value in the column, instead gives me the column name. the following...
3
by: Chet | last post by:
I have a DataRow from a table in a data set. One of the columns has a name of "COMPANY_TICKET_ID" and I'm trying to get this column's value with the following: foreach( DataRow row in...
9
by: JIM.H. | last post by:
Hello, Dim row As DataRow Dim column As DataColumn For Each row In myDTSrc.Rows For Each column In myDTSrc.Columns myRowDest(column.ColumnName.ToString) = row(column.ColumnName.ToString)...
5
by: Sridhar | last post by:
Hi, I have created a web application. I have a data access dll to interact with database. I added this dll as a reference to the web application. Now let's say if I am calling a function in data...
3
by: John | last post by:
Hi I have a hidden (visible=false) column on a gridview bound to a sql server table. I am trying to access the field as; For Each row As GridViewRow In grdEvents.Rows If row.RowType =...
6
by: Manikandan | last post by:
Hi, I need to insert the datetime with milliseconds value into a datarow. My code as below DataTable testDataTable=new DataTable(); testDataTable.Columns.Add("updatedDateTime",...
5
by: Rainer Queck | last post by:
Hello NG, I have a typed dataset, where I want to check the column of a datarow if it is DBNull. How can the following code cause an Exception (what is does): if...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.