Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > UserControl in DataGrid

Reply
Thread Tools

UserControl in DataGrid

 
 
Kristoffer Renholm
Guest
Posts: n/a
 
      01-18-2004
Hi!

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

gear.aspx
Code:-----------------------------------------------------------------------
-------
<ucermissions id="ucPermissions" runat="server" GUID="<%#
((GearControl)Container.DataItem).ID %>"></ucermissions>
----------------------------------------------------------------------------
--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
http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting a property of a control inside a usercontrol, from another usercontrol Fabiano ASP .Net 2 06-03-2005 09:56 AM
accessing usercontrol from another usercontrol Phl ASP .Net 2 11-18-2004 07:33 PM
Access a control inside an usercontrol from another control inside another usercontrol nail ASP .Net 0 09-15-2004 03:55 PM
Can we use a usercontrol inside a usercontrol Rajesh Tiwari ASP .Net 0 08-12-2003 03:56 PM
Use LoadControl to load a usercontrol but the webcontrol in the usercontrol can not AutoPostBack huobazi ASP .Net 1 07-03-2003 03:14 AM



Advertisments