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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:23:13+00:00 2026-05-22T00:23:13+00:00

Goal: Display Encapsulate field from Player Problem: Want to display datamember_id , _name and

  • 0

Goal:

Display Encapsulate field from Player

Problem:
Want to display datamember_id, _name and _bust in class mainform only by using bindingList

Was it suppose to use syntax [] above the encapsulate field?


Class MainForm

    dataGridViewPlayers.AutoGenerateColumns=true;
    dataGridViewPlayers.AutoSizeColumnsMode=DataGridViewAutoSizeColumnsMode.Fill;

    bindingSourcePlayers.Clear();

    bindingSourcePlayers.DataSource = _myGameManager.Players;




Class GameManager:

    public BindingList<Player> Players
    {
        get
        {
            for (int i = 0; i < _myPlayerGUI_list.Count; i++)
            {
                _player.Add(new Player(_myPlayerGUI_list[i].Player));
            }
            return _player;
        }

    }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CardGameClassLibrary;

namespace CardGameLib
{
    public class Player
    {

        private int _id;
        private string _name;
        private Hand _myHand;
        private int _win;
        private int _lost;
        private bool _madeMove = false;
        private bool _bust = false;


        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public Hand MyHand
        {
            get { return _myHand; }
            set { _myHand = value; }
        }

        public int Win
        {
            get { return _win; }
            set { _win = value; }
        }

        public int Lost
        {
            get { return _lost; }
            set { _lost = value; }
        }

        public bool MadeMove
        {
            get { return _madeMove; }
            set { _madeMove = value; }
        }

        public bool Bust
        {
            get { return _bust; }
            set { _bust = value; }
        }

        public Player(int pId)
        {
            _id = pId;

            _myHand = new Hand();
        }


        public Player(Player pPlayer)
        {
            _id = pPlayer.Id;
            //_name = pPlayer.Name;
            _name = "adsf";
        }


        public Player()
        {

        }



    }
}
  • 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-22T00:23:14+00:00Added an answer on May 22, 2026 at 12:23 am

    You can use Browsable() attribute to prevent specific properties from being shown in the DataGridView when usin BindingList.

    Example: if you want to hide MadeMove:

    [Browsable(false)]
    public bool MadeMove
    {
        get { return _madeMove; }
        set { _madeMove = value; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Goal: Display the created and customized control library component in the mainform screen Problem:
I want to: select * from v$database@standby; Problem : standby is mounted so only
Goal: Display the result without using any line between column and row Problem: I
My goal is to display two <div> s side-by-side with the content from both
goal: I have the string 1234432144 I want to only replace the first 2
goal : I want to place a text after the submit button using hook_form_alter.
What I want My goal is to be able to display a large number
my goal is to display a threshed image using the HSV color space in
My goal is to display the control DateTimePicker and MonthCalender from VS2010 in English
Goal: Display the value of the calculation in the html page. problem: After you

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.