This is a migrated thread and some comments may be shown as answers.

Passing value to control inside rowdetailstemplate

3 Answers 94 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 30 Jan 2012, 06:24 AM
Hi Everyone,

I need help on how to pass a value to a textblock inside a rowdetailstemplate.
This is the draft structure of my xaml.


TextBlock.Text = "theusername" x:name = "txtusername"
Radgridview
    Radgridview RowDetails Template
       RadTabControl
            RadTabItem
                    <local:myusercontrol 
                                userid = "{Binding ElementName = txtusername,path = Text}"      ( i am passing the value to myusercontrol)
            RadTabItem
        RadTabControl       
    Radgridview RowDetails Template
Radgridview

Question : How to pass the value of Textblock "txtusername" to userid control inside the rowdetails template.

Thanks in advance.


3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 30 Jan 2012, 08:09 AM
Hello Robert,

Generally, you cannot use ElementName binding in data templates. What you can try is to expose a property containing the information for this user name and bind it to both the TextBox and the UserControl in the row details. 

All the best,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Robert
Top achievements
Rank 1
answered on 30 Jan 2012, 11:33 AM
Hi Maya,
Thanks for the reply.

Can you show me exactly what you mean ?.

0
Robert
Top achievements
Rank 1
answered on 01 Feb 2012, 08:53 AM
Hi Maya,
Let me rephrase my question.

How to make the userlogin id be global so that i can access anywhere in the application.
I have a userlogin id and i want to check the access level of that userid everytime the user writes, edit or delete or even write log records with the current user activities.

Thanks in advance.

a good sample will be a big help.

Tags
GridView
Asked by
Robert
Top achievements
Rank 1
Answers by
Maya
Telerik team
Robert
Top achievements
Rank 1
Share this question
or