Click here to Skip to main content
15,888,218 members
Articles / Web Development / ASP.NET
Article

Implementing Name/Value Pair using DBGrid and DataView

Rate me:
Please Sign up or sign in to vote.
2.33/5 (3 votes)
3 Mar 2008CPOL2 min read 21.6K   146   15  
A utility for managing Name/Value pair data in a Web Form Applicateion

Introduction

  1. First of all the requirements for this project was partially taken from codeproject. So I took their requirement for a job they posted on their site and put 95% of the requirements into code. Name/Value pairs are to be entered into the upper DataGrid. This DataGrid is used for adding and filtering Name/Value pairs.
  2. When the ‘Add’ button is pressed the Name/Value pair in the textbox is validated, and then if it passes validation it is added to the DataGrid below. The Name/Value pair entry format is shown below:
  3. <name> = <value>
  4. Where <name> is the name portion of the pair, and <value> is the value portion of the pair. Only valid Name/Value pairs can be added. Names and Values can contain only alpha-numeric characters. The equal-sign is used to delimit the pair, spaces before and/or after the equal-sign may be entered as padding at the end-users discretion.
  5. When the ‘Sort by Name’ button is pressed the list will be sorted ascending by Name.
  6. When the ‘Sort by Value’ button is pressed the list will be sorted ascending by Value.
  7. When the ‘Delete’ button is pressed all selected items in the DataGrid will be deleted.
  8. When the ‘Filter’ button is pressed, only the Name/Value pairs that match the filter criteria will be shown in the DataGrid. The search criteria will be taken from the textbox.

    Filters have the following format (and are similar to the Name/Value format):

    <type> = <value>

    Where <type> is either Name or Value, and <value> is a string used for matching against the given type. 

     

Background

No Background Article

Using the code

Simply create virtual directory and compile source.

Points of Interest

The use of a Data Grid in place of a List Box, is more powerful than a simple list box. More features, more power

History

I will be posting updates to this article some next week.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Cox Telecommunication
United States United States
15+ years Information System and Software Development experience.
Currently Senior Software Engineer @ Cox Telecommunication Hamptons Roads.

Qualification:
1.Master of Science Electronic Commerce Development.
2.Microsoft Certified Application Developer (MCAD)
3.Brain Bench Certified .Net Developer

Currently persuiting my PMP from PMI.org. Should be taking the exam in 2 months.
This is a Collaborative Group (No members)


Comments and Discussions

 
-- There are no messages in this forum --