2 questions: one about datagrid and one about forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello i'm writing an appliction in C# and i have 2 questions:

1. i have a dataGrid which contains data from my DataBase, and when the dataGrid loads the scroll is at the first line and i want it to be at the last line, so i can see the last lines, how can i make it to be at the bottom?

2. i made a flag that disable the option to create several object from the same class
so now if i press the same button few times nothing happens (as i wanted) but i can i make a form that is open but minimized to be maximised again on the next pressing?

thank you
 
To set the top visible row, make the CurrentCell on that row.

dataGrid1.CurrentCell = new DataGridCell(yourDataTable.Rows.Count -
dataGrid1.VisibleRowCount,0);

You'll have to explain your second question a little more.

good luck,
kevin aubuchon

Gidi said:
hello i'm writing an appliction in C# and i have 2 questions:

1. i have a dataGrid which contains data from my DataBase, and when the
dataGrid loads the scroll is at the first line and i want it to be at the
last line, so i can see the last lines, how can i make it to be at the
bottom?
2. i made a flag that disable the option to create several object from the same class
so now if i press the same button few times nothing happens (as i wanted)
but i can i make a form that is open but minimized to be maximised again on
the next pressing?
 
thank you, but i guess that i need to explain both questions:

1. how can i make the scroll bar to be at the bottom and not at the top??

2. i open a form, then i minimized it and now i see my MainForm and the form i minimized is shown at the taskbar, now how can i make it that when i'll press the button that opens me that form to maxsimize me this form and not to open me a new one from that type.

thank you.
 
i worked it all out with your help...

Gidi said:
thank you, but i guess that i need to explain both questions:

1. how can i make the scroll bar to be at the bottom and not at the top??

2. i open a form, then i minimized it and now i see my MainForm and the form i minimized is shown at the taskbar, now how can i make it that when i'll press the button that opens me that form to maxsimize me this form and not to open me a new one from that type.

thank you.
 
Back
Top