question

BenTam-3243 avatar image
0 Votes"
BenTam-3243 asked BenTam-3243 commented

How to fix the errors

Dear All,

Grateful if anybody tells me how to fix the errors in the attached figure.

TIA

126631-demo.gif



dotnet-csharp
demo.gif (63.5 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@BenTam-3243, is ObjectListView in the code the same as the Project Name ObjectListView? As usual, we could not create an instance from a namespace. Could you provide the related code in your project ObjectListView?

0 Votes 0 ·

@JackJJun-MSFT

Thanks for your reply.

ObjectListView is a project created by Phillip Piper. The source code can be found by clicking the following link.[1]

[1]: http://objectlistview.sourceforge.net/cs/download.html

0 Votes 0 ·

Did you look at the project below, either way it will be gone by noon today.

https://github.com/karenpayneoregon/windows-forms-csharp/tree/Version1/ObjectListViewFramework

0 Votes 0 ·
karenpayneoregon avatar image
0 Votes"
karenpayneoregon answered BenTam-3243 commented

Seems your project has issues overall that defy what a standard WinForm project should have.

The only thing I see different between my and your project is the .NET Framework version yet that should not make using static System.Configuration.ConfigurationManager; not to be found.

So I created a mirror image of the project found here that uses System.Configuration.ConfigurationManager version 5 rather than version 4. I'm going to guess even though this should work it will not as the first version should have worked so try if you want and let me know what happens.


· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @karenpayneoregon

After downloading the latest version of System.Configuration.ConfigurationManager, the red lines problem are solved.

  • Your project were using dataGrid, while I am using objectListView. How should I make the change?

  • In objectListView, how to get access to the contect of an individual view?


0 Votes 0 ·

In regards to my sample using a DataGridView, the intention was not about a control but instead System.Configuration.ConfigurationManager, to make the change use your current code or review how to work with the DataSource here. Use the same link for get access to the contect of an individual view


0 Votes 0 ·

Hi Karen,

I have read that page and gone through all the items. However there isn't any point about getting access to the content of a cell. Could you show me the syntax of that?

TIA

0 Votes 0 ·

To show you the syntax I would first need to learn enough about the control to do so as I've never used this control. Also this question should be asked in a new post/question as I'm sure there are members here who would know yet are not watching this current post for the secondary question.

0 Votes 0 ·

Thanks! Anyway!

0 Votes 0 ·
WayneAKing-0228 avatar image
0 Votes"
WayneAKing-0228 answered BenTam-3243 commented

Did you follow the instructions here?

http://objectlistview.sourceforge.net/cs/gettingStarted.html

"Download the ObjectListView project

Add the ObjectListView project to your project (right click
on your solution; choose “Add...”, “Existing Project”, then
choose the ObjectListView.csproj)

In your project, add a reference to the ObjectListView project
(right click on your project; choose “Add Reference...”, choose
“Projects” tab; then double click on the ObjectListView project)

Build your project"

  • Wayne

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Wayne,

I have already done these!

0 Votes 0 ·
Castorix31 avatar image
0 Votes"
Castorix31 answered Castorix31 commented

Add at beginning :

 using BrightIdeasSoftware;
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Castorix,

Thanks for your reply. After adding the statement, it becomes

126764-addusing.gif


0 Votes 0 ·
addusing.gif (13.5 KiB)

Are you sure you added the Reference to ObjectListView Assembly to get the BrightIdeasSoftware namespace ,
like, in a .NET Framework project (I used the NuGet Package Manager to add ObjectListView.Official) :

126696-olv.jpg





0 Votes 0 ·
olv.jpg (155.5 KiB)

Hi Castorix,

Thanks for your reply.

I have made sure that the project has referenced to the "ObjectListView" project. However there were still errors. What next?

127181-objectbrowser.gif

0 Votes 0 ·
objectbrowser.gif (24.9 KiB)
Show more comments
karenpayneoregon avatar image
0 Votes"
karenpayneoregon answered karenpayneoregon edited

As @WayneAKing-0228 mentioned and @Castorix31 you need the using statement as seen in this code sample in MainForm.cs, line 19. And note the project reference.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

karenpayneoregon avatar image
0 Votes"
karenpayneoregon answered karenpayneoregon commented

Try the following project

Form code

 using System;
 using System.Windows.Forms;
 using `BrightIdeasSoftware;`
    
 namespace ObjectListViewFramework
 {
     public partial class Form1 : Form
     {
         public Form1()
         {
             InitializeComponent();
         }
    
         private void button1_Click(object sender, EventArgs e)
         {
             var objectListViewLocal = new ObjectListView();
         }
     }
 }


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@karenpayneoregon @Castorix31

I'll study your post later and get back to you later.

0 Votes 0 ·

Hi Karen,

When I click on the link you provided, it shows a 404 not found problem. I guess the project might have been removed. Would you please re-post the project and send me the link.

0 Votes 0 ·

@karenpayneoregon

Hi Karen,

I follow your instructions. However the words ConigurationManager and AppSetting are red lined. This is different from your project. Can you tellme why?

MY Project
127340-configmanager.gif

127400-appconfig.gif

Your Poject
127501-configmanager0.gif

127473-appconfig0.gif


0 Votes 0 ·
configmanager.gif (38.9 KiB)
appconfig.gif (10.1 KiB)
configmanager0.gif (29.8 KiB)
appconfig0.gif (8.4 KiB)

When I click on the link you provided, it shows a 404 not found problem. I guess the project might have been removed. Would you please re-post the project and send me the link.

Yes it was removed and deleted as I can't keep all code samples I write. See my reply just posted before this which points to a project that uses a different version of System.Configuration.

0 Votes 0 ·