Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataGrid Button Text
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00840332
Message ID:
00840352
Vues:
17
Fixed via:
Button lb = e.CommandSource as Button;
string lcButt="";
if (lb != null)
{
lcButt=lb.Text;
}


>Having a brain fart this morning :(
>
>I need to take the text of a button in a datagrid. Grid could be sorted so I need it's data that is displayed
>
>Button Click fires:
>public void ShowModel(object sender, DataGridCommandEventArgs e) { string lcCommand = e.CommandName; if (lcCommand != "sort")
> {
> // Code here for # in the grid used to go against ds.
> // no longer works with sort buttons on top of grid.
> // ____________
> // string lcstring = e.Item.DataSetIndex.ToString();
> // int lnstring = Convert.ToInt32(lcstring);
>
>New code here, but it brings up control info and not text on control. string lctr = e.CommandSource.ToString();
>
>Any ideas?
>
>TIA
>
>
>
>Stephen Russell
>S.R. & Associates
>Memphis TN 38115
>901.246-0159
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform