Could you please help me?
I am using VS 2008 to build a web part that uses a SPGridView to display regions (from a SP list) that are associated with the current user (sUsername). The target system is MOSS 2007.
When the user selects a region, I want to hide the SPGridview, display the region selected and pass the sUsername and sRegion to the next web part.
The problem is, when the user clicks on the button, nothing happens.
I have tried adding handlers for RowCommand and SelectedIndexChanging - but neither causes the target Sub to be executed. I have tried using the RowCommand and SelectedIndexChanging alone with different button types.
Here is the code. This is within RenderContents because I am checking _provider to get the data from the previous web part.
Why won't the Subs defined in the handlers execute?
' set up data source for spGridview
Dim dataSource As New DataTable()
Dim sRegion As String
' add items from list that match
For Each ListItem As SPListItem In listRegion.Items
If ListItem("Emp").ToString() = sUsername AndAlso _
ListItem("Region") IsNot Nothing Then
sRegion = ListItem("Region").ToString()
igListDS = igListDS + 1
View Complete Post