Re: CodeDomSerializer Property issue
From: Matt Miller (mmiller_at_gcsaustin.com)
Date: 09/15/04
- Previous message: VR: "Re: Custom controls + nested tags"
- In reply to: Matthew Miller via .NET 247: "CodeDomSerializer Property issue"
- Next in thread: Ken Cox [Microsoft MVP]: "Re: CodeDomSerializer Property issue"
- Reply: Ken Cox [Microsoft MVP]: "Re: CodeDomSerializer Property issue"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Sep 2004 19:24:44 GMT
Sorry about the duplicated posts, I thought .net 247 had lost my
messages
On Wed, 15 Sep 2004 11:51:23 -0700, Matthew Miller via .NET 247
<anonymous@dotnet247.com> wrote:
>I've created 2 custom web controls, a custom datalist and a paging control. The end user will drag a new instance of the datalist and paging control to the web form and then associate the datalist control with the paging control by setting a property. When this property is set I need the following code created
>
>InitializeComponent()
>{
>//
>//pagingControl1
>//
>pagingControl1.DataList = dataList1;
>pagingControl1.PageChanged += new PageChangedHandler(pagingControl1_PageChanged);
>}
>
>private void pagingControl1_PageChanged(object sender, PageChangedEventArgs e)
>{
> dataList1.PageIndex = e.PageIndex;
> dataList1.DataBind();
>}
>
>My solution to this was to create a custom Serializer/Deserializer and insert the code from there.
>
>The problem is that the serializer runs before the property is applied to the pageControl1. Running the BaseSerializer for this is no help since the serializer doesn't know how to apply the dataList1 value to the system. Do I need to use some sort of TypeConverter with an InstanceDescriptor? I tried setting that up but I don't understand how to specify the instance being passed in. All I really need to create the code shown is the string "dataList1" but I have no idea how to find that value.
>
>Thanks,
>
>Matt
>
>--------------------------------
>From: Matthew Miller
>
>-----------------------
>Posted by a user from .NET 247 (http://www.dotnet247.com/)
>
><Id>dbaVDxYxBUuVa8cVtuZ8rw==</Id>
- Previous message: VR: "Re: Custom controls + nested tags"
- In reply to: Matthew Miller via .NET 247: "CodeDomSerializer Property issue"
- Next in thread: Ken Cox [Microsoft MVP]: "Re: CodeDomSerializer Property issue"
- Reply: Ken Cox [Microsoft MVP]: "Re: CodeDomSerializer Property issue"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|