Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Creating a custom control (ascx) with 'child' classes

Reply
Thread Tools

Creating a custom control (ascx) with 'child' classes

 
 
Lenny
Guest
Posts: n/a
 
      09-04-2003
Hello,

I have an html table template which I want to turn into ASP.NET custom
control. I want to utilize the best features of OOP. I want to be able to
create columns headings dynamically, add buttons to the footer of the table,
etc. A datagrid control wont work for me, because I want to have custom
buttons images for paging and sorting.
Here is one thing I have the most difficulty with:

I need a way to have a "master" custom table tag and then "child" columns
tags. The same concept as datagrid:

<aspataGrid id="myDataGrid" runat="server">
<Columns>
<asp:BoundColumn DataField="ProductName" HeaderText="Product
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="UnitPrice" HeaderText="Unit
Price"></asp:BoundColumn>
<asp:BoundColumn DataField="UnitsInStock" HeaderText="Stock
Level"></asp:BoundColumn>
</Columns>
</aspataGrid>

So my custom controls would look something like:

<myCustomC:myData id="myDataTable" runat="server">
<myCustomC:column heading="Product Name" color="red"></myCustomC:column>
<myCustomC:column heading="UnitPrice" color="red"></myCustomC:column>
</myCustomC:myData>

Any ideas?

Thank you


 
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
"Error Creating Control" when creating a custom control (Design Time). Can't see tooltip message. Ravi Ambros Wallau ASP .Net Web Controls 0 06-01-2005 02:36 PM
"Error Creating Control" when creating a custom control (Design Time). Can't see tooltip message. Ravi Ambros Wallau ASP .Net 0 06-01-2005 02:36 PM
Creating a custom control (ascx) with 'child' classes Lenny ASP .Net Web Controls 0 09-04-2003 12:35 AM
Creating a custom control (ascx) with 'child' classes Lenny ASP .Net Datagrid Control 0 09-04-2003 12:35 AM
Creating a custom control (ascx) with 'child' classes Lenny ASP .Net 0 09-04-2003 12:35 AM



Advertisments