|
You need to register the dll for COM use with the regasm.exe tool.
|
|
|
|
|
Hi,
I am using collection to bind data to datagrid.
Dim oCars as CarCollections = New CarCollections
DataGRid1.DataSource = oCars
Everyithing work fine but there is a sorting problem.
If I do so, there is no sorting features in DataGrid. When I bind DataSet to Datagrid I can Sort data in DataGrid by clicking on columns header. DataGRid automaticly sort filled data according clicked colum.
When I bind datagrid to Collection that features is missing.
What should i do, in Collection class - CarsCollection, to have sorting features back
Thanks in advance
P.S. Sorry for bad English
... Never argue with an idiot, they will drag you down to their level and beat you with experience
|
|
|
|
|
|
Try this sub method using own datagrid name
Private Sub DataGrid2_SortCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs)
Dim dataGrid As DataGrid = source
Dim strSort = dataGrid.Attributes("SortExpression")
Dim strASC = dataGrid.Attributes("SortASC")
dataGrid.Attributes("SortExpression") = e.SortExpression
dataGrid.Attributes("SortASC") = "Yes"
If e.SortExpression = strSort Then
If strASC = "Yes" Then
dataGrid.Attributes("SortASC") = "No"
Else
dataGrid.Attributes("SortASC") = "Yes"
End If
End If
Dim dt As DataTable = getData()
Dim dv As DataView = New DataView(dt)
dv.Sort = dataGrid.Attributes("SortExpression")
If dataGrid.Attributes("SortASC") = "No" Then
dv.Sort &= " DESC"
End If
dataGrid.CurrentPageIndex = 0
dataGrid.DataSource = dv
dataGrid.DataBind()
End Sub
|
|
|
|
|
Hi,
I want to detetmin parent class
For instance there is a Cars collection with Car item.
Cars collection has some property that I need to access from Car item.
Cars collection
Property_01
Property_02
CarItem(s) (Type, Name, Year, ...)
I want to obtain the value of Property_02.
Every CarItem is already inside Cars collection and I am sure that there is way to obtain parent class.
How to do that?
Do not send answers like "You have to hold a reference to the CarsCollection in the CarItem"
I think that is something about iComponent or something similar.
Tancev Sasa
|
|
|
|
|
Tancev Sasa wrote:
Do not send answers like "You have to hold a reference to the CarsCollection in the CarItem"
Why not? As far as I can see it is the most obvious solution.
Tancev Sasa wrote:
I think that is something about iComponent or something similar.
Sure, the IComponent interface (note that it is an interface and you are going to have to create the implementation yourself), has a property called Site, which returns an ISite (another interface, meaning you will have to implement it yourself again) which manages the relationship between an IContainer (which you have to implement on your collection) and and IComponent.
And, guess what you are going to have to do in your eventual implementation for the IComponent, IContainer and ISite interfaces....
Do you want to know more?
|
|
|
|
|
|
Hello people,
If I use objects in the System.Data.SqlClient for database access do I need to include MDAC in my deployment setup?
|
|
|
|
|
|
I want Microsoft to alter the .net framework in such a way as to provide at least minimal protection for software developer's intellectual property and or licensing.
They designed just about the entire .net framework from the ground up to provide protection for users and didn't think to spend even 2 seconds worrying about the developers they are trying to convince to use it.
I know some of you are going to say "Well what can they do, it's an intermediate language" I know that, but the point is that *they* wrote it and they have many big brains on staff that could have considered the developers and *their* rights but I don't think they did for even a second.
The way it is now, every .net app is an "open source" app, whether you wanted it to be or not. You have essentially zero protection of your software and their only apparent solution is obfuscation which still makes cracking a license scheme a matter of a day instead of minutes.
At least in the Win32 days a certain level of knowledge was required to crack a skillfully written license protection scheme. You could be confident if you were compromised it was by experts, not by any moron with a two week knowledge of .net and a freely downloaded utility from the internet.
(No, I'm not ranting because we were cracked, I'm ranting in anticipation of having to devise some sort of license scheme for a very large .net application)
Microsoft have the advantage of course of controlling windows itself so if they release .net based apps in future they can probably work some protection for them right into the O.S. if need be. I'll be curious to see what they do.
Anyone with me?
Anyone know where to more effectively post this rant?
Am I dreaming that anything will ever get done?
|
|
|
|
|
Doesn't .NET already have some licensing framework?
my blog
|
|
|
|
|
For components it has some rudimentary bits you have to fill in. In terms of license protection it has absolutely nothing of consequence.
|
|
|
|
|
I am looking for a good article about the cost of using XML and the resultant Serialization that is required - compared to using binary representation
Can anybody help?
|
|
|
|
|
Perhaps this is a stupid question, but I sought plenty and I didn't get to find. Imagine that there is an enumeration as the one that proceeds:
[Flags ()]
public enum AnyOptions
{
Option1 = 1,
Option2 = 2,
Option3 = 4
}
Now there is a property in a specialization of System.Windows.Forms.TextBox
public class MyCustomTextBox: System.Windows.Forms.TextBox
{
private AnyOptions options = AnyOptions.Option1;
[Browsable(true)]
public AnyOptions Options
{
get {return this.options;}
set {this.options = value;}
}
}
Question:
As I do for this property to have a "normal" behavior in the properties window. I imagine that it is some editor type, I don´t know.
Thanks in advance,
Marcelo Palladino
Brazil
|
|
|
|
|
Hi,
i'm a .NET newbie and hope someone can help me. I try to build something like an applet (Java) with C# and .NET. I've been told this can be done by a windows forms control assembly embedded in a html page via the well known <object> tag. Indeed,
everything works fine except the control's database access to a local database. Here i get the exception "SQLClientPermission denied". I'm sure the problem lies in the CLR access policies for the code of the embedded control (coming from the intranet zone). Can anyone tell me how to grant this SQLClientPermission to the code of my control?
Thanks for your help,
Fridtjof
|
|
|
|
|
In .NET Compact Framework, System.Threading.Monitor.Wait(Object obj) and
System.Threading.Monitor.Pulse(Object obj) are not available. Does anyone know to use these functions or replace by other functions in .NET Compact Framework?
Really Thanks a lot!!!!!
|
|
|
|
|
well, friends i hav a problem to run a subdomain for a domain name on 1 IP address. for example I want that my site can be access to the user as other sites does like mail.yahoo.com or forum.yahoo.com.
I am waiting for your response plz help me to get rid out of this prob as soon as possible.
thanks.
|
|
|
|
|
Hi All,
I need a tool/program to convert my Code From C++ To C#.
Please send me if you know anything to ahmed_el_sherif@hotmail.com or ahmed.elsherif@eds.com
Thnaks in advance
|
|
|
|
|
I doubt there is such things, maybe a c++ to c++.net or older c# to newer c#
IM PROUD TO BE A GMAIL;
|
|
|
|
|
hi i have just migrated over to .net i converted a previous MFC applications of mine
however there is one thing i cannot find/figure out and that is how to use the class wizard to modify the classes i have already made for my dialogs. i figured out how to create new classes for dialogs and variables but not how to modify the existing ones via the popup menu on the dialog
can someone please tell me how to modify my existing classes via the wizards?
|
|
|
|
|
is there even a class wizard? i remember i never used that when i used mfc anyways, learn how to make classes by yourself, very helpful
are you using c#[^] or c++.net[^]?
IM PROUD TO BE A GMAIL;
|
|
|
|
|
|
Hi all
I have developed a com interop application in C#, its output is .dll.
It is working fine in the workstation (windows XP)
Now I wand manually deploy the same DLL in windows 2003 server, the server already has .net Framework
Can any one tell me how to deplay the com interop DLL?
More over I am integrating the C# DLL with a VC++ (Version 6) Client, the client will read the CLSID from the registry and create the instance of the .net component.In this case can any one guide me that how to deploy the interop component?
Thanks
|
|
|
|
|
Hi,
I know i have set this up wrong and am looking for a way to correct it.
I have a main form which contains all the functions/methods for my application. I am now however using pop up forms which change the contents of variables on the main form. I can pass variables betweem the forms using Property Get and Set.
I was wondering can i access methods from the main form in the pop up forms? I keep getting a "Reference to a non shared member requires an object reference" exception when i try and call them even though they are public
Any help much appreciated
Steve69
|
|
|
|
|
Steve69 wrote:
I have a main form which contains all the functions/methods for my application.
Well, overlooking that design flaw....
Steve69 wrote:
I keep getting a "Reference to a non shared member requires an object reference" exception when i try and call them even though they are public
It isn't the fact that it is public that is stopping you. It is the fact that the property can return different values for different instances of the form (or any class for that matter). So, it need to know which instance - even if there is only one instance in the application.
If you need a property to get/set the same value regardless of which particular instance of a class you are using then you need to declare it as static (or Shared in VB.NET)
Do you want to know more?
|
|
|
|