CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP.NET - InMotion Framework

 InsertAllowed or AllowInsert?

Print topic Send  topic

Author Message
vsuarez

Posts: 8
Posted: 02/25/2009, 5:35 AM

Hi. I have a page with an Editable Grid that has the Allow Insert set to No. I need to change this state when a button in the page is pressed, so I am following the CodeCharge Studio help and using:

myEditableGrid.InsertAllowed = true;

Which seems not to compile and gives me this error:

Compiler Error Message: CS1061: 'InMotion.Web.Controls.EditableGrid' does not contain a definition for 'InsertAllowed' and no extension method 'InsertAllowed' accepting a first argument of type 'InMotion.Web.Controls.EditableGrid' could be found (are you missing a using directive or an assembly reference?)

By looking in the inMotion help, I see that Records have the property AllowInsert, which compiles fine since I am not prompted with the error above, but it simply doesn't turn on the "Allow Insert" for this Editable Grid:

myEditableGrid.AllowInsert = true;

Any suggestions?

Thanks!
View profile  Send private message
Tuong Do
Posted: 02/26/2009, 5:42 PM

In the BeforeBuildInsert event of your editable grid, set the CmdExecution
variable to false

' -------------------------
' Write your own code here.

CmdExecution = false



"vsuarez" <vsuarez@forum.codecharge> wrote in message
news:3449a54930217ad@news.codecharge.com...
> Hi. I have a page with an Editable Grid that has the Allow Insert set
> to
> No
. I need to change this state when a button in the page is pressed,
> so I
> am following the CodeCharge Studio help and using:
>
> myEditableGrid.InsertAllowed = true;
>
> Which seems not to compile and gives me this error:
>
> Compiler Error Message: CS1061: 'InMotion.Web.Controls.EditableGrid'
> does
> not contain a definition for 'InsertAllowed' and no extension method
> 'InsertAllowed' accepting a first argument of type
> 'InMotion.Web.Controls.EditableGrid' could be found (are you missing a
> using
> directive or an assembly reference?)

>
> By looking in the inMotion help, I see that Records have the property
> AllowInsert, which compiles fine since I am not prompted with the
> error
> above, but it simply doesn't turn on the "Allow Insert" for this Editable
> Grid:
>
> myEditableGrid.AllowInsert = true;
>
> Any suggestions?
>
> Thanks!
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

vsuarez

Posts: 8
Posted: 02/26/2009, 7:15 PM

Thanks Tuong,

Tried that and also myEditableGrid.DataSource.CmdExecution = false, but got the error:

CS0103: The name 'CmdExecution' does not exist in the current context

Did a full search in the whole Inmotion source files for the word CmdExecution, but it is not declared or used. Seems to me that maybe Inmotion handles this in a different way :-/ and CodeCharge help is not very helpful on this with InMotion.

Regards,

Victor
View profile  Send private message
vsuarez

Posts: 8
Posted: 02/26/2009, 7:40 PM

I got it!!, and thank you Tuong since you where in the right direction!

InMotion handles this in a different way. The equivalent to CmdExecution = false (C#) in InMotion is e.Cancel = true, where e is the DataOperationEventArgs parameter in the BeforeBuildInsert method.

Got to check InMotion Help first until CodeCharge Help gets updated with this framework.

Victor
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.