Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / HTML

GenericWebDataGrid

2.68/5 (8 votes)
14 Oct 2007CPOL1 min read 1   188  
GenericWebDataGrid is a web based editable grid control creator. You can add an EditableTextColumn or an EditableDropDownColumn. It is easy to use and AJAX enabled.

Screenshot - grid3.jpg

Introduction

GenericWebDataGrid is a web based editable grid control that helps you easily add EditableTextColumns and EditableDropDownColumns. It uses AJAX, so updating the database is fast. A generic alert message is displayed on the page only for a few seconds (not necessary to click of OK), and is useful and user friendly.

About the Code

AddEditableColumn: This function helps you add an EditableTextColumn. It requires the following parameters:

  • Table: The table which will be updated.
  • ColumnName: The column which will be updated.
  • ColumnType: The is important for the update string, and can be Number or String.
  • PK: PrimaryKey of the table.
  • Required: If the column is optional or not.
  • Size: The size of the column.
  • Continues: Decides the functionality of the tab after the update.

Image 2

AddEditableComboColumn: This function helps you add an EditableDropDownColumn. It requires the following parameters:

  • Table: The table which will be updated.
  • ColumnName: The column which will be updated.
  • ColumnType: The column type is important for the update string, and can be Number or String.
  • PK: PrimaryKey of the table.
  • Required: If the column is optional or not.
  • Size: The size of the column.
  • Continues: Decides the functionality of the tab after the update.
  • Comborows: The items in the dropdown column.

Image 3

Screenshots

Screenshot - Grid1.jpg

Picture 1 - Screen

Screenshot - Grid2.jpg

Picture 2 - EditableTextBoxColumn

Screenshot - grid3.jpg

Picture 3 - EditableComboBoxColumn

Screenshot - gridError.jpg

Picture 4 - Error Message

Please do not hesitate to ask any questions: ykocdag80@yahoo.com.

License

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