I am building a GridView - ALL CODE in a SharePoint .aspx page.
'Declaration
Dim WithEvents gvQtrComments As New GridView
#Region "DataGridEditComments"
Public Sub gvQtrComments_Edit(ByVal sender As Object, ByVal e As GridViewEditEventArgs) Handles gvQtrComments.RowEditing
gvQtrComments.EditIndex = e.NewEditIndex
GetCourseAndGrades()
End Sub
#End Region
When I click on the Edit button no fire of the event, WHY? Any advice would be great.
Superguppie.
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.
That's odd. The AutoGeneratedEditButton should work without a hitch. Could you post the code?
Superguppie.
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.
U should convert this Edit button in the TemplateField mode in the ItemTemplate and have a try:D, ur CommandName should be "Edit" there in the itemTemplate.
You may have two workarounds to try. First, handle the RowCommand event of gridView to do the same thing in the Edit event with CommandName checking. Second, You can place a Button with CommandName="Edit" in TemplateField in GridView. Try them to see if
it works. If still not working, please show all code.
moojjoo
Member
641 Points
156 Posts
Events Firing --- ????
Sep 12, 2012 02:23 PM|LINK
I am building a GridView - ALL CODE in a SharePoint .aspx page.
'Declaration
Dim WithEvents gvQtrComments As New GridView
#Region "DataGridEditComments"
Public Sub gvQtrComments_Edit(ByVal sender As Object, ByVal e As GridViewEditEventArgs) Handles gvQtrComments.RowEditing
gvQtrComments.EditIndex = e.NewEditIndex
GetCourseAndGrades()
End Sub
#End Region
When I click on the Edit button no fire of the event, WHY? Any advice would be great.
http://moojjoo.blogspot.com/
superguppie
All-Star
48225 Points
8679 Posts
Re: Events Firing --- ????
Sep 12, 2012 02:31 PM|LINK
How do you make the Edit button?
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.
moojjoo
Member
641 Points
156 Posts
Re: Events Firing --- ????
Sep 12, 2012 03:27 PM|LINK
When the GridView is bound:
gvQtrComments.AutoGenerateEditButton = True
http://moojjoo.blogspot.com/
superguppie
All-Star
48225 Points
8679 Posts
Re: Events Firing --- ????
Sep 13, 2012 07:19 AM|LINK
That's odd. The AutoGeneratedEditButton should work without a hitch. Could you post the code?
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.
TimoYang
Contributor
3732 Points
1275 Posts
Re: Events Firing --- ????
Sep 13, 2012 08:07 AM|LINK
U should convert this Edit button in the TemplateField mode in the ItemTemplate and have a try:D, ur CommandName should be "Edit" there in the itemTemplate.
Qin Dian Tan...
All-Star
113532 Points
12480 Posts
Microsoft
Re: Events Firing --- ????
Sep 14, 2012 12:32 AM|LINK
Hi,
You may have two workarounds to try. First, handle the RowCommand event of gridView to do the same thing in the Edit event with CommandName checking. Second, You can place a Button with CommandName="Edit" in TemplateField in GridView. Try them to see if it works. If still not working, please show all code.
Thanks,
If you have any feedback about my replies, please contactmsdnmg@microsoft.com.
Microsoft One Code Framework
TimoYang
Contributor
3732 Points
1275 Posts
Re: Events Firing --- ????
Sep 20, 2012 06:03 AM|LINK
Hi, my way is just ur 2nd one……Plz also mark mine;)