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 6943451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:09:27+00:00 2026-05-27T13:09:27+00:00

I have a grid that is binded to a dataset that is populated from

  • 0

I have a grid that is binded to a dataset that is populated from a stored-procedure.
One of the columns of the dataset (InstrumentName) is not taken from the stored-procedure, but is empty.

I want to set the values on each row of this column, to something, depending on a value of another column (Id). I have a list of names and ids in memony, and I want to hardcode set the name from my list.

When I do that in the Initialized() method, I can see in the debugging that the values are set, but then they are not on the grid. Seems like the grid is repainted and my set values are lost..

I have this loop running in Initialized():

for (int i = 0; i < view.DataRowCount; i++)
{
    object Uic = view.GetRowCellValue(i, view.Columns["Uic"]);
    int UicInt = 0;

    if ((Uic != null) && (int.TryParse(Uic.ToString(), out UicInt)))
         view.SetRowCellValue(i, view.Columns["InstrumentName"], GetName(UicInt));
 }

I have also tried to do it (without looping) at DataMonitorGridViewCustomColumnDisplayText() without success..

In the end, I need to be able to use the AutoFilterRow on the new values. Up to now, everything has been possible, but not the AutoFiltering…

  • 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-27T13:09:28+00:00Added an answer on May 27, 2026 at 1:09 pm

    I would recommend filling a collection from the stored procedure. You can then use that collection as the data source for the grid. Create a class with all appropriate properties including the InstrumentName which you will assign values to from your own in-memory collection.

    Update
    Based on commentary below – I believe you can use DataRow.RowChanged event to trigger when a row is added. Then grab the ‘Id’ you want, query your in-memory collection.

    I would still go back to my original recommendation. Because DataTables are loosely typed, a strongly-typed class would be much more flexible and ensure data integrity. If your DataTable has the columns Foo (datatype: int), Bar (datatype: string), and Baz (datatype: string) then create a class that mimics that structure:

    public class FooBarBazEntity{
        public int Foo { get; set; }
        public string Bar { get; set; }
        public string Baz { get; set; }
    }
    

    You can fill a collection – IList<T> or IEnumerable<T> – quite easily with LINQ.

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

Sidebar

Related Questions

I have a grid that has multiple rows. I want to hide/show one of
I need to have a grid on one of my webpages that will be
I have a third party grid that is binded to an object. Each column
I have a grid that is named grdUserActivity. I'm not sure what the error
I have a grid that binds a number of child data objects to columns
I have a data grid that has a checkbox item renderer in a cloumn
I have a parent grid that contains multiple row definitions, all of which have
I have a grid and I need to dynamically replace a control that resides
I have a grid (DevExpress XtraGrid, if that matters) which is bound to a
I have a Data Grid View inside a control that is displayed in a

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.