Groups | Blog | Home
all groups > asp.net > january 2006 >

asp.net : Change the Text of ButtonColumn in a DataGrid


Ben
1/22/2006 11:46:04 PM
Hi there,

I would like to change the text of the ButtonColumn after datagrid binding,
depending on the value of a certain field. (eg. Text="Details" for case 1,
Text="others' for case 2)

Is it possible to do so?

<asp:datagrid id="dgList" runat="server" Width="890" BorderStyle="None"
GridLines="Both" BorderWidth="1px" ...
<asp:ButtonColumn Text="Details" CommandName="Select"
ItemStyle-VerticalAlign="Top" ItemStyle-Width="40"></asp:ButtonColumn>




Thanks.
Christopher Reed
1/24/2006 6:42:30 AM
Create a DataBound event and make your changes there.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

[quoted text, click to view]

AddThis Social Bookmark Button