Click here to Skip to main content
15,882,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have placed a datagrid and have to place radio buttons based on the dataset values.
ie. If a field 'seattype' has value=0 then place a label with 'x' and if 'seattype' has value other than 0 then place a radiobuton.

When user clicks a particular radiobutton the text of cell[1], ie. trainno of that row and headervalue of cell (the 'seattype') of the selected radiobutton should taken.

Based on this I have to reserve seats.

Please help.
Updated 26-Mar-11 2:32am
Sandeep Mewara 26-Mar-11 7:38am    
You say row count in title and then some things in detail. Not clear.
Dalek Dave 26-Mar-11 8:33am    
Edited for Grammar and Readability.

You can always get the underlying collection behind the datasource and then take the rowcount of the collection
Share this answer
Have you tried
int noRows=GridView1.Rows.Count;
Share this answer
Dalek Dave 26-Mar-11 8:34am    
I don't think that is what he is after.
I think it is more a question of polling cell contents.
[no name] 28-Mar-11 1:10am    
Please suggest

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900