PDA

View Full Version : does anybody use DevExpress.XtraGrid.Views.Layout.LayoutView


bingheyuren
09-03-2009, 05:13 PM
Hi,all..

I'm testing some thing with DevExpress.XtraGrid.GridControl and DevExpress.XtraGrid.Views.Layout.LayoutView

but, why any Columns cant show ?[actually, I want show some photos on the card.] I'm new .net student

you can get more info from there, http://www.devexpress.com/Help/?document=XtraGrid/CustomDocument3518.htm&levelup=true


dlls can download in this link
http://www.afeel3d.com/dlls.rar



and, thank you for any nice guy.

this is my test code:


DotNet.LoadAssembly @"c:\XLO.dll"
DotNet.LoadAssembly @"c:\XGD.dll"
----dotforgot download the dll
(
/*HForm*/
hForm = dotNetObject "MaxCustomControls.MaxForm"
hForm.Size = dotNetObject "System.Drawing.Size" 400 300
hForm.Text= "test"

/*FLP */
local FLP = dotnetobject "DevExpress.XtraGrid.GridControl"
FLP.dock =(dotNetclass"System.Windows.Forms.DockStyle").fill
/*LView*/
Lview = dotnetobject "DevExpress.XtraGrid.Views.Layout.LayoutView"
lView.CardMinSize = dotNetObject "System.Drawing.Size" 150 200
lView.optionsheaderpanel.showcustomizebutton=false
lView.OptionsBehavior.AutoPopulateColumns = false
FLP.MainView =Lview
lView.Columns.AddField("Photo")
Lview.GridControl = FLP
Lview.Name = "cardView1"
lView.Columns.Item["Photo"].Caption ="caption"
lView.Columns.Item["Photo"].AppearanceCell.BackColor =(DotNetClass "System.Drawing.Color").fromARGB 80 80 80

hform.Controls.Add(FLP)

hForm.ShowModeless()
)

PEN
09-04-2009, 01:09 AM
XtraEditors and XtraTreeList ship with Max, XtraGrid doesn't, unless you have purchased it your self? If so you shouldn't be passing out the DLL here as I would think that is a violation of the license.

biddle
09-04-2009, 01:23 AM
Perhaps we should lobby Autodesk to license the DXExperience WinForms suite and bundle it in with the 2010 service pack?

Anyhow, if you have a legal copy of the XtraGrid available, here's how you can use it.


fn test =
(
-- NOTE: CGTalk forums will insert spaces into the following lines around the last "DevExpress"
DotNet.LoadAssembly @"C:\Program Files (x86)\Developer Express Inc\DevExpress 2009.1\Components\Sources\DevExpress.DLL\DevExpress.XtraGrid.v9.1.dll"
DotNet.LoadAssembly @"C:\Program Files (x86)\Developer Express Inc\DevExpress 2009.1\Components\Sources\DevExpress.DLL\DevExpress.XtraLayout.v9.1.dll"

/*HForm*/
hForm = dotNetObject "MaxCustomControls.MaxForm"
hForm.Size = dotNetObject "System.Drawing.Size" 400 300
hForm.Text= "test"

/*FLP */
FLP = dotnetobject "DevExpress.XtraGrid.GridControl"
hform.Controls.Add(FLP)
FLP.dock =(dotNetclass"System.Windows.Forms.DockStyle").fill
/*LView*/
Lview = dotnetobject "DevExpress.XtraGrid.Views.Layout.LayoutView"
lView.CardMinSize = dotNetObject "System.Drawing.Size" 150 200
lView.optionsheaderpanel.showcustomizebutton=false
lView.OptionsBehavior.AutoPopulateColumns = false
FLP.MainView =Lview
colId = lView.Columns.AddField("ID")
colId.visible = true
colName = lView.Columns.AddField("Name")
colName.visible = true
colAge = lView.Columns.AddField("Age")
colAge.visible = true
colPhoto = lView.Columns.AddField("Photo")
colPhoto.visible = true
riPictureEdit = FLP.RepositoryItems.Add "PictureEdit"
riPictureEdit.SizeMode = riPictureEdit.SizeMode.Squeeze
colPhoto.ColumnEdit = riPictureEdit
lView.GridControl = FLP
lView.Name = "cardView1"
lView.Columns.Item["Photo"].AppearanceCell.BackColor =(DotNetClass "System.Drawing.Color").fromARGB 80 80 80
/*Add some Data*/
img = dotnetClass "System.Drawing.Image"
imgdir = (getdir #maxroot) + @"ui\Icons\"

dt = dotnetObject "System.Data.DataTable"
dt.columns.add "ID" (dotnet.gettype "System.UInt32")
dt.columns.add "Name" (dotnet.gettype "System.String")
dt.columns.add "Age" (dotnet.gettype "System.UInt32")
dt.columns.add "Photo" (dotnet.gettype img)

dt.beginloaddata()
dt.loaddatarow #(1, "Jane", 20, img.FromFile (imgdir + "Exposure_24i.bmp") ) true
dt.loaddatarow #(2, "Joe", 30, img.FromFile (imgdir + "LockButton_i.bmp") ) true
dt.loaddatarow #(3, "Bill", 40, img.FromFile (imgdir + "AutoGrid_24i.bmp") ) true
dt.endloaddata()
/* Set the datasource and show the form */
FLP.DataSource = dt

hForm.ShowModeless()
)
test()

bingheyuren
09-04-2009, 05:47 AM
Perhaps we should lobby Autodesk to license the DXExperience WinForms suite and bundle it in with the 2010 service pack?

Anyhow, if you have a legal copy of the XtraGrid available, here's how you can use it.



Thank you very much....

I will buy the license later.. I really like DevExpress~!

CGTalk Moderation
09-04-2009, 05:47 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.