Click here to Skip to main content
13,052,033 members (62,752 online)
Rate this:
Please Sign up or sign in to vote.

i have datagrid control and inside the grid i have added a stack panel control and i added label and image controls.

now i clicked the image inside datagrid and now i need to get the image values and label values inside the stack panel of the particular row.

how to handle this..

need ur suggestions..
Posted 20-Sep-12 20:17pm
Updated 20-Sep-12 20:18pm
AdamDavidHill 21-Sep-12 4:04am
Can you show some code, specifically how you put the values into those controls in the first place?

By what means are you deciding which row you want to read? Is there some particular event happening related to that row, or maybe you want to retrieve it by index etc.?
Member 10763222 22-May-14 2:20am
Hi Everyone,


<datagrid name="XCV">
<datagridtemplatecolumn header="Student">
<Label Name="lblStuName" />
<Button x:Name="btnMyButton" />

Can somebody please tell me, how can I get to the control "datagrid" in visual tree while I know the current keyboard focus

is on the button which is inside the stack panel.( The design cannot be changed.)

All I want to have, is to 'do nothing' in the lost focus event of the datagrid when user clicks on the button. I want to

save the data of the datagrid to a table which is not bound to the datagrid upon lost focus event of the datagrid(not

loosing focus to button, but when user leaves the datagrid and goes to some other control in the window.).

Thank you in advance. Any help is appreciated.


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 | Mobile
Web02 | 2.8.170713.1 | Last Updated 21 Sep 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