Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7557639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:11:06+00:00 2026-05-30T12:11:06+00:00

Good morning! I’m programming a managment aplication that shows a task list using WPF

  • 0

Good morning!

I’m programming a managment aplication that shows a task list using WPF and MVVM patern. Users can edit this list too but I want to use a delete button to delete selected row. The problem is that I don’t know how to access to the selected row from ModelView and I don’t want to use code-behind. I guess the best option is using some binding but I’m unsure about how to do it.

This is the code ( I’m using DevXpress controls but is almost the same )

<dxg:GridControl  ItemsSource="{Binding Path=TaskView}" Loaded="GridControl_Loaded">
       <dxg:GridControl.Columns>
            <dxg:GridColumn Visible="False" DisplayMemberBinding="{Binding Path=ID, Mode=OneWay}" />
            <dxg:GridColumn Header="Project" DisplayMemberBinding="{Binding Path=ProjectCode, Mode=TwoWay}" AllowEditing="True" ContentChanged="OnHoursChanged"/>
            <dxg:GridColumn Header="Project Description" DisplayMemberBinding="{Binding Path=ProjectName, Mode=TwoWay}" AllowEditing="False"/>
            <dxg:GridColumn Header="Description" DisplayMemberBinding="{Binding Path=ProjectDescription, Mode=TwoWay}" AllowEditing="True"/>
            <dxg:GridColumn Header="Comment" DisplayMemberBinding="{Binding Path=Comment, Mode=TwoWay}" AllowEditing="True"/>
            <dxg:GridColumn Header="{Binding ElementName=mon,Path=Text}" DisplayMemberBinding="{Binding Path=HoursMonday, Mode=TwoWay}" AllowEditing="True" FieldName="M" />
            <dxg:GridColumn Header="{Binding ElementName=tue,Path=Text}" DisplayMemberBinding="{Binding Path=HoursTuesday, Mode=TwoWay}" AllowEditing="True" FieldName="T" />
            <dxg:GridColumn Header="{Binding ElementName=wed,Path=Text}" DisplayMemberBinding="{Binding Path=HoursWednesday, Mode=TwoWay}" AllowEditing="True" FieldName="W" />
            <dxg:GridColumn Header="{Binding ElementName=thu,Path=Text}" DisplayMemberBinding="{Binding Path=HoursThursday, Mode=TwoWay}" AllowEditing="True" FieldName="Th" />
            <dxg:GridColumn Header="{Binding ElementName=fri,Path=Text}" DisplayMemberBinding="{Binding Path=HoursFriday, Mode=TwoWay}" AllowEditing="True" FieldName="F" />
            <dxg:GridColumn Header="{Binding ElementName=sat,Path=Text}" DisplayMemberBinding="{Binding Path=HoursSaturday, Mode=TwoWay}" AllowEditing="True" FieldName="Sat" />
            <dxg:GridColumn Header="{Binding ElementName=sun,Path=Text}" DisplayMemberBinding="{Binding Path=HoursSunday, Mode=TwoWay}" AllowEditing="True" FieldName="Sun" />
            <dxg:GridColumn Header="Total" DisplayMemberBinding="{Binding Path=Total, Mode=OneWay}" AllowEditing="False" FieldName="Tot" />
        </dxg:GridControl.Columns>
    </dxg:GridControl>

Do you have any ideas?

Thank you very much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T12:11:08+00:00Added an answer on May 30, 2026 at 12:11 pm

    Your VM should have a Project SelectedProject { get; set; } property.

    The bin the SelectedRow (or something) from the Grid to it:

    ItemsSource="{Binding Path=TaskView}" SelectedItem="{Binding Path=SelectedProject}"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good morning, I am working on a C# winform application that is using validation
Good morning, I am the developer of a medium sized PDA application that will
Good morning, I'm having a really annoying issue with Highcharts, such that the x-axis
Good morning. Take this simple scenario: I've got a NetClient that connects itself to
Good Morning All, I am creating an application to display List of applications with
Good morning!! I have a dynamic datatable and I'm using Columns of Richfaces, but
Good morning, I have found that many of my customers have MS Access already
Good morning everyone, I'm running into an issue using a SharePoint workflow project (C#,
Good Morning! Given: public class FooClass { public void FooMethod() { using (var myEntity
Good Morning, I have a SharePoint site that I've been trying to fix up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.