Datagridview with Custom Value Dataset

Asked

Viewed 57 times

1

Hello, good morning, sir. I would like to ask you for help on the following situation:

Use the Postgresql database integrated with Visual Studio Enterprise with the package (Npgsql Postgresql Integration). For those who still don’t know this package allows you to manage BD directly from VS to SQL Server as well.

But anyway, until today I had no problem with it because I only used to fill one DataGridView with what I have in the Bank.

Automatically it generates the code:

this.backlogTableAdapter.Fill(this.dsGestorSQL.backlog);

This works perfectly to show the database data, but I need to use a column like DataGridViewCheckBoxColumn and as I said above it generates a code automatically that fills the DataGridView would have a possibility to use this method next to a validation:

if(ValueColumn == "S")
{
    MarcarCheckBox(Exemplo);
} 
else
{
    CheckBoxVazio(Exemplo);
}

Does anyone know of this possibility?

Thank you for your attention and help!

  • 1

    If the DataGridView a column of the type bool will not soon have the CheckBox filled with the correct value?

  • Yeah, but apparently it’s an "S"/"N string"

  • we are talking about Webforms?

  • If that’s what @Leandroangelo says, then that change could be made on the SQL side.

  • Hello friends, thank you for trying to help, the application is in Windows Forms and the solution to this problem was to bring from the database the values "true" and "false" in a column of type "Datagridviewcheckboxcolumn" so it reads the value of the bank and fills the check box if it is as "true". I hope my answer can also help more people with this doubt

1 answer

0

thanks for trying to help, the application is in Windows Forms and the solution to this problem was to bring from the database the values "true" and "false" in a column of type "Datagridviewcheckboxcolumn" so it read the value of the bank and fills the check box if it is as "true". I hope my answer can also help more people with this doubt!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.