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 3 1517
To set the top visible row, make the CurrentCell on that row.
dataGrid1.Curre ntCell = new DataGridCell(yo urDataTable.Row s.Count -
dataGrid1.Visib leRowCount,0);
You'll have to explain your second question a little more.
good luck,
kevin aubuchon
"Gidi" <sh*****@hotmai l.com.dontspam> wrote in message
news:10******** *************** ***********@mic rosoft.com... 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
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.
"Kevin Aubuchon" wrote: To set the top visible row, make the CurrentCell on that row.
dataGrid1.Curre ntCell = new DataGridCell(yo urDataTable.Row s.Count - dataGrid1.Visib leRowCount,0);
You'll have to explain your second question a little more.
good luck, kevin aubuchon
"Gidi" <sh*****@hotmai l.com.dontspam> wrote in message news:10******** *************** ***********@mic rosoft.com... 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
i worked it all out with your help...
"Gidi" wrote: 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.
"Kevin Aubuchon" wrote:
To set the top visible row, make the CurrentCell on that row.
dataGrid1.Curre ntCell = new DataGridCell(yo urDataTable.Row s.Count - dataGrid1.Visib leRowCount,0);
You'll have to explain your second question a little more.
good luck, kevin aubuchon
"Gidi" <sh*****@hotmai l.com.dontspam> wrote in message news:10******** *************** ***********@mic rosoft.com... 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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tamlin |
last post by:
Hi all,
I'm getting a bug with the datagrid object.
I've created one from scratch, bound it to a dataview with 2 int32
columns and formatted the output as currency.
I've found that when you use the F2 key to enter edit mode and then
hit TAB or ESCAPE without actually editing the value, dotnet crashes
with a null reference error.
|
by: SammyBar |
last post by:
Hi,
I'm trying to bind a custom collection class to a data grid, following the
guidelines from the article
http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx.
The problem is the article is in VisualBasic. I already get the collection
to be recognized as a Data Source by the IDE. It populated the DataGrid
correctly from the fields on the items object of the collection, but I can't
get the DataGrid to...
|
by: Bill C. |
last post by:
Hello,
I know this has been discussed a lot already because I've been searching
around for information the last few weeks.
I'm trying to implement a DataGridComboBoxColumn class. I've found
several examples on the web. They all seem to have problems, though
that I've been unable to resolve.
The most promising example I have found is at:
|
by: Kevin |
last post by:
Hi Al
When I have a text box, list box, and a datagrid, how does a CurrencyManager relate to all these controls(seeing as though the datagrid uses Complex binding and textbox and list box use simple bound. So for example if I have a text box, list box and a Datagrid on a windows form, and I want to navigate the records in a dataset(and we must not forget the child records from the child tables aswell!) How do I create the CurrencyManager to...
|
by: Wayne |
last post by:
I have a datagrid on my windows form, it needs to be read only and when a
user selects a row, I want the whole row to be selected.
How would I go about doing this?
--
Thanks
Wayne Sepega
Jacksonville, Fl
| |
by: Ryan Liu |
last post by:
Hi there,
I got a NullReferenceException when delete last row in a datagrid.
I had hard time to solve since it does not occur in my own code.
I put a datagrid in my inherited user control, then put this control on a
form.
I use DataAdaptor to fill the data table and update database.
|
by: jy836 |
last post by:
1) When using images for an application (such as in an ImageList or as the
image for a button), are the images embedded in the application or must the
image files be included in the setup package?
2) Is there a way to adjust the individual column widths of a DataGrid which
has no TableStyles or GridColumnStyles? Also, is there a way to make it
impossible for the user to resize the columns and rows?
|
by: Kejpa |
last post by:
Hi,
I've just started using the datagrid and I have a few questions on it...
1. How do you autosize the columns to fit the content programmatically? When
you double click between two columns you'll get the left one autosized to
it's content, I want to do that when I load the grid with data.
2. How do you sort the grid using a command button? When you click the
column header you will get the grid sorted in ascending/descending order, my...
|
by: Flack |
last post by:
I have a DataGrid and a DataTable. When my form loads I create the DataTable
with the appropriate columns and use it for the DataGrids.DataSource.
Later on in my app, I alter the DataTable:
dt.BeginLoadData();
for(int i = 0; i < _movesArrayList.Count; i++)
{
string columnValues = ((string)_movesArrayList).Split(COL_SEPARATOR);
DataRow _moveRow = dt.NewRow();
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |