using System;
using System.Web.UI.WebControls;
using System.Data;
/*
* The Control assumes the following:
*
* 1) It is bound to a DataView object.
* 2) The app will use direct SQL commands to update the source (NO batch update).
* 3) No custom paging is enabled.
*
* If you plan to support sorting, then some aspects of this code should be reviewed
* and adapted.
*
*/
namespace BWSLib
{
namespace Controls
{
public class EditableGrid : DataGrid
{
// Constructor that sets some styles and graphical properties
public EditableGrid()
{
AllowFullEditing = true;
AddNewRow = false;
RejectChanges = false;
MustInsertRow = false;
AllowPaging = true;
// Handlers
Init += new EventHandler(OnInit);
PageIndexChanged += new DataGridPageChangedEventHandler(OnPageIndexChanged);
ItemCreated += new DataGridItemEventHandler(OnItemCreated);
CancelCommand += new DataGridCommandEventHandler(OnCancelCommand);
EditCommand += new DataGridCommandEventHandler(OnEditCommand);
&n
using System.Web.UI.WebControls;
using System.Data;
/*
* The Control assumes the following:
*
* 1) It is bound to a DataView object.
* 2) The app will use direct SQL commands to update the source (NO batch update).
* 3) No custom paging is enabled.
*
* If you plan to support sorting, then some aspects of this code should be reviewed
* and adapted.
*
*/
namespace BWSLib
{
namespace Controls
{
public class EditableGrid : DataGrid
{
// Constructor that sets some styles and graphical properties
public EditableGrid()
{
AllowFullEditing = true;
AddNewRow = false;
RejectChanges = false;
MustInsertRow = false;
AllowPaging = true;
// Handlers
Init += new EventHandler(OnInit);
PageIndexChanged += new DataGridPageChangedEventHandler(OnPageIndexChanged);
ItemCreated += new DataGridItemEventHandler(OnItemCreated);
CancelCommand += new DataGridCommandEventHandler(OnCancelCommand);
EditCommand += new DataGridCommandEventHandler(OnEditCommand);
&n
| 对此文章发表了评论 |

