C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

Adding Default selected value from a gridview with radiobutton C#


Posted Date: 21 Nov 2008      Posted By: Spha      Member Level: Silver     Points: 1   Responses: 1



Hi guys i have a problem here now i got my gridview to check the radio button of the first value on the gridview but now my roblem is that now,when a user clicks on submit button that selected value needs to be stored onto the DB,can you pls show me on how to read the value of that first default selected record and mabe put it into the label,then i can take it from there.the code that i used to check the radio button of the first record is as ff:

for (int i = 0; i <= gvExpense.Rows.Count - 1; i++)
{
RadioButton rd = new RadioButton();
rd = (RadioButton)gvExpense.Rows[i].FindControl("rb1");

if (i == 0)
{
rd.Checked = true;


}

else
{
rd.Checked = false;
}

}

Pls guyz help





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Reading CSV file
Previous : how to add a value from a gridview with radio button and that value was selected by defau
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use