Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9147235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:56:19+00:00 2026-06-17T10:56:19+00:00

I am using ASP.Net with VB to display records in a grid view. In

  • 0

I am using ASP.Net with VB to display records in a grid view.
In a normal ASP GridView, I can simply handle SelectedIndexChanged Event from code behind like this:

Sub mySub(ByVal sender as Object, ByVal e As EventArgs) 
          Handles GridView1.SelectedIndexChanged
  Dim id as String = GridView1.SelectedRow.Item(0).ToString
  Response.Redirect("Customer.aspx?ID=" & id) 'Or Whatever
End Sub

Now I am trying to do the same but with ASPxGridView that comes with DevExpress. Obviosly, there is no built in Event that can be handled directly from code behind. I have to go through client click with javascript, which I don’t mind to but all my attempts to pass the click event from the client to the server code behind failed.

Here is my ASP page

<dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False"
     KeyFieldName="id" Width="550px" OnSelectionChanged="row_selected" >
    <SettingsBehavior AllowFocusedRow="True" />
    <SettingsText Title="Customers" />
    <Columns>
        <dx:GridViewDataTextColumn FieldName="id" ReadOnly="True" VisibleIndex="1">
            <EditFormSettings Visible="False" />
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="Name" VisibleIndex="2">
        </dx:GridViewDataTextColumn>
    </Columns>
    <Settings ShowTitlePanel="True" />
    <ClientSideEvents FocusedRowChanged="function(s, e) {
        row_selected();
        }" />
</dx:ASPxGridView>

And here is my code behind (Which never gets called)

Sub row_selected()
    Dim id as String = ASPxGridView1.SelectedRow.Item(0).ToString
    Response.Redirect("Customers.aspx?ID=" & id) 
End Sub

How can I call a function from code behind by clicking on a row on ASPxGridView row?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:56:20+00:00Added an answer on June 17, 2026 at 10:56 am

    Try this:
    1. Set ASPxGridView1.SettingsBehavior.ProcessFocusedRowChangedOnServer to true.
    2. Handle server side FocusedRowChanged event

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As need to display Records in grid view in (ASP.NET) web site. and for
I am using Repeater in asp.net, i want to display total number of records.
I am using a GridView control in ASP.NET web form to display the data
I am using a Grid View of asp.net 4.0. I want to use pagination.
I am using ASP.Net 2.0 and trying to display transformed xml data using GridView
If you are using ASP.NET MVC how are you doing grid display? Rolled your
I'm using an asp.net chart control to display a pie chart, image below. http://i39.tinypic.com/ndtzx1.png
I want to display user ratings in my asp.net site using bars and ratings.
Using asp.net 3.5 Gridview control, visual studio 2008. I have played with all the
Using ASP.NET MVC when trying to get the information stored on my Session[objectName] from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.