473,320 Members | 1,949 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.

No ItemDataBound event in DataGridView - help!

I come from a VB background and I'm on my first C# project.

I have a panel with a DataGridView control. When the program is first
run, the panel is instantiated with 4,000 empty rows (this is a
business requirement. Trust me.)

At some time in the life of the program the user will attempt to load
some data into the grid from a file. The grid will be populated by
this line:

grdFill.DataSource = m_data.FillRows;

m_data.FillRows represents an array of objects of type FillData.

What I would like to do is to validate every row *as it is loaded* and
present the user with a summary of any invalid rows (the sole
criterion for validity is currently whether the value in a particular
cell exceeds a maximum value stored elsewhere).

In VB/ASP using a System.Web.UI.WebControls.DataGrid there was an
ItemDataBound event that fired for every new row.

Does anyone have any ideas/workarounds for my C#/Windows forms
problem?

Thanks

Edward

Mar 9 '07 #1
1 5727
On Mar 9, 11:02 am, teddysn...@hotmail.com wrote:
I come from a VB background and I'm on my first C# project.

I have a panel with aDataGridViewcontrol. When the program is first
run, the panel is instantiated with 4,000 empty rows (this is a
business requirement. Trust me.)

At some time in the life of the program the user will attempt to load
some data into the grid from a file. The grid will be populated by
this line:

grdFill.DataSource = m_data.FillRows;

m_data.FillRows represents an array of objects of type FillData.

What I would like to do is to validate every row *as it is loaded* and
present the user with a summary of any invalid rows (the sole
criterion for validity is currently whether the value in a particular
cell exceeds a maximum value stored elsewhere).

In VB/ASP using a System.Web.UI.WebControls.DataGrid there was anItemDataBoundevent that fired for every new row.

Does anyone have any ideas/workarounds for my C#/Windows forms
problem?

Thanks

Edward
Hi,

use DataRowBound event instead

Apr 23 '07 #2

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

Similar topics

3
by: Clouds | last post by:
Hi ! How do I add the dynamic event handler for a dropdownlist present in the itemtemplate of a datalist !! I am doing it in the itemdatabound event of the datalist but it doesnt work... I am...
4
by: Girish | last post by:
Im trying to create a grid within a grid programmatically. Ive been successful in doing this but I need the embedded grid to fire its ItemDataBound event so I can handle it. The event does not seem...
0
by: fig000 | last post by:
Hi, I have a datalist with bound data from a database. If I wanted to access one of the fields I would normally use the itemdatabound event to access that field on each row. However in this...
1
by: needin4mation | last post by:
Hi, I have a datalist. In this datalist I have a datagrid. The datalist is the master. The datagrid is the detail. It works fine. I populate the datagrid inside of the datalist using the...
1
by: greenb | last post by:
I'm using the ItemDataBound event of the DataGrid to highlight cells that are outside an acceptable range. Each row has a button column (CommandName='Select'), that is used to display addtional...
5
by: Nathan Sokalski | last post by:
I have a control that I want displayed in all items except the last one. I figured the best way to do this was to determine whether the current item was the last from within the ItemDataBound event...
2
by: Spam Catcher | last post by:
Is there an event in the datagridview which fires during databinding? Thanks.
2
by: Nathan Sokalski | last post by:
I have a DataList control that I use the ItemDataBound event for. One of the properties of the DataList that I use in this event is Me.datMain.Items.Count (datMain is the id of my DataList) in...
2
by: hnpatel | last post by:
Hi to All, How to use mouse click event for datagridview in c# in vs2005? I m using datagridview in c# application.I had bound data in datagridview.I want to display data in textbox when i...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.