Google Brother Up

Showing posts with label SelectedIndexChanged. Show all posts
Showing posts with label SelectedIndexChanged. Show all posts

2008/02/21

The GridView 'gvManageProducts' fired event RowDeleting which wasn't handled.

To solve this exception do these:-

protected void gvManageProducts_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
//required -do not remove
}

and also write this:-

protected void gvManageProducts_SelectedIndexChanged(object sender, EventArgs e)
{
//required -do not remove
}

2008/01/04

Get Row Index with Gridview Select Button

When you autoGenerate a Select button with a Gridview, to find the RowIndex for that particular row, you can use the SelectedIndexChanged Event.

Inside that event, try something like this (with a label called 'Label1':

Dim row As GridViewRow = MyGridView.SelectedRow
Dim intRow as Integer=Row.RowIndex
label1.text=intRow.ToString

or


GridViewRow gvr = new GridViewRow();
gvr = dgdManageUsers.SelectedIndex;
int introw = gvr.RowIndex;
label1.text=intRow.ToString;

Drop Down List

1. http://www.janetsystems.co.uk/Articles/NetArticles/tabid/74/itemid/161/modid/449/Default.aspx