Velocity Reviews

Velocity Reviews (
-   ASP .Net Datagrid Control (
-   -   Creating a custom control (ascx) with 'child' classes (

Lenny 09-04-2003 12:35 AM

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

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:

<asp:DataGrid id="myDataGrid" runat="server">
<asp:BoundColumn DataField="ProductName" HeaderText="Product
<asp:BoundColumn DataField="UnitPrice" HeaderText="Unit
<asp:BoundColumn DataField="UnitsInStock" HeaderText="Stock

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>

Any ideas?

Thank you

All times are GMT. The time now is 07:57 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.