Button Text from a DataGrid?

S

Stephen Russell

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

901.246-0159
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top