Click here to Skip to main content
11,706,024 members (53,977 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WPF
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
Kunjammu
Posted 2-Aug-12 17:41pm
Kunjammu1.1K
Comments
Member 10186770 at 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 two...how 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
good
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}">
            <grid.rowdefinitions>
                <rowdefinition height="48*" />
                <rowdefinition height="129*" />
            </grid.rowdefinitions>
            <grid.columndefinitions>
                <columndefinition width="128*" />
                <columndefinition width="467*" />
            </grid.columndefinitions>
            <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}" />
        </grid>

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

Solution 1

  Permalink  

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

  Print Answers RSS
0 OriginalGriff 186
1 Sergey Alexandrovich Kryukov 172
2 ppolymorphe 61
3 Inimicos 60
4 ProgramFOX 50
0 OriginalGriff 9,050
1 Sergey Alexandrovich Kryukov 8,417
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,636


Advertise | Privacy | Mobile
Web01 | 2.8.150819.1 | Last Updated 6 Aug 2012
Copyright © CodeProject, 1999-2015
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