c# - WPF DataGrid perform action on multiple selected rows -


i have datagrid in wpf contains list of names , email addresses, , event handler performs action when row double-clicked:

<datagrid x:name="datagrid_emails" itemssource="{binding addressbook}">     <datagrid.rowstyle>         <style targettype="{x:type datagridrow}">             <eventsetter event="mousedoubleclick" handler="datagrid_emails_rowdoubleclick"/>         </style>     </datagrid.rowstyle>     <datagrid.columns>         <datagridtextcolumn header="name" binding="{binding path=name}"></datagridtextcolumn>         <datagridtextcolumn header="email" binding="{binding path=email}"></datagridtextcolumn>     </datagrid.columns> </datagrid> 

i'd able extend functionality work on multiple rows if multiple rows selected. possible me add somethins eventsetter cover scenario?

i dont think can add because can doubleclick 1 row @ time. can selected rows in handler , apply action them. in handler can use selecteditems property of datagrid.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo