select from datalist w/click/& store in a variable

R

rbutch

does anyone know of a good place to go to get some ideas on datalists?
im building a web app, in asp.net (vb.net) and displaying data in a data list.

i want to be able to select any one of the first column items with a "onclick" and store the 'literal' in a variable (either session or global)
at this point i'm not picky at all.

ive tried using the OnItemCommand="someProc" in the code behind w/out much luck

any help is appreciated. ive been looking on the web and in books for days and found all sorts of variations, from making that column a 'link' , to making it an <asp:button>

thanks again as usual.
great great forum here
rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
S

Sinan

Try the following:

1. Insert a Select Column from the DataGrid Property Builder

2. Use a SelectedIndexChanged event for the datagrid (DataGrid1_SelectedIndexChanged)

3. In this event handler, the epression:
"DataGrid1.SelectedItem.Cells(1).Text" will return the value of the first column of the selected row.

4. The values of the other columns may be extracted by changing the cell number

5. You may store these variables in session variables or a global variables

Good Luck
Sinan
 
S

Sinan

Try the following:

1. Insert a Select Column from the DataGrid Property Builder

2. Use a SelectedIndexChanged event for the datagrid (DataGrid1_SelectedIndexChanged)

3. In this event handler, the epression:
"DataGrid1.SelectedItem.Cells(1).Text" will return the value of the first column of the selected row.

4. The values of the other columns may be extracted by changing the cell number

5. You may store these variables in session variables or global variables

Good Luck
Sinan
 

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

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,110
Latest member
OdetteGabb
Top