Hi joteke - thanks for your reply.
Custom Control
*************
namespace DataGridDisplay
{
// A delegate type for hooking up change notifications.
public delegate void DataGridSelectedIndexChanged(object sender, EventArgs e);
public class Display : System.Web.UI.WebControls.DataGrid
{ ...
/// <summary>
/// Public method to allow the binding of data to the grid.
/// After the caller has set all the relevant properties, this method should be called to bind the data.
/// This method calls out to private methods to perform the processing.
/// </summary>
public void BindTheDataGrid()
{ ...works fine ...}
#region Paging Event
/// <summary>
/// Handles the event when the user clicks paging.
/// </summary>
/// <param name="e">DataGridPageChangedEventArgs e Standard System argument</param>
protected override void OnPageIndexChanged(DataGridPageChangedEventArgs e)
{
// Clear any selections
this.SelectedIndex=-1;
// Assign the DataGrid page to the clicked number
this.CurrentPageIndex = e.NewPageIndex;
// Rebind the data to the DataGrid
BindDataGrid();
}
#endregion // Paging Event
protected override void OnSelectedIndexChanged(EventArgs e)
{
base.OnSelectedIndexChanged (e);
... now i would like to capture when the SelectedIndex changes ...
}
} // End class Display
A cut down snippet. As you can see, the OnPageIndexChanged override is working fine. I would like to perform some processing when the user changes their row selection. But the SelectedIndexChanged is just NOT firing.
The custom control is placed on a webform.
any ideas?
kind regards
Scott