ksfok
asked on
Gridview class object
Given a gridview class file as follows:
using System;
using System.Collections.Generic ;
using System.Text;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.ComponentModel;
using System.Collections;
using System.Collections.Special ized;
using System.Web;
namespace RealWorld.Grids
{
/// <summary>
/// BulkEditGridView allows users to edit multiple rows of a gridview at once, and have them
/// all saved.
/// </summary>
[
DefaultEvent("SelectedInde xChanged") ,
Designer("System.Web.UI.De sign.WebCo ntrols.Gri dViewDesig ner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d 50a3a"),
ControlValueProperty("Sele ctedValue" ),
]
public class BulkEditGridView : System.Web.UI.WebControls. GridView
{
//key for the RowInserting event handler list
public static readonly object RowInsertingEvent = new object();
private List<int> dirtyRows = new List<int>();
private List<int> newRows = new List<int>();
/// <summary>
/// Default Constructor
/// </summary>
public BulkEditGridView()
{
}
/// <summary>
/// Modifies the creation of the row to set all rows as editable.
/// </summary>
/// <param name="rowIndex"></param>
/// <param name="dataSourceIndex"></p aram>
/// <param name="rowType"></param>
/// <param name="rowState"></param>
/// <returns></returns>
protected override GridViewRow CreateRow(int rowIndex, int dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState)
{
return base.CreateRow(rowIndex, dataSourceIndex, rowType, rowState | DataControlRowState.Edit);
}
.....
How can it be simply used to instantiate a gridview without adding its DLL into VS2005 toolbox? This is to avoid more work and maintenance. Thanks.
using System;
using System.Collections.Generic
using System.Text;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.ComponentModel;
using System.Collections;
using System.Collections.Special
using System.Web;
namespace RealWorld.Grids
{
/// <summary>
/// BulkEditGridView allows users to edit multiple rows of a gridview at once, and have them
/// all saved.
/// </summary>
[
DefaultEvent("SelectedInde
Designer("System.Web.UI.De
ControlValueProperty("Sele
]
public class BulkEditGridView : System.Web.UI.WebControls.
{
//key for the RowInserting event handler list
public static readonly object RowInsertingEvent = new object();
private List<int> dirtyRows = new List<int>();
private List<int> newRows = new List<int>();
/// <summary>
/// Default Constructor
/// </summary>
public BulkEditGridView()
{
}
/// <summary>
/// Modifies the creation of the row to set all rows as editable.
/// </summary>
/// <param name="rowIndex"></param>
/// <param name="dataSourceIndex"></p
/// <param name="rowType"></param>
/// <param name="rowState"></param>
/// <returns></returns>
protected override GridViewRow CreateRow(int rowIndex, int dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState)
{
return base.CreateRow(rowIndex, dataSourceIndex, rowType, rowState | DataControlRowState.Edit);
}
.....
How can it be simply used to instantiate a gridview without adding its DLL into VS2005 toolbox? This is to avoid more work and maintenance. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER