Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Button control text
Message
 
To
02/03/2004 15:13:55
General information
Forum:
ASP.NET
Category:
WebForms
Miscellaneous
Thread ID:
00882451
Message ID:
00882463
Views:
13
This message has been marked as the solution to the initial question of the thread.
I do this in the ItemDataBound event of the DataGrid (C#):
private void myDataGrid_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)

switch (e.Item.ItemType)
{
  case ListItemType.Item:
  case ListItemType.AlternatingItem:
       // the "2" below is the index into the columm, starting with 0,
       // so this would be the 3rd column
       e.Item.Cells[2].Text = "My Text";

}
>This should be a fairly easy question.
>
>I have a asp.net datagrid with a few text column's and a button control. For some reason I can't find where to change the text ("caption") property at runtime.
>
>
>Paul
Chris McCandless
Red Sky Software
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform