Click here to Skip to main content
15,744,193 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
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..

<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
Share this answer
Share this answer

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900