Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Dev sOs Net

Dev sOs Net Logo Dev sOs Net Logo

Dev sOs Net Navigation

  • Home
  • About Us
  • Dev Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • About Us
  • Dev Blog
  • Contact Us
Home/ Questions/Q 106
Next
Answered

Dev sOs Net Latest Questions

Dev
  • 2
  • 2
DevTeacher
Asked: April 18, 20182018-04-18T21:32:49+00:00 2018-04-18T21:32:49+00:00In: 3. Windows Hosting, 3.2. ASP.NET Nutshell, Knowledge Base

ASP.NET Cookbook – Recipe 1.1 Selecting the Right Tabular Control

  • 2
  • 2

Problem

You want to use an ASP.NET control to display some data in a tabular
format?

6. ASP.NET AuthorGeoffrey T. LeBlondMichael A. Kittel
  • 1 1 Answer
  • 48 Views
  • 1 Follower
  • 2
Share
  • Facebook
  • Report
Leave an answer

Leave an answer
Cancel reply

Browse


1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Michael A. Kittel, Geoffrey T. LeBlond
    Best Answer
    Michael A. Kittel, Geoffrey T. LeBlond
    2018-04-18T21:33:21+00:00Added an answer on April 18, 2018 at 9:33 pm
    This answer was edited.

    Solution

    Use a Repeater, DataList, or DataGrid control. Always choose the
    smallest and fastest control that meets your needs, which invariably
    will be influenced by other criteria. For example:
    If you need a quick and easy solution
    Use a DataGrid.
    If you need a lightweight read-only tabular display
    Use a Repeater.
    If you need your solution to be small and fast
    Use a Repeater (lightest) or DataList (lighter).
    If you want to use a template to customize the appearance of the
    display
    Choose a Repeater or DataList.
    If you want to select rows or edit the contents of a data table
    Choose a DataList or a DataGrid.
    If you want built-in support to sort your data by column or paginate
    its display
    Choose a DataGrid.

    Discussion

    ASP.NET provides three excellent options for displaying tabular
    dataRepeater, DataList, and DataGridbut each comes with tradeoffs.
    For instance, the DataGrid control is particularly versatile, but
    you can pay a heavy price in terms of performance. On the flip side,
    the Repeater control is lighter weight, but is for read-only display; if you later decide you need to edit your data, you must rework your
    code to use the DataList or DataGrid control instead (unless, of
    course, you want to embark on your own custom coding odyssey).
    The impact on performance is due to the fact that ASP.NET creates an
    actual control for every element of a DataGrid control, even
    whitespace, which is built as a Literal control. Each of these
    controls is then responsible for rendering the appropriate HTML
    output. The DataGrid is, therefore, the heavyweight of the grid
    control group, because of the server processing required to build the
    applicable output. The DataList is lighter and the Repeater lighter
    still.
    Table 1-1 summarizes the built-in features supported by the tabular
    controls and only includes controls that support data binding. (A
    standard Table control is not included because it does not inherently
    support data binding, even though individual controls placed in a
    table can be data bound.) With custom code, there are virtually no
    limits to what you can do to modify the behavior of these controls.
    Table 1-1. Comparative summary of native tabular
    control features Performance issues aside, there are some other aspects to consider
    when choosing a tabular control. As a general rule, the DataGrid
    works extraordinarily well for a quick-and-dirty tabular display (see
    Recipe 1.2) and for other situations in which you think you’ll be
    reasonably satisfied with its default appearance and behavior. Indeed,
    because the DataGrid is so versatile, this chapter provides many
    recipes for modifying and adapting it. However, if you anticipate
    needing a lot of flexibility in controlling the organization and layout of
    the tabular display or you do not need to edit or paginate the data,
    you may want to consider using the DataList or Repeater instead.
    For example, Recipe 1.3 shows how you can use templates to
    organize and enhance the output of a tabular display. Take a look at
    that recipe’s output (Figure 1-2) to see what we’re driving at. Some
    up-front planning in this respect can save you considerable time and
    effort down the road.

      • 2
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 10
  • Answers 10
  • Best Answers 7
  • User 1
  • Popular
  • Answers
  • Dev

    Apache Cookbook - Recipe 1.1 Installing from Red Hat Linux’s ...

    • 1 Answer
  • Dev

    Linux Cookbook - Recipe 1.1 Introduction

    • 1 Answer
  • Dev

    PHP Cookbook - Recipe 1.1 Introduction

    • 1 Answer
  • Martin Hope
    Martin Hope added an answer They might be as confused as to why you keep… April 19, 2018 at 2:07 am
  • Marko Smith
    Marko Smith added an answer I have never heard a British person EVER call a… April 19, 2018 at 2:07 am
  • Barry Carter
    Barry Carter added an answer Calling a bread roll a “biscuit” really takes the biscuit.… April 19, 2018 at 2:07 am

Related Questions

  • SQL Cookbook - Recipe 1.1 Retrieving All Rows and Columns ...

    • 1 Answer
  • Visual Basic Cookbook - Recipe 1.1 Creating a Windows Forms ...

    • 1 Answer
  • C# Cookbook - Recipe 1.1 Determining Approximate Equality Between a ...

    • 1 Answer
  • Windows Server Cookbook - Recipe 1.1 Introduction

    • 1 Answer
  • WordPress Manual - Recipe 1.1 How WordPress Works

    • 1 Answer

Top Members

Dev

Dev

  • 10 Questions
  • 82 Points
Teacher

Trending Tags

1. Linux Author 4. WordPress Author 5. Windows Server Author 6. ASP.NET Author 7. SQL Author Adam Trachtenberg Anthony Molinaro Carla Schroder David Sklar Geoffrey T. LeBlond Jay Hilyard John Clark Craig Ken Coar Matthew MacDonald Michael A. Kittel Paul DuBois Rich Bowen Robbie Allen Stephen Teilhet Tim Patrick

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Find Solutions

Footer

Dev sOs Net

Dev sOs Net

Develop
Share Online Solution Network

sOs Net

  • About Us
  • About Team

Legal Agreement

  • Privacy Policy
  • Terms and Conditions

User Support

  • Knowledge Base
  • Contact Us

Follow Us

Copyright © Dev sOs Net. All rights reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.