Click here to Skip to main content
13,291,503 members (67,522 online)
Rate this:
Please Sign up or sign in to vote.
See more:
When click on row of wpf datagrid, i want to get a particular column value of the clicked row into a textbox by using binding. How can i do it?

Thanks in Advance
Posted 2-Aug-12 18:41pm
Member 10186770 7-Aug-13 7:02am
i have an number of rows in gridview in wpf..i need to delete some of them... may be one or can i do them..
i have done this thing..
but is there any button that can be inserted at the end of the column
i.e:as the field..
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

<grid grid.column="1" grid.row="1" height="177" horizontalalignment="Left" margin="10,12,0,0" name="grid3" verticalalignment="Top" width="595" datacontext="{Binding ElementName=DataEntrydataGrid, Path=SelectedItem}">
                <rowdefinition height="48*" />
                <rowdefinition height="129*" />
                <columndefinition width="128*" />
                <columndefinition width="467*" />
            <textblock height="23" horizontalalignment="Left" margin="40,24,0,0" name="textBlock8" text="LastName" verticalalignment="Top" />
            <textbox grid.column="1" height="23" horizontalalignment="Left" margin="9,21,0,0" name="LastNametextBox" verticalalignment="Top" width="120" text="{Binding Path=LastName}" />

I just did it using databinding. no need to write any code
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171207.1 | Last Updated 6 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100