can we pass Listview with data to another class library project class in vb net - vb.net

I want to pass list view to another class library project class. I want all data in another class without loss of data and without change in original values. Is their any way??

Related

How to get whole viewmodel in taghelper process method?

Is it possible to get the whole view model in tag helper Process method (.NET Core MVC)?
Everything passed to the tag helper is done via attributes. If you want the whole view model, then you'd simply so domething like:
<mytag model="#Model" />
And then you'd need a property on your tag helper to bind this to like:
public MyViewModel Model { get; set; }
The name of the attribute corresponds to the name of the property. There's nothing special about "model" here.
However, the utility of that is going to be limited. Tag helpers are intended to be somewhat generic. That's the point: encapsulating reusable logic. If you tie it to a particular view model class (based on the property), then it will only work with that particular view model. The only way to make it more generic would be to use a base class or to literally type it as object, so that anything could be passed. However, with a base class, 1) you need to have every view model inherit from this base class and 2) even then, you'd only be able to use properties on the base class. With object, you wouldn't really be able to reference any properties unless you downcast it to a particular view model class first. While that would allow you to handle any scenario, in principle, you'd be forced to have long blocks of switch or if statements in your tag helper to conditionally handle different scenarios.
Long and short, it's not a great idea for many reasons to pass the whole model. The tag helper should have one specific purpose, and you should only pass things that are specifically needed by it, which also allows you to be explicit about those needs.
If you're looking for something to handle a whole model, you're more likely looking for a partial view or view component, rather than a tag helper.
The viewmodel is actually available if you bind first the for element as :
[HtmlAttributeName("asp-for")]
public ModelExpression For { get; set; }
Then you can access it in your tag helper Process or ProcessAsync through:
For.ModelExplorer.Container.Model

How to get the class type of a calling class in a method call in a different referenced project

My solution is called "PlasmaBlueTooth_Soln" and there are many projects included in the solution.
One of the projects is called "PlasmaBluetooth" and contains many classes and a module and is the startup project for the application
(The module "startUpModule" contains the Main sub that starts the application.).
I have a class MainFormTestClass in the "PlasmaBluetooth"
that inherits a windows form MainForm.
I created many UserControls in separate projects that are used in the MainFormTestClass by instantiating a variable in MainFormTestClass, as the userControl in the separate projects then adding the instantiated control to the MainForm window controls.
The UserControl projects are referenced in the "PlasmaBluetooth" project. I have a method PerformAction in MainFormTestClass that calls a method
UserControlAction in a usercontrol class with an argument of Me.
I would like to use the MainFormTestClass Type in the method
UserControlAction(byref MeData as MainFormTestClass) However, the MainFormTestClass Type is not defined in the userControl project.
How do I get the MainFormTestClass Type in the UserControl project ?

Passing multiple properties in vuejs witch class

I'm trying to create a reusable components with BEM methodology in mind by using global mixins.
Here is a live example of what I'm trying to do in this example https://codesandbox.io/s/ojyym18355
As you can see, I would like to be able to pass multiple props as an array with class, so it will render test test--one, so far only the last class test--one is output.
Any idea how I can solve this problem? thank you!
In your code example, when you add multiple bindings this way v-bind="[test, test_one]", it transforms into following bindings on the element:
class="test"
class="test--one"
Which, means that the last value overwrites class binding and you are left with a single value of test--one.
As a solution, classes can be passed the same way as multiple bindings - as an array or object. Here is an example:
Note, that this is an example of more flexible usage of bindings. In order to make reusing components efficiently, initial data format of mixin's data property may require adjustments.

FileHelpers dynamic class generation to support [TypeConverter(typeof(ExpandableObjectConverter))]

I am using FileHelpers class for dynamic generating the class
I got the result also but when I bind to property grid its not showing the nested object. Its says class need to have this attribute
[TypeConverter(typeof(ExpandableObjectConverter))]
But the class is dynamically generated through FileHelpers so how can I provide this attribute?
I even appended the string by fails fail to create the class now dynamically.
Please advise is there a way I can add this attribute to the class created dynamically through FileHelpers.

How to assign package to dynamically created structure/table type/program

I'm creating dynamic structure and table type with DDIF_TABL_PUT and DDIF_TTYP_PUT fm's. I cant find package parameter in input parameters for these function modules so I used TR_TADIR_INTERFACE to assign package to my dynamically created objects. But beside it creates a record in TADIR table i can't see newly created objects in my local object tree.
Is this the right way to assign package to dynamically created objects and if not how to do it?
Also can I use this fm to assign package for program?
I'd recommend using the RPY_TABLE_* function modules instead since they cover TADIR and access control handling as well. Other than that, try updating the object list of the package (context menu action in SE80) - it is a common occurrence that generated objects do not appear in the UI because some buffer was not reset properly.