mysql - Data in data grid view won't show visually C# SQL -


i have data grid view this:

enter image description here

but should this:

enter image description here

the data fetched have drag cells data can shown. code:

private void button5_click_1(object sender, eventargs e)         {              sqlconnstaff();             groupboxroom.visible = false;             groupboxdpenghuni.visible = false;             groupboxpenghasilan.visible = false;             groupboxpenghuni.visible = false;             groupboxstaff.visible = true;             groupbox_addresident_resident.visible = false;             groupbox_addresident_room.visible = false;             groupbox_addresident1.visible = false;             groupbox_deleteresident_resident.visible = false;             groupbox_deleteresident1.visible = false;             groupbox_resident.visible = false;             groupbox_update_room.visible = false;             groupbox_updateresident1.visible = false;         }  private void sqlconnstaff()         {             bindingsource dbbindsource = new bindingsource();              sqlcommand com;             com = new sqlcommand();             sqlconnection con = new sqlconnection(strcon);              com.connection = con;             com.commandtype = commandtype.storedprocedure;             com.commandtext = "view_staff";              sqldataadapter dataadapter = new sqldataadapter(com);              idcabang = new sqlparameter();             idcabang.sqldbtype = sqldbtype.varchar;             idcabang.size = 5;             idcabang.parametername = "@idcabang";             idcabang.value = idcabangc;             idcabang.direction = parameterdirection.input;              com.parameters.add(idcabang);              con.open();              datatable table = new datatable();             table.locale = system.globalization.cultureinfo.invariantculture;             dataadapter.fill(table);             dbbindsource.datasource = table;              datagridview3.autoresizecolumns(datagridviewautosizecolumnsmode.allcellsexceptheader);             // can make grid readonly.             datagridview3.readonly = true;             // bind data grid             datagridview3.datasource = dbbindsource;              con.close();         } 

whats wrong , should do?

it looks problem not c# code coloring scheme. when select cells data visible, means must change fore color other white.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -