all groups > dotnet windows forms designtime > may 2005 >
You're in the

dotnet windows forms designtime

group:

Generate Query Builder Programitically



Re: Generate Query Builder Programitically joeycalisay
5/4/2005 12:00:00 AM
dotnet windows forms designtime: you can try attaching the editor attribute like the oledbcommand object's
commandtext property, note, it is under a VSDesigner assembly...

[Editor("Microsoft.VSDesigner.Data.ADO.Design.OleDbCommandTextEditor,
Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor)),
RefreshProperties(RefreshProperties.All), DataCategory("DataCategory_Data"),
DefaultValue(""), DataSysDescription("DbCommand_CommandText")]
public string CommandText
{
get
{
if (this.cmdText == null)
{
return string.Empty;
}
return this.cmdText;
}
set
{
if (ADP.SrcCompare(this.cmdText, value) != 0)
{
this.OnSchemaChanging();
this.cmdText = value;
}
}
}


--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]

Re: Generate Query Builder Programitically joeycalisay
5/4/2005 12:00:00 AM
Sorry about that, I just pasted the whole property with the attribute from
Reflector. Just add the same Editor attribute to see if it will work
(probably not, perhaps the components are tightly coupled). If it is not
possible, just use Reflector so you have an idea how to implement your
own...

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]

Generate Query Builder Programitically anandjain5 NO[at]SPAM gmail.com
5/4/2005 2:17:22 AM
hi all

I want to create my own OledbCommand control.Since OledbCommand class
is sealed class.
I can't inherit control from that.I inherit control from usercontrol
and take an object of oledbcommand control
and expose required properties.So for the commandtext property,I want
to open query builder for the control.


So how to open query builder programitically.


regards
Jaini
Re: Generate Query Builder Programitically anandjain5 NO[at]SPAM gmail.com
5/4/2005 5:53:53 AM
Hi Joeycalisay

Thanks for reply.
But I am getting 'System.Data.DataCategoryAttribute' is inaccessible
due to its protection level and I don't understand what is
ADP.SrcCompare?
and this.OnSchemaChanging() method?

regards
Jaini
Re: Generate Query Builder Programitically joeycalisay
5/9/2005 12:00:00 AM
It was expected since the assembly which contains the said class is the one
used by VS....

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]

Re: Generate Query Builder Programitically anandjain5 NO[at]SPAM gmail.com
5/9/2005 12:26:41 AM
Hi Joeycalisay

Thanks for reply.

It works,when I hosted my control on VisualStudio.net, but when I
hosted on my own designer this property comes as simple string property

regards
Jaini






[quoted text, click to view]
Re: Generate Query Builder Programitically anandjain5 NO[at]SPAM gmail.com
5/10/2005 1:49:37 AM

So How to use control in my own Designer?
Can I get Query Builder tool somewhere else?
AddThis Social Bookmark Button