473,395 Members | 1,678 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,395 software developers and data experts.

Use of Data Web Controls

Joe
Hello All:

I populate a datatable and want to display information in a table on a
webform. The information in a single row within the table, however, is not
necessarily located in a single datarow within the datatable. It may be in
two or more datarows.

Can I use any of the three web controls (repeater, datalist or datagrid) to
render the table in which the data displayed in a row comes from more than
one datarow?

My impression is that these control s are designed to "show one record at a
time" instead of allowing the developer to merge information into a table row
from more than one record.

Any insights are welcome.

TIA,
--
Joe
Mar 15 '06 #1
3 978
All those controls are designed to do something for every row. With the
option of doing something doing for alternating rows. But that's about it.

It's hard to imagine writing a generic control that can bind to data, but
can somehow treat sets of rows as one display row. And being able to allow a
generic way for the developer to specify how to figure out what the sets of
rows are, and how to handle each set to still render one visible row in the
control.

My recommendation would be to manipulate your data into being a 1 to 1
between the datarow and the control row if you want to use the built in web
controls. Or, I think you are on your own regarding displaying your data.
You would have to create dynamic controls manually and add them to your
page.

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:55**********************************@microsof t.com...
Hello All:

I populate a datatable and want to display information in a table on a
webform. The information in a single row within the table, however, is
not
necessarily located in a single datarow within the datatable. It may be
in
two or more datarows.

Can I use any of the three web controls (repeater, datalist or datagrid)
to
render the table in which the data displayed in a row comes from more than
one datarow?

My impression is that these control s are designed to "show one record at
a
time" instead of allowing the developer to merge information into a table
row
from more than one record.

Any insights are welcome.

TIA,
--
Joe

Mar 15 '06 #2
Joe
Marina,

Thanks. That's what I thought. I'll start typing....
--
Joe
"Marina Levit [MVP]" wrote:
All those controls are designed to do something for every row. With the
option of doing something doing for alternating rows. But that's about it.

It's hard to imagine writing a generic control that can bind to data, but
can somehow treat sets of rows as one display row. And being able to allow a
generic way for the developer to specify how to figure out what the sets of
rows are, and how to handle each set to still render one visible row in the
control.

My recommendation would be to manipulate your data into being a 1 to 1
between the datarow and the control row if you want to use the built in web
controls. Or, I think you are on your own regarding displaying your data.
You would have to create dynamic controls manually and add them to your
page.

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:55**********************************@microsof t.com...
Hello All:

I populate a datatable and want to display information in a table on a
webform. The information in a single row within the table, however, is
not
necessarily located in a single datarow within the datatable. It may be
in
two or more datarows.

Can I use any of the three web controls (repeater, datalist or datagrid)
to
render the table in which the data displayed in a row comes from more than
one datarow?

My impression is that these control s are designed to "show one record at
a
time" instead of allowing the developer to merge information into a table
row
from more than one record.

Any insights are welcome.

TIA,
--
Joe


Mar 15 '06 #3
Joe,

Theoretically you can use PreRender event to go through the fully built web
control, merge several rows into one and hide the ones you used up for
merging. But I would take a cleaner way of creating another datatable with
merged data and databinding to this table.

Eliyahu

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:55**********************************@microsof t.com...
Hello All:

I populate a datatable and want to display information in a table on a
webform. The information in a single row within the table, however, is
not
necessarily located in a single datarow within the datatable. It may be
in
two or more datarows.

Can I use any of the three web controls (repeater, datalist or datagrid)
to
render the table in which the data displayed in a row comes from more than
one datarow?

My impression is that these control s are designed to "show one record at
a
time" instead of allowing the developer to merge information into a table
row
from more than one record.

Any insights are welcome.

TIA,
--
Joe

Mar 15 '06 #4

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

Similar topics

7
by: Dica | last post by:
i've used the sample code from msdn to create an encyption/decryption assembly as found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT10.asp i'm...
0
by: popsovy | last post by:
Hi I have a question about whether Data Binding can facilitate the process of saving data in a web application I learned that you can data bind information from a number of different data...
5
by: jqpdev | last post by:
Hello all... I'm coming from a Borland Delphi background. Delphi has a specific component called a Data Module. In the designer the Data Module behaves like a windows form. A developer can...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
5
by: yma | last post by:
Hello, I tried to display a column in MS Access 2000 nwind.mdb using 3 data controls. But I got "It is already opened exclusively by another user, or you need permission to view its data." I...
7
by: Andrew McKendrick | last post by:
Hi, I've noticed a bug in VB.NET (latest .NET Framework)... - I have a TabControl on a form with several tabs. - Each tab contains text boxes that are bound to fields in a data source...
0
by: Eric Sabine | last post by:
OK, I'm trying to further my understanding of threading. The code below I wrote as kind of a primer to myself and maybe a template that I could use in the future. What I tried to do was pass data...
10
by: Doug Bell | last post by:
Hi, I have an application that has a "Data Access Class" and "User Interface Class". It is for receiving Purchase Order data from one system and pushing processed transactions to another...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.