Choosing a parent class for and binding data to custom grid controls and

D

David Alexander

I have embedded datagrid to code. For each row in the parent grid, a child
grid will be inserted in the row just below it. So if the parent grid was
orders, under each row in the parent grid, a child grid with items in the
order would be inserted. A combination of a 2-level tree view and a
datagrid. I need to display the data all at once, not link to subtables
using the provided functionality

I have the HTML that I want served up and I can reverse-engineer the control
to serve up the right HTML.

I have seen an example embedded datagrid that inserts tables into table
rows, but I don't like the results. "Compound tables" make formatting
difficult and awkward. I want a single table formatted with CSS, rowspan,
colspan, and a few other attributes.

Should I derive my control from System.Web.UI.WebControls.WebControl or
System.Web.UI.WebControls.BaseDataList?

Secondly, assuming I have chosen the correct base class, how I should bind
data to the control? Since I am binding two different tables (connected by a
data relation) to one control, can I override the databind method of the
parent class? I figure, worst case, I can just iterate through the rows in
the parent and child tables and just insert each DataSet value in a <td>
tags, but I suspect that might be something easier and more efficient for
poor IIS.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top