473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
Nov 17 '05 #1
0 1481

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Albinas | last post by:
Dear all, I am a beginner in VB.NET and I have just taken the course 2565. (So, you can see how fresh I am.) I am creating a custom textbox and adding some new attributes to the textbox. ...
3
by: Eric Sabine | last post by:
I've created a custom control (ascx) which contains a tree view, a drop down list, and a listbox. The custom control is included in a web form and at runtime, won't compile (I get the...
5
by: Paul | last post by:
Hi I have a custom control and am using as a menu on webpages, just wondering if there is a way to position it differently on different pages, perhaps some code in the page load event? thanks, --...
0
by: Julien | last post by:
Hi ! I'm creating a custom control, in which I would render an image with client-side script code to display/hide a calendar control which also belong to my custom control. In this control I've...
1
by: Akira | last post by:
Could someone please help me how to create a custom control like below: <myControl:Article id="cmTest" runat=server> <Title>Test title here</Title> <Content> some content some content...
11
by: Nick Gilbert | last post by:
Hi, How can I create a custom control which will wrap its content in a header and footer? eg: Is it possible to create a .NET user control which can surround other controls? eg:...
0
by: archana | last post by:
Hi all, Can anyone tell me what is use of implementing INamingContainer interfece. I am very much confused about this interface as it has to methods to implement. any help will be truely...
1
by: Isai | last post by:
Hello, I am using VB.NET in Visual Studio 2005 to develop ASP.NET 2.0 web applications. I am developing a control library with all the custom controls that I can use in my projects. One of the...
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.