Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > persisting collection in a custom datagrid

Reply
Thread Tools

persisting collection in a custom datagrid

 
 
john_teague
Guest
Posts: n/a
 
      12-06-2005
I appologize for the cross-posting, but I received no responses from
the building controls group.

I have a custom control that inherits from a DataGrid control. I have
a property that has an arraylist of strings. I want to add items as a
child tag of the grid. How is the best way to do this. Here is what I
have as of now.


[ToolboxData("<{0}:OrdersDataGrid runat=server></{0}:OrdersDataGrid>"),

ParseChildren(true)]
public class OrdersDataGrid : System.Web.UI.WebControls.DataGrid
{
...
private ArrayList dataMethodParameter = null;
[Category("Data"),
Editor("System.Windows.Forms.Design.StringCollecti onEditor,
System.Design", "System.Drawing.Design.UITypeEditor, System.Drawing"),


DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content),

PersistenceMode(PersistenceMode.InnerProperty),
Description("Parameter to Pass to the selected OrdersProvider
Method")]
public ArrayList DataMethodParameter
{
get{return this.dataMethodParameter;}
set{this.dataMethodParameter = value;}
}
...



}


What I would like to happen is when items are added via the
StringCollectionEditor they are child items of the control
<cc1:OrdersDataGrid ... >
<DataMethodParameters>
<param>xxx</param>
<param>xxx</param>
...
</DataMethodParamters>

 
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
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Řyvind Isaksen ASP .Net 1 05-18-2007 09:24 AM
Persisting collection data of a webcontrol when leaving the collection editor in VS2005 mehdi.mousavi@gmail.com ASP .Net Building Controls 1 05-19-2006 03:49 PM
persisting collection in a custom datagrid john_teague ASP .Net 0 12-06-2005 11:04 PM
Persisting a collection property in a custom datagrid jcteague@gmail.com ASP .Net Building Controls 0 12-05-2005 09:09 PM
Update Custom Collection that is bound to DataGrid made up of Custom COlumns Terry Holland ASP .Net Datagrid Control 9 10-28-2005 06:20 AM



Advertisments