Datagrid: Edit all rows?

G

Guest

Hi,

How can I edit all rows of a datagrid at the same time?

I have a datagrid that has some bound columns and some template columns with
a asp:textbox inside. (Textbox for values that can change..)

From the event handler of a link button at the bottom of the page, how can I
loop through all the rows of the data grid and read, the possibility changed,
values of the controls in each row?



Thanks,

David
 
E

Eliyahu Goldin

David,

You know the grid's id, say myGrid. Loop through myGrid.Items collection,
filter out non-data items such as header, footer, pager. For every data item
you can property Cells is the collection if the row's cells (columns). If it
is a template column, you know your template structure and can use
FindContriol methods to find controls within the column.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top