Passing value to control inside rowdetailstemplate

4 posts, 0 answers
  1. Robert
    Robert avatar
    10 posts
    Member since:
    Oct 2011

    Posted 30 Jan 2012 Link to this post

    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.


  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 30 Jan 2012 Link to this post

    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 >>

  3. Robert
    Robert avatar
    10 posts
    Member since:
    Oct 2011

    Posted 30 Jan 2012 Link to this post

    Hi Maya,
    Thanks for the reply.

    Can you show me exactly what you mean ?.

  4. Robert
    Robert avatar
    10 posts
    Member since:
    Oct 2011

    Posted 01 Feb 2012 Link to this post

    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.

Back to Top