It depends on your definition of a "new GridView". The answer is yet, but at a cost.
If you base your control on WebControl, you can write a new grid control with any functionality. Somehow, I don't think this is what you have in mind.
If you want to inherit from the existing GridView and add extra controls, then it is also doable, but with heavy limitations. The reason is because GridView's implementation breaks every possible guideline for extensibility. I guess because they never meant it to be extended. For instance, they clear Controls collection almost on every occasion and explicitly expect for the Controls[0] to be a Table. I suppose, if you decide to stay within confines of the table layout (header, footer and all), then you may have more room to play.
Finally, you could create a wrapper, which has a GridView as its private member and simply expose everything you may need plus more. But that gets ugly very quickly.
Here is a crude demonstration (working) of the second approach. Note that the drop down is at the end. You can override the Render method, but you'd have to recreate a lot of MS code.
ExtendedGridView
public class ExtendedGridView : GridView
{
protected DropDownList DropDown { get; set; }
public ExtendedGridView() : base()
{
this.DropDown = new DropDownList();
this.DropDown.Items.Add("white");
this.DropDown.Items.Add("red");
this.DropDown.Items.Add("blue");
this.DropDown.Items.Add("green");
this.DropDown.AutoPostBack = true;
this.DropDown.ID = "dropdown";
this.DropDown.SelectedIndexChanged += new EventHandler(DropDown_SelectedIndexChanged);
}
void DropDown_SelectedIndexChanged(object sender, EventArgs e)
{
BackColor = System.Drawing.Color.FromName(this.DropDown.SelectedValue);
}
protected override int CreateChildControls(System.Collections.IEnumerable dataSource, bool dataBinding)
{
int itemCount = base.CreateChildControls(dataSource, dataBinding);
Controls.Add(this.DropDown);
return itemCount;
}
}
SomePage.aspx
<%@ Register TagPrefix="my" Namespace="MyProject" Assembly="MyProject" %>
<my:ExtendedGridView id="myGridView" runat="server" onpageindexchanging="myGridView_PageIndexChanging"></my:ExtendedGridView>
SomePage.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
myGridView.DataSource = new string[] { "aaa", "bbb", "ccc", "ddd", "eee" };
myGridView.AllowPaging = true;
myGridView.PageSize = 2;
myGridView.DataBind();
}
protected void myGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
myGridView.PageIndex = e.NewPageIndex;
myGridView.DataBind();
}