in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

issue with selecting an item from a filtered view

Last post 11/27/2008 2:41 AM by Alexander Turkevych. 2 replies.
Page 1 of 1 (3 items)
Sort Posts:
Previous Next
  • 11/19/2008 9:41 AM

    issue with selecting an item from a filtered view

    Hello, we are experiencing the following problem:

    we have several records displayed in gridview. we have a line of filters on top of the list. if we use a filter, the list narrows down and displays only matching records. this is correct.

    now if we select a record from the filtered list - it selects incorrect record. e.g. if we select 3rd record in the filtered list, it still selects 3rd record in original list (before filter was applied).

    here is a simple code to test (it just displays the selected record in a textbox):

    Partial Class _Default
        Inherits System.Web.UI.Page
        Protected Sub ASPxGridView1_RowCommand(ByVal sender As Object, ByVal e As DevExpress.Web.ASPxGridView.ASPxGridViewRowCommandEventArgs) Handles ASPxGridView1.RowCommand
            If e.CommandArgs.CommandName = "CompanySelect" Then
                TextBox1.Text = "[" & e.CommandArgs.CommandArgument & "] "
                TextBox1.Text &= CType(e.CommandSource, LinkButton).Text
            End If
        End Sub
    End Class

    any help is much appreciated. thanks.

  • 11/19/2008 8:30 PM In reply to

    Re: issue with selecting an item from a filtered view

    Hi,

    You can use the GetSelectedFieldValues method. Check out the selection demo to see how it's used.

  • 11/27/2008 2:41 AM In reply to

    Re: issue with selecting an item from a filtered view

    Thanks Mehul, but this is not what we need here. In your example there is an extra column with checkboxes, so user has to select row(s) explicitly. What we need is to be able to click on a link (e.g. edit) for a particular record and then do something. But if a filter is applied, the selection index is wrong. Actually it is original, as if there is no active filter. Does this makes sense or you need more information? Any helpful idea would be appreciated.

Page 1 of 1 (3 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED