Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Grids
Message
From
15/10/2002 16:01:21
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
 
 
To
15/10/2002 15:57:23
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00711290
Message ID:
00711480
Views:
12
Never mind I found the problem. I had an edit button in the grid instead of a select button...

Thanks for the help...
Jim

>Cathi,
>
> I am now having a different problem with the datagrid. When I click the
>edit button, nothing happens. I place the code in the selectedIndexChanged event as seen below. What am I doing wrong? Please help.
>
>Private Sub dgContacts_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dgContacts.SelectedIndexChanged
> Response.Redirect("http://www.microsoft.com")
> End Sub
>
>
>
>>The EditCommand is typically used to edit the information in the DataGrid itself. You set the EditItemIndex property to the ItemIndex of the row selected like the following:
>>
>>
>>dgContacts.EditItemIndex = objArgs.Item.ItemIndex
>>
>>
>>In your case where you want to navigate to another page, why don't you use the OnSelectedIndexChanged property to set the method to call. ASP.NET will then have the correct setting for the SelectedIndex property.
>>
>>>Hello,
>>>
>>>I have a datagrid on a search screen that is populated from a dataset. In the first column I have an edit button. When I click the edit button I want the browser to navigate to a different page, I know how to do this. The problem I am having is getting the selectedIndex property to not = -1. I'm not sure why this is happening, it has worked for me before. The code for the datagrid's edit_command. Any suggestions would be great.
>>>
>>>Here's the code:
>>>Private Sub dgContacts_EditCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgContacts.EditCommand
>>> Me.setMessage(Me.dgContacts.SelectedIndex.ToString)
>>> End Sub
Thanks

Jim
Previous
Reply
Map
View

Click here to load this message in the networking platform