Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > GridViewDesigner null reference error

Reply
Thread Tools

GridViewDesigner null reference error

 
 
Sahil Haslani
Guest
Posts: n/a
 
      03-06-2007
I have a new control, that basically wraps a UpdatePanel and a GridView - so I can use it as a webpart. I want to expose the Gridview designer for this webpart. Is this possible? I have tried and run into various errors, since my control is not a gridview anymore...

[Designer(typeof(AspGridWebPartDesigner))]
public class AspGridWebPart : WebPart
{
GridView _AspGrid = new GridView();
UpdatePanel _UpdatePanel = new UpdatePanel();
}


public class AspGridWebPartDesigner : System.Web.UI.Design.WebControls.GridViewDesigner
{

public override void Initialize(System.ComponentModel.IComponent component)
{
AspGridWebPart aspGridWebPart = component as AspGridWebPart;
_AspGrid = aspGridWebPart.AspGrid;
_AspGrid.Site = component.Site;
base.Initialize(_AspGrid);
}


___
Newsgroups brought to you courtesy of www.dotnetjohn.com
 
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
ASPX page jscript rt error: null is null or not an object Cirene ASP .Net 1 06-09-2008 07:59 PM
"stringObj == null" vs "stringObj.equals(null)", for null check?? qazmlp1209@rediffmail.com Java 5 03-29-2006 10:37 PM
I've got a Null Reference Exception Error... help me out~! ¿À¼º¿µ ASP .Net 1 02-09-2006 12:16 AM
confused about null reference compile error Steve Richter ASP .Net 4 04-26-2005 05:30 PM
sometimes we get Object reference to NULL error blash ASP .Net 6 12-29-2004 05:31 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57