I have developed a datagrid control dynamically with pre defined number of columns and rows and docked it to a new form form2. But the form2 comes in usual form size i.e small and all the cells of the datagrid are not visible as it has scrollbars. I want to see all the cells within the form so I need to increase the size of the form2. Please help me...
Eew, you do know we are already at .NET 3.0 and 3.5 is comming in a few months.
Oh well you should so something like:
StringBuilder sb = new StringBuilder(); // From System.Text namespaceusing (StreamReader re = File.OpenText("abc.txt")) // Using makes sure the reader gets disposed correctly
string input = null;
while ((input = re.ReadLine()) != null)
sb.AppendLine(input); // StringBuilder has easy method to add new line and is alot faster than string concat
string result = sb.ToString();
Oh StreamReader has a ReadToEnd() which does what I did here :P
string result = null;
using (StreamReader re = File.OpenText("abc.txt")) // Using makes sure the reader gets disposed correctly
result = re.ReadToEnd();
When I press F10 and then up or down arrow key there appear a box with options Restore, Move, Size, Minimize, Maximize and Close. I think that comes from system, because many windows has similar box (like properties on desktop).
my requirement is that when I click on a cell of a datagridview the cell number with respect to the row number and column number should be stored in a label control separated by commas or in a combobox collection items. Somebody please help me how to acheive this.
Last Visit: 31-Dec-99 18:00 Last Update: 1-Oct-23 13:05