Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
I need to add a radio button to the end column of grid view can any one help me please.

Thanks in advance
Posted
Updated 30-Nov-10 19:33pm
v2
Comments
Hiren solanki 1-Dec-10 1:34am    
Removed excess white spaces.
Abdul Quader Mamun 1-Dec-10 2:09am    
Define GridView Columns in code.

1 solution

Check for the footer row on RowCreated Event for Gridview and add control in specified cell.

protected void grvRoles_RowCreated(object sender, GridViewRowEventArgs e)  
{  
        if (e.Row.RowType == DataControlRowType.Footer)  
    {  
        RadioButton radiobutton = new RadioButton();  
        e.Row.Cells[0].Controls.Add(textBox);  
    }  
} 


Please vote and Accept Answer if it Helped.
 
Share this answer
 
Comments
tulasiram3975 1-Dec-10 2:02am    
i used mysql database i invoked through command and i add radio button as item template here my problem is it add to the first column but i need to add end column of grid view

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