I set it in grid2_Scroll method as
dgv.Rows.GetRowCount(DataGridViewElementStates.Displayed) - 1;
returns 0 after command
dgv.DataSource = Tadj;
Moreover I set
darkScrollBar1.ViewSize=dgv.Rows.GetRowCount(DataGridViewElementStates.Displayed)-1;
in dgv_RowPostPaint to solve issue in picture...
Hi John
your suggestion works perfectly!!!
THX
I added it inside darkScrollBar1_ValueChanged method.
Only strange aspect is when scrollBar is showed for first time: the length is different than one I move mouse or click on it:
thanks again
gio
I don't know if it is the best solution but finally I found an example and I adapted it to move scrollBar at the end:
private void grid2_Scroll(object sender, ScrollEventArgs e)
{
grid2.FirstDisplayedScrollingRowIndex = e.NewValue;
darkScrollBar1.Value = e.NewValue;
//NEW PART
int totalHeight =...
SKydiver you are perfectly right !!!!
with code
private void darkScrollBar1_ValueChanged(object sender, DarkUI.Controls.ScrollValueEventArgs e)
{
grid2.FirstDisplayedScrollingRowIndex = darkScrollBar1.Value;
}
Now DGV is synchronized when I move scrollBar!!!!
Now I have to find solution for...
little progress...
@ JohnH you are right: grid scroll event is raised. I had to scroll the dgv in order to trigger this event. This is my mistake
Now darkScroolBar and DGV are synchronized but not perfectly..
I had following events:
private void darkScrollBar1_Click(object sender, EventArgs e)...
Hi JohnH
I used following code to set maximum
darkScrollBar1.Maximum = TadjsReciproche.Rows.Count
Menawhile two methods mentioned above never raised :(
Sorry for late Skydiver...
I found and I read page on stack overflow.
This is my code:
private void bgwADJ_WorkComplete(object sender, RunWorkerCompletedEventArgs e)
{
grid2 = new DataGridView();
grid2.ScrollBars = ScrollBars.Horizontal...
Hi all,
I found from Nuget DarkUI package where there are several controls like DarkScrollBar.
So I decided to use use this control and to bind my DataGridView with this new DarkScrollBar control.
First step.
I added DataGridView1 inside a Panel panel1.
Second step.
I disabled DataGridView...
Hi John,
I used 3rd method creating pgpass.conf file in case I wanna connect to several servers without writing passwd each time.
This is code(maybe it can be useful):
String user = Environment.UserName;
String user1 =...
I executed line command.
Only errors.txt is filled and it contains all informations that I need:
...
pg_dump: last built-in OID is 16383
pg_dump: reading extensions
pg_dump: identifying extension members
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading user-defined...
Hi John,
without cmd.exe inside arguments pg_dump isn't executed and in richTextBox following messages are shown:
Microsoft Windows [Versione 10.0.19043.1348]
(c) Microsoft Corporation
As well as using :
info.FileName = @"C:\Backup_PostgreSQL\pg_dump.exe";
and as arguments:
//info.Arguments =...
Hi all,
I created a form in order to backup my postgres DB.
I'm using pg_dump.exe and executing it as process and setting CreateNoWindow = false and UseShellExecute = true in processStartInfo I can see opening DOS shell, I can see all single messages of pg_dump and Backup is successfully...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.