UserControl in DataGrid

Discussion in 'ASP .Net Datagrid Control' started by Kristoffer Renholm, Jan 18, 2004.

  1. Hi!

    I got some problem with my DataGrid. I'm trying to load a UserControl inside
    my DataGrid EditItemTemplate.

    gear.aspx
    Code:-----------------------------------------------------------------------
    -------
    <uc:permissions id="ucPermissions" runat="server" GUID="<%#
    ((GearControl)Container.DataItem).ID %>"></uc:permissions>
    ----------------------------------------------------------------------------
    --permissions.ascx.cs

    kod:------------------------------------------------------------------------
    ------
    private Security.Permissions permissions;

    public Guid GUID
    {
    get { return guid; }
    set { guid = value; }
    }
    private void Page_Load(object sender, ystem.EventArgs e)
    {
    permissions = new Security.Permissions(GUID); // Permission doesn't accept
    Guid.Empty
    if (!Page.IsPostBack)
    Bind();
    }

    private void Bind()
    {
    dlPermissions.DataSource = permissions;
    dlPermissions.DataBind();
    }
    ----------------------------------------------------------------------------
    --The problem is that GUID always will be Guid.Empty, because of the the
    propertie will be set after Page_Load. How do I correct this?

    Thanks in advance...

    --
    Kristoffer Renholm
     
    Kristoffer Renholm, Jan 18, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. huobazi
    Replies:
    1
    Views:
    740
    David Waz...
    Jul 3, 2003
  2. Rajesh Tiwari

    Can we use a usercontrol inside a usercontrol

    Rajesh Tiwari, Aug 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    442
    Rajesh Tiwari
    Aug 12, 2003
  3. nail
    Replies:
    0
    Views:
    1,579
  4. Phl
    Replies:
    2
    Views:
    548
    =?Utf-8?B?VGFtcGEgLk5FVCBLb2Rlcg==?=
    Nov 18, 2004
  5. Fabiano
    Replies:
    2
    Views:
    650
    =?Utf-8?B?c3Jpbmk=?=
    Jun 3, 2005
Loading...

Share This Page