EnablePostBackOnRowClick and GridEditCommandColumn

4 posts, 0 answers
  1. Mark
    Mark avatar
    20 posts
    Member since:
    Feb 2008

    Posted 07 Nov 2008 Link to this post

    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 











    <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" />











    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



  2. Yavor
    Yavor avatar
    11 posts

    Posted 11 Nov 2008 Link to this post

    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,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Mark
    Mark avatar
    20 posts
    Member since:
    Feb 2008

    Posted 14 Nov 2008 Link to this post

    How would I do that?
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Nov 2008 Link to this post

    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

Back to Top