C
C#2y ago
darunshady

❔ Need help with datagridview

I am working on a simple software, but whenever i add strings to the datagridview, only the first row is visible, while the data is present in other rows too, i am still new to c#, can someone help me out?
46 Replies
darunshady
darunshadyOP2y ago
this is the code i use to input the data: dataGridView1.Rows.Add(txtpuid.Text, combopro.SelectedValue.ToString(), combopro.Text, txtqt.Text,txtrate.Text, total);
Denis
Denis2y ago
You are doing this in WinForms, right?
darunshady
darunshadyOP2y ago
yes i am I have already made this code run many times and it has worked, i recently made some changes(not on the part where this datagridview is connected). After i made that change, every dgv i have in my program works like this, may it be a event stopping this?
جيف
جيف2y ago
what are you trying to ddo
darunshady
darunshadyOP2y ago
but when i select it, everything is visible
darunshady
darunshadyOP2y ago
i want to make the dgv rows visible
جيف
جيف2y ago
dgv? oh it is visible, its visible by default only one row got added?
darunshady
darunshadyOP2y ago
every row got added, but only the first row is visible until i select it
جيف
جيف2y ago
can i see a clip of it doing so?
darunshady
darunshadyOP2y ago
a video clip? sure, ill send it in a few mins
darunshady
darunshadyOP2y ago
جيف
جيف2y ago
can i see code for the button event and dgv event
darunshady
darunshadyOP2y ago
for the add button?
جيف
جيف2y ago
yh
darunshady
darunshadyOP2y ago
darunshady
darunshadyOP2y ago
for the loadGrid function
جيف
جيف2y ago
show me dgv click event
darunshady
darunshadyOP2y ago
i am sorry but where i can i find that? As i said i am still new to c#
جيف
جيف2y ago
double click dgv in VS for its code
darunshady
darunshadyOP2y ago
i have not made any changes to it i suppose
جيف
جيف2y ago
ok hmm weird let me see dgv properities
darunshady
darunshadyOP2y ago
darunshady
darunshadyOP2y ago
darunshady
darunshadyOP2y ago
جيف
جيف2y ago
ok that is extremely weird, i've never experience this only way i could help is by checking it out over anydesk or by sending me the src
darunshady
darunshadyOP2y ago
Can u do Parsec?
جيف
جيف2y ago
parsec.app?
darunshady
darunshadyOP2y ago
Yea its a app...... which allows you to connect to my computer
جيف
جيف2y ago
ok i hv to make an acc 1sec
darunshady
darunshadyOP2y ago
yea sure my acc name is darunshady#5886572
جيف
جيف2y ago
made ok added send link
darunshady
darunshadyOP2y ago
alr i accepted
جيف
جيف2y ago
bro
darunshady
darunshadyOP2y ago
Parsec
Connect to darunshady's computer.
Parsec is a high performance remote desktop application. Connect to darunshady's computer now.
darunshady
darunshadyOP2y ago
u can press connect now can u see through?
جيف
جيف2y ago
yes
darunshady
darunshadyOP2y ago
IT HAS TO DO WITH THE QUANTITY ONLY NUMBERS ARE ACCEPTED kk and the rate
جيف
جيف2y ago
ok this is harder than i thought but still extremely weird that its happening i've never experience this add a new dgv? replace it try with a fresh dgv
darunshady
darunshadyOP2y ago
ok but i can tell u one thing, i did make a change in the home.cs, before that all was working fine, can u please check that too?
جيف
جيف2y ago
ok nothing useful in it all it does is, generate new forms brb 2sec, bathroom
darunshady
darunshadyOP2y ago
Ok, what i did was, i made it so that everytime i clicked the load forms, the existing form closes and the form gets opened again to refresh it i was not able to find any other method but i dont think this is where the problem is, thats why i am stuck ill try doing that, but the same happens at every form, before this it was not like that
جيف
جيف2y ago
Something to do with project settings then I’d ctrl+z till its fixed tbh lmao
darunshady
darunshadyOP2y ago
lol ok thanks anyways man🫂 Great help Ok bye for now then🫡 ill ctrl+z my way down, and ill see if i can find a fix Ok this is STUPID, i found the problem.......All i did was, i changed the forecolour of my home page, and boom, all the data appeared, i wanna commit not live Smadge
darunshady
darunshadyOP2y ago
this thing was the sadge , and the thing is, i changed it by accident while i was Smadge
جيف
جيف2y ago
rippppppp
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server