Deselect first row on gridview onload

Posted by Suresh Behera on ASP.net Weblogs See other posts from ASP.net Weblogs or by Suresh Behera
Published on Sat, 22 May 2010 08:49:52 GMT Indexed on 2010/05/22 8:51 UTC
Read the original article Hit count: 436

Filed under:
|
|
I had situation to deselect the first gridview row on load and came to know IsSynchronizedWithCurrentItem on Gridview should able to that but some how i missed on gridview. Mean while below one should work void gvMain_RowLoaded( object sender, RowLoadedEventArgs e) { try { GridViewRow row = e.Row as GridViewRow; if (row != null && !firstItemExpanded) { row.DetailsVisibility = Visibility.Collapsed; firstItemExpanded = false ; } } catch (Exception ex) { throw ex; } } .csharpcode, .csharpcode...(read more)

© ASP.net Weblogs or respective owner

Related posts about .NET

Related posts about wpf