|
Get a job where you are required to program in it, that's how I am, ummm, learning. Of course, buy book 3 days before with a trial visual studio version included and try out a couple of examples first
ok, so I'm not being useful, sorry.
Actually, when I was looking for books, they all seemed to be entirely about GUI stuff, or entirely NOT about GUI stuff, there wasn't really anything that seemed to talk about both. This was from a limited selection though. Plus, the books that talked about the basics were WAY too simplistic. Yes, I wanted to know the basics, but I didn't want to spend a whole chapter on each item. I got it after the first paragraph, thanks. But the harder books didn't include any basics so I had no idea what they were talking about.
Of course, if you are new IN PROGRAMMING rather than just new to C#, maybe you won't have that last problem; maybe the basics will require more than a paragraph to get.
Get a book, try some stuff from it and work through it. Then try and do something harder, and you will soon discover what you don't know and the real learning will start as you try to find the answer.
"Your typical day is full of moments where you ask for a cup of coffee and someone hands you a bag of nails." - Scott Adams
|
|
|
|
|
Currently I have a datarow that I need to itterate through, of which I have decided to use a foreach loop to retrieve my values. The trick is, I need to get the next row of values from the current row.
Any help would be appreciatied.
Thanks
|
|
|
|
|
int numRows = myDataTable.Rows.Count;
for(int i=0; i<numRows-1;i++)
{
DataRow currentRow = myDataTable.Rows[i];
DataRow nextRow = myDataTable.Rows[i+1];
}
|
|
|
|
|
Had it working that way, just curious if there was a way to do it with the foreach loop.
Thanks
|
|
|
|
|
avanwieren wrote: just curious if there was a way to do it with the foreach loop.
Yes, but it is more complex
|
|
|
|
|
how about:
foreach (DataRow row in myDataTable.Rows) {...}
Luc Pattyn
|
|
|
|
|
Luc Pattyn wrote: foreach (DataRow row in myDataTable.Rows) {...}
No, because he wants to access the current row and NEXT row as the same time.
|
|
|
|
|
Three ways to have access at two rows at once:
DataRow previousRow=null;
foreach (DataRow row in myDataTable.Rows) {
previousRow=row;
}
or (problem here is to get an appropriate dummy data row outside the data set)
DataRow previousRow=aDummyDataRow;
foreach (DataRow row in myDataTable.Rows) {
previousRow=row;
}
or (only when DataSet extended with a dummy head row):
DataRow previousRow=null;
foreach (DataRow row in myDataTable.Rows) {
if (previousRow!=null) {
}
previousRow=row;
}
Luc Pattyn
|
|
|
|
|
True, but all of these require slightly more complex logic that the simple for(int i=0....) style that I gave here[^]. I'd rather have something that had simpler logic and was easier to read and understand.
|
|
|
|
|
Colin Angus Mackay wrote: I'd rather have something that had simpler logic and was easier to read and understand.
I agree completely, I tried to give a solution to the foreach question anyway.
Luc Pattyn
|
|
|
|
|
Hello All,
I was just wondering if anyone knew how to disable the sorting on data grid columns. I don't want my end users to click the column headers and sort the data. Is there a proerty to set? Any help would be greatly appreciated.
|
|
|
|
|
Set the SortMode property to DataGridViewColumnSortMode.NotSortable.
|
|
|
|
|
Thanks but where is this sort mode propery? I can't find on datagridview control.
|
|
|
|
|
DataGridViewColumn.SortMode
Note: This property is new in the .NET Framework version 2.0.
Luc Pattyn
|
|
|
|
|
hi
how to doing setup project my application in c# to use or inistiler in any computer dont have .net
and sorry for bad english eriting.
thank you for help me
|
|
|
|
|
|
hi all,
I need to develop a service application that runs on a server. This application is used to get some data from the database and according to this data sends mails to clients and to the administrator. This service application is needed to run every morning at 9:00 A.M. and only once per day.
It it the first time that i deal with service application. So i have no experience in it. I made some search on the codeproject and i came up with some good result that helped me get some idea.
one of the problems i faced is that i can not add a data source to it.
can any body help me
thanks
|
|
|
|
|
Hi,
Need a simple create table script for SQL server 2007.
Here's the structure:
Column1: primary key, integer, auto increment
Column2: Name, char, length 100, not null
Column3: address, char length 200, not null
Please help
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
Bulky Fellow wrote: SQL server 2007.
No such product. Did you mean SQL Server 2005?
CREATE TABLE dbo.SomeTableName
(
SomeColumnName INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,
Name CHAR(100) NOT NULL,
address CHAR(200) NOT NULL
);
May I recomment that you use VARCHAR instead of the CHAR type that you requested.
|
|
|
|
|
|
Thanks a lot for your help!
And by the way, I meant SQL server 2000. Made a mistake there.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
How to lock folders.
Help.
Vasildb
|
|
|
|
|
What are you trying to do? You may want to be more articulate.
|
|
|
|
|
I think he might mean that he wants to lock a folder in the same way that Windows prevents you from looking in System folders.
---
Sup!
|
|
|
|
|
Yes. Do not view or can not open.
Vasildb
|
|
|
|