Click here to Skip to main content
Licence CPOL
First Posted 3 Mar 2008
Views 10,049
Downloads 40
Bookmarked 15 times

Implementing Name/Value Pair using DBGrid and DataView

By | 3 Mar 2008 | Article
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)

About the Author

Matthew Taylor

Software Developer
Cox Telecommunication
United States United States

Member

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.


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 3 Mar 2008
Article Copyright 2008 by Matthew Taylor
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid