Ask a Question related to ASP.NET Building Controls, Design and Development.
-
I am Sam #1
Building a custom table control
Hi Everyone,
I am new to Server control development and I need some serious help with
something. I want to build a control that will allow the developer using the
control to define columns so I am building a composit control and inheriting
from the Table web control. My problem is how do I set up the control so
that columns can be set at design time much like
<asp:Table...>
<asp:TableRow ...>
<asp:TableCell...></asp:TableCell>
<asp:TableCell...></asp:TableCell>
</asp:TableRow>
</asp:Table>
I need to set it up so that the site developer can impliment a new table
cell in design time. Can someone please point me in the right direction?
Thank you
I am Sam Guest
-
Building a control adapter for a custom control
Folks, Has anyone tried to build a webcontrol adapter for a custom control (from a 3rd party)? All the examples I have looked at (including those... -
Methods for building Web Custom Control that emits Javascript
Hi: Someone knows if exists some method for sketches, as with UML, the development of a Web Custom Control that emits Javascript? Agile... -
Building a custom control with nested templates
Hi, I'm trying to create a templated custom asp.net server control with nested templates and I'm having some problems in getting the nesting to... -
Building a custom control that implement table server control
Hi, I want to create a custom control that implements the table htmlcontrol. In my webform page I want to include that custom control and add... -
Using Table control in a custom composite control. Control does not render properly in design time.
All, I have written a very simple custom composite control that includes a control of type System.Web.UI.WebControls.Table. The control... -
Martin #2
Re: Building a custom table control
Hi Sam,
What you probably need to do is define two public properties
private int _numberOfCells
int numberOfCells
{
get{...;}
set {...;}
}
private int _numberOfRows
int numberOfRows
{
get{...;}
set {...;}
}
then you need to set these properties when you instantiate the server
controls either in the html mark up or programatically.
then you can just write a for loop (probabally a nested one)
and for each iteration write out a new cell (for a row or a column.)
as a server controls has no design time HTML interface like a user control
you will have to produce the output programatically.
HTH
cheers
martin.
"I am Sam" <IamSam@discussions.microsoft.com> wrote in message
news:C048B369-DDCD-45EA-AD4D-5F16B362096E@microsoft.com...> Hi Everyone,
>
> I am new to Server control development and I need some serious help with
> something. I want to build a control that will allow the developer using
> the
> control to define columns so I am building a composit control and
> inheriting
> from the Table web control. My problem is how do I set up the control so
> that columns can be set at design time much like
> <asp:Table...>
> <asp:TableRow ...>
> <asp:TableCell...></asp:TableCell>
> <asp:TableCell...></asp:TableCell>
> </asp:TableRow>
> </asp:Table>
>
> I need to set it up so that the site developer can impliment a new table
> cell in design time. Can someone please point me in the right direction?
>
> Thank you
Martin Guest



Reply With Quote

