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 »

Read selected rows values from gridview using javascript


Posted Date: 03 Nov 2009      Posted By: Challa SudhakarReddy      Member Level: Gold     Points: 1   Responses: 1



Hi,

I have a gridview which display the EmpName, EmpPhone, Email, Address columns on the grid and a button on the form.

Assume that they are 100 rows in the grid. Out of these 100 records, user has selected the 20 records and clicks on the button all selected employees Address column data should be copied in to windows clipboard(only Address column data)usinf javascript. We are using ASP.NET3.5.

Thnkas!





Responses

Author: greeny_1984    03 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi,

Inorder to get data from gridview you can try like this



for(int i=0;i<=gdview.rows.count-1;i++)
{
checkbox chk=new checkbox();
chk=(checkbox)gdview.rows[i].findcontrol("chkid");
if(chk.checked)
{
//you can collect all the selected columns data here using array or datatable
}

}




Regards,
Greeny_1984

Rate this Response[Excellent/Good/Poor]
FRESHERS check this link
Need help from me join here



Post Reply
You must Sign In to post a response.
Next : Date validations using asp.net regularexpression
Previous : Adding menu dynamically
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use