15,905,607 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by KergalBerlin (Top 7 by date)
KergalBerlin
3-Sep-14 11:24am
View
I got your solution the first time and did not particularly like it back then, I also understood your point about matrices - and never disagreed on that, but seriously I am starting to get mad about myself for still reading and commenting on your responses. You are simply trying to make fun of someone who maybe is or is not as good a programmer as you are. I will therefore no longer attend this thread and would politely ask you to not answer any of my questions anymore, we apparently do not harmonise very well.
PS : If you would maybe once read one of the comments I wrote, you would see that your responded to a question I had solved and updated already. Therefore your solution - best intentions assumed - was of no direct use.
Thank you.
KergalBerlin
2-Sep-14 18:13pm
View
posted that one before I read your answer.
Thruth be told, I felt that Sergey Kryukov was trolling me in the other thread and I wanted to avoid "fun" responses and confusion. Besides, I feel I phrased my question better this time.
KergalBerlin
2-Sep-14 17:50pm
View
I might give that a shot - I have not worked with INotifyPropertyChanged yet.
Thanks.
KergalBerlin
2-Sep-14 17:31pm
View
Please don't take this the wrong way, but what is the purpose of your responses?
The phrase "not only always NxM it will always be 3x3" cleary implies that 3x3 is the less general case. With the sentence before I am clearly going one step further . I do not only say " it is a rectangular array" i explicitly state that is not only a rectangular one,but even a quadratic one typed to a jagged array - AND AGAIN -to my best knowledge- LINQ TO OBJECT cannot (or at least not easily) be used with rectangular arrays of type string[,]. THIS is a -> jagged array string[][] and in my case it consists of 3 arrays with 3 fields.
Please do not reply unless you have something valuable to add.
In case I missunderstand your responses and you are not trolling, please accept my apoligies.
-DK
KergalBerlin
2-Sep-14 16:21pm
View
the data is not only always NxM it will always be 3x3 . As mentioned the only reason the array is of type string[][] and not string[,] is the LINQ compatability.
Thanks for the list of lists idea - got that part down already as mentioned in the previous post.
Can you help me with one more thing?
Every 15 minutes I expect to receive new data (again I will transform that data to 3x3) and simply update my DataSource . I would like to track changes in the cells of the datagridview though.
Example :
old gridview Foo0, Moo0, Baa0
Foo1, Moo1, Baa1
Foo2, Moo2, Baa2
newgridview Foo0, Moo0, Baa0
Foo1, CHANGE, Baa1
Foo2, Moo2, Baa2
--> now I want to highlight and fade the background color of the cell with the changed text. Without the datasource I could simply use the CellValueChanged event - that does not work with the datasource though.
Any idea how I can acquire the row and column index of the changed cell ?
KergalBerlin
2-Sep-14 15:44pm
View
Hi Sergey,
I appreciate your fast responses, but apparently I am not expressing myself well enough.
The jagged arrays will always have the same form no empty values at all no changes in dimensions, length or anything alike. The entire array can be seen as rock solid. I am not taking the data as is from a website and I believe I got them in the most efficient and pragmatic way possible ( I do not leverage the power of jagged arrays in terms of "jagged endings" - the only reason I use them is to use Linq to Objects on them ).
I managed to get the first part of my problem done by doing the following:
dataGridView1.DataSource = (from arr in test select new { Data = arr[0], Dog = arr[1] }).ToArray();
(the above is of course only dummy data for testing purposes).
Using this approach I am always updating the entire DataSource - and cannot use the inbuilt CellValueChanged event (which would be awesome, because the EventArgs contain both row and column index which I need for the highlighting I want to do).
Do you have any ideas for that ?
KergalBerlin
2-Sep-14 15:10pm
View
I read the data as a string, break it down to a jagged array - which actually isn't really jagged at all, I could display all the data in a rectangular array as well - however, I am using linq to extract,sort and filter said array and to my best knowledge only jagged arrays work with linq.
The jagged array has exactly the form that I would like to see on screen and will always be 3x3. I don't need any headers just those 9 - 3 x 3 - cells.
I tried the obvious datagridview1.DataSource = myArray; - I get data in the gridview, but only metadata of the array not the actual data content.
Besides that I have several of these 3x3 arrays - they are being created by instances of my "scraping" class - they will update indepentently from each other and they are displayed at different places in my windows form.
Is there an inbuild way of mapping/binding the array content to the datagridview ? Or is there even a control object better suited for my case ?
Show More