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

DataGrid rowchanged event??



Hi

I wonder if there was something like a an event for an asp.net datagrid
which fire swhen you change (part of) that row? I am trying to mark rows
which have been changed to update later .

ch B.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
7 1504
How do you change the rows?

Eliyahu

<Beffmans> wrote in message news:eU**************@TK2MSFTNGP14.phx.gbl...


Hi

I wonder if there was something like a an event for an asp.net datagrid
which fire swhen you change (part of) that row? I am trying to mark rows
which have been changed to update later .

ch B.

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #2


Hi

I change the rows in the datagrid (consisting of templated columns) and
them manually get all the cellvalues out row for row and put them in a
web service. This is obviously not very efficient. Is there a way of
marking only the rows I want to update? In other words is there a way to
trigger an event in an asp.net datagrid when the user changes 1 row?

ch B

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3
If your template includes server-side controls, you can setup server-side
events that will be triggered on every postback, Is it good for you?

Eliyahu

<Beffmans> wrote in message news:e5**************@TK2MSFTNGP15.phx.gbl...


Hi

I change the rows in the datagrid (consisting of templated columns) and
them manually get all the cellvalues out row for row and put them in a
web service. This is obviously not very efficient. Is there a way of
marking only the rows I want to update? In other words is there a way to
trigger an event in an asp.net datagrid when the user changes 1 row?

ch B

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #4


how do you which row you updated? in other words what is the index of
the current row when you change a field in your datagrid?
ch B

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #5
Every server-side event gets a reference to the control that originated the
event. Since you know the item template structure, you can navigate from the
control reference to the containing cell and row. Use Parent property to get
to the DataGridItem. Once you are on the DataGridItem, you have ItemIndex
and DataSetIndex properties.

Eliyahu

<Beffmans> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...


how do you which row you updated? in other words what is the index of
the current row when you change a field in your datagrid?
ch B

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #6
thanks very Much Eliyah!!

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #7


I am trying to attach eventhandlers to my controls in the datagrid. In
cases one of the controls changes i mark this record to be updated in my
update function. Is this a good approach or can it be easier?

ch B

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #8

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

Similar topics

2
by: Paul Sampson | last post by:
Hello, The DataGrid.CurrentCellChanged requires too much overhead to determine when only the row has changed. Can anyone suggest a way to fire an event when the user selects a different row...
0
by: Emerson | last post by:
The following assumes a System.Windows.Forms.DataGrid with a System.Data.DataTable set as the DataSource. I'm programming in C# Here's my scenario I click in a cell on a DataGrid. I enter some...
7
by: TT (Tom Tempelaere) | last post by:
Hi there, I'm struggling to get the right event. I want to be notified of a change in a cell in a DataGrid made by a user. I need following information about the change: * the row index * the...
6
by: lanem | last post by:
I have a page that shows some data in a datagrid. All rows are updateable and then the changes are saved by hitting the "Save Changes" button. It is not a row by row save. All edits are made and...
3
by: Tim McKinney | last post by:
I have a read-only datagrid that I use to display a heirarchal model of three tables (The example I am setting up uses the Customer, Orders, and Order Detail tables from the northwind database). I...
7
by: Wayne Wengert | last post by:
I am using VB with a Windows NET application. I have a datagrid in which the user can add rows using the "*" row. I want to detect whenever the user has added a row. I found the following code at...
8
by: Aaron Smith | last post by:
If I add a handler to the row changed event of a datatable, it fires when a row has been added, but when in the event, it hasn't actually added the row yet... Is there a way around this? How can I...
16
by: stojilcoviz | last post by:
I've a datagrid whose datasource is an arraylist object. The arraylist holds many instances of a specific class. I've two questions about this: 1 - Is there a way by which I can obtain a...
9
by: astro | last post by:
I've tried the following without success....... AddHandler DS1.Tables("dial").RowChanged, AddressOf after_row_insert AddHandler CType(Me.dgDials.DataSource, DataTable).RowChanged, AddressOf...
1
by: seanmle | last post by:
I want to build a windows application that has a datagrid filled with data. When a person modifies information on a single cell, it updates the database without the user having to click on a save...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...

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.