Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   Creating a custom control (ascx) with 'child' classes (http://www.velocityreviews.com/forums/t759443-creating-a-custom-control-ascx-with-child-classes.html)

Lenny 09-04-2003 12:35 AM

Creating a custom control (ascx) with 'child' classes
 
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:

<asp:DataGrid 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>
</asp:DataGrid>

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




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.