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 » WPF »

How to check all rows in DataGrid by clicking Check all Button in WPF in C#


Posted Date: 27 Oct 2009      Posted By: Gaddamchandrakanth      Member Level: Silver     Points: 1   Responses: 4



HI,

This is from Chandrakanth.

Working on WPF Project.

Actually i have one HyperLinkButton called as CheckALL. I have one DataGrid.DataGrid Consist of some rows.

I want to Click on that CheckAll Button than all the rows in DataGrid should check.

How can i write that in WPF. Can any one tell meabt that.

Thanks and Regards
Chandrakanth





Responses

Author: ABitSmart    27 Oct 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Sure you can. But a specific answer would depends on your implementation.
Are you using DataBinding?
If yes, then you will have to just set the property bound to the checkbox and WPF will take care of the rest.
If no, use databinding :) This is a classic example of what DataBinding can achieve.

Kind regards,
ABitSmart
DNS Web-master, DNS MVM
My blog
Thoughts.exe



Author: Gaddamchandrakanth    27 Oct 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

HI,
Once again from Chandrakanth. I am binding Data to DataGrid.

After binding data to DataGrid i want to check all rows in WPF dataGrid by clicking CheckAll Hyperlink Button.

How can i check all the rows. Is there any Source code is there pls send me that code. or Any suggestions are there pls give me reply

Thanks and Regards
Chandrakanth



Author: ABitSmart    27 Oct 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Chandrakanth, if you are using DataBinding then on the hyperlink click you can set the property bound to the checkbox to true. Doing this will automatically tick the checkbox.

Kind regards,
ABitSmart
DNS Web-master, DNS MVM
My blog
Thoughts.exe



Author: K Hari Prasad    04 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

go throw below linke, it might help you.

http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/50d2f917-ec02-4c8b-b7aa-1625747667c2/



Post Reply
You must Sign In to post a response.
Next : Command Binding for Usercontrols in WPF
Previous : How to implement Session Management in WPF brower application?
Return to Discussion Forum
Post New Message
Category: WPF

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use