change the text of cells of a column

B

Billow

Hello

I'd like to change the text of cells of a column which
has been set as a buttonColumn and bounded to a datafield.
I have tried to change its texts with code,but met a setback. Beneath
here is what I have tried:
hyst=menuDataGrid.Items[theboundcolumm].Cells.Text;
//------hyst=""----The returned string was empty, why?
menuDataGrid.Items[theboundcolumm].Cells.Text="the words";
//----The effect showed on the brower was the clicked link was
disappearing. Why? And how can i do ??
 
G

Guest

Since it's buttonColumn, you should deal with button (inside the cell) rather
than cell.

LinkButton linkBtn =
(LinkButton)menuDataGrid.Items[row_index].Cells[theboundcolumm_index].Controls[0];
hyst = linkBtn.Text;

HTH

Elton Wang
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top