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