This is a migrated thread and some comments may be shown as answers.

EnablePostBackOnRowClick and GridEditCommandColumn

3 Answers 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 07 Nov 2008, 05:58 PM
I have a grid that when the user clicks on the row it redirects to another page via the ItemCommand event.

If e.CommandName = "RowClick" Then

Dim GridItem As GridDataItem = CType(e.Item, GridDataItem)

 

Dim itemPrimaryKey As String = GridItem.GetDataKeyValue("PROJECT_ID").ToString()

Response.Redirect("Project.aspx?ID=" & (itemPrimaryKey) & "&TYPE=0")

End If

 

The problem is I also have 

 

AllowAutomaticUpdates

 

="True"

 

 

 

and 

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton" UpdateImageUrl="../RadControls/Grid/Update.gif"

 

 

 

 

 

 

EditImageUrl="../RadControls/Grid/Edit.gif" InsertImageUrl="../RadControls/Grid/Insert.gif"

 

 

 

 

 

 

CancelImageUrl="../RadControls/Grid/Cancel.gif" UniqueName="EditCommandColumn">

 

 

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

 

 

</telerik:GridEditCommandColumn>

 

 

 


So when I click on the GridEditCommandColumn it too redirects me to another page and does not bring up the edit functionality. This was working before until I upgraded to 2008.1.515.20

 

 

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 11 Nov 2008, 07:25 AM
Hello Mark,

One possible approach in this case would be to remove the postbackOnRowclick functionality and use the onRowclick client side handler, to make an AjaxRequest to the server when the user clicks on an area other than the edit link.

Kind regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mark
Top achievements
Rank 1
answered on 14 Nov 2008, 06:30 PM
How would I do that?
0
Shinu
Top achievements
Rank 2
answered on 17 Nov 2008, 05:38 AM
Hi Mark,

You can find a similar approach in the following KB article. Try the logic in the RowClick client event instead of RowDoubleClick event.
Performing postback from grid client events

Regards
Shinu.
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Mark
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or