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

  • Home
  • SEARCH
  • 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 6927999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:07:37+00:00 2026-05-27T11:07:37+00:00

I have a Devexpress.XtraGrid.GridControl that I have set the DataSource to a DataTable .

  • 0

I have a Devexpress.XtraGrid.GridControl that I have set the DataSource to a DataTable. I also have several other controls that have databindng to the same DataTable. This works out well so that when the selected row of the GridView changes, the controls reflect the change.

However, on the GridControl‘s GridView I have set the ActiveFilter.NonColumnFilter. This filter changes as the form is used. Occasionally, the filter gets set to something that makes no rows show up in the GridControl. When this happens, the controls that are bound to the DataTable do not clear, but instead show the data from the last selected row.

Is there something simple I can do to tell the bound controls to clear, or do I need to manually go through them all and clear them?

I had previously used a DataTable that actually added and removed rows appropriate to what I was filtering. If the table became clear, all of the bound controls did as well. So I’m assuming it is possible.

  • 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-05-27T11:07:38+00:00Added an answer on May 27, 2026 at 11:07 am

    I contacted DevExpress about this issue and received a response:

    Thank you for your question. When the grid is completely filtered and contains no rows, it cannot set the current item in the binding source.

    To solve this problem I suggest you filter data on the datasource level.

    Using this information, I changed from using the GridView.ActiveFilter.NonColumnFilter for my filtering needs and instead used the DataTable.DefaultView.RowFilter. That appears to have solved my issue.

    This was different from the example they gave me:

    BindingSource bs = new BindingSource();
    DataView dv = new DataView();
    
    DataTable dt = CreateTable(10);
    dv = new DataView(dt);
    bs.DataSource = dv;
    
    gridControl1.DataSource = bs;
    textEdit1.DataBindings.Add("EditValue",bs,"Name");
    textEdit2.DataBindings.Add("EditValue", bs, "ID");
    

    You can then call this to set the filter:

       dv.RowFilter = "ID = 50";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a grid (DevExpress XtraGrid, if that matters) which is bound to a
I have a solution with about 20 projects (that use Devexpress controls) in and
I have a Winform App that uses a 3rd Party Library of Controls, DevExpress.
I have a few Devexpress aspx controls on a website that look fine on
I am using devexpress 9.1. I have devexpress gridview binded to datasource. have set
I have created usercontrol GridEx:UserControl. On that control I putted GridControl (DevExpress datagrid control).
I have a base class, defined as below (I'm also using DevExpress components): public
I have a Devexpress Gridview that is linked to a delete, fetch and update
I have a complete ASP.NET that makes heavy usage of your DevExpress ASPx suite
Hi I have a htmleditor like this: @{ ViewBag.Title = Home Page; } @Html.DevExpress().HtmlEditor(

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.