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 8262603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:48:29+00:00 2026-06-08T03:48:29+00:00

xml:Button in my datagrid <DataGridTemplateColumn Header=Update> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button Content=Update Name=btnEmpGridUpdate Tag={Binding Path =

  • 0

xml:Button in my datagrid

<DataGridTemplateColumn Header="Update">
    <DataGridTemplateColumn.CellTemplate>
        <DataTemplate>
            <Button Content="Update" Name="btnEmpGridUpdate" Tag="{Binding Path = EMPID}" Click="btnEmpGridUpdate_Click" ></Button>
        </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>

code in button event :

Object Id = new Object();
Id =  ((Button)sender).Tag;

Is that a possible way to retrieve all cell’s value of a selected row ? If , how can I do this ? Or else , please suggest me some other way to update in my dataset from datagrid. Thanks in advance . 🙂

  • 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-06-08T03:48:30+00:00Added an answer on June 8, 2026 at 3:48 am

    Use these helper functions;
    http://techiethings.blogspot.com/2010/05/get-wpf-datagrid-row-and-cell.html

    On your Update button, hook up Click event, and in the handler, do something like this:

    //youll need to google for GetVisualParent function.
    DataGridRow row = GetVisualParent<DataGridRow>(button);
    for(int j = 0; j < dataGrid.Columns.Count; j++)
       DataGridCell cell = GetCell(dataGrid, row, j);
    

    I didn’t completely understand what you wanted to do, but this should help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this button xml, when it be will pressed, the pressed image(b) would
I am inflating an xml having button, multiple times and i am able to
How to setup(in XML) that the button will have width half of screen. I
My XML contains Five EditText box and One Button. My cursor is now pointed
I created the button in the main.xml file and initialized it in the activity
I have a button in my XML, that when clicked will toggle the visibility
Possible Duplicate: Android Button: set onClick background image change with XML? I need that
I want to create a Button otherthan creating it from xml layout.i want to
Each time I make changes to XML file and press run button, It generates
I want to make a loop that in my main.xml creates a button for

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.