"Property value is not valid" when PropertyGridView tries to convert a string to a custom object type.

Hi,
I have a problem with an PropertyGrid enum property that uses a type converter.
In general it works, but when I double clicking or using the scoll wheel,  an error message appears:
"Property value is not valid"
Details: "Object of type 'System.String' cannot be converted to type 'myCompany.myProject.CC_myCustomProperty."
I noticed that the CommitValue method (in PropertyGridView.cs) tries to convert a string value to a CC_myCustomProperty object.
Here is the code that causes the error (see line 33):
(Using the .net symbols from the PropertyGridView.cs file)
1
        internal bool CommitValue(GridEntry ipeCur, object value) {   
2
3
            Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose,  "PropertyGridView:CommitValue(" + (value==null ? "null" :value.ToString()) + ")");   
4
5
            int propCount = ipeCur.ChildCount;  
6
            bool capture = Edit.HookMouseDown;  
7
            object originalValue = null;   
8
9
            try {   
10
                originalValue = ipeCur.PropertyValue;   
11
12
            catch {   
13
                // if the getter is failing, we still want to let  
14
                // the set happen.  
15
16
17
            try {  
18
                try {   
19
                    SetFlag(FlagInPropertySet, true);   
20
21
                    //if this propentry is enumerable, then once a value is selected from the editor,   
22
                    //we'll want to close the drop down (like true/false).  Otherwise, if we're  
23
                    //working with Anchor for ex., then we should be able to select different values  
24
                    //from the editor, without having it close every time.  
25
                    if (ipeCur != null &&   
26
                        ipeCur.Enumerable) {  
27
                           CloseDropDown();   
28
29
30
                    try {   
31
                        Edit.DisableMouseHook = true;  
32
/*** This Step fails because the commit method is trying to convert a string to myCustom objet ***/ 
33
                        ipeCur.PropertyValue = value;   
34
35
                    finally {   
36
                        Edit.DisableMouseHook = false;  
37
                        Edit.HookMouseDown = capture;   
38
39
40
                catch (Exception ex) {   
41
                    SetCommitError(ERROR_THROWN);  
42
                    ShowInvalidMessage(ipeCur.PropertyLabel, value, ex);  
43
                    return false;  
44
I'm stuck.
I was wondering is there a way to work around this? Maybe extend the string converter class to accept this?
Thanks in advance,
Eric

 
Hi,
Thank you for your post!  I would suggest posting your question in one of the MS Forums,
 MSDN Forums » Windows Forms » Windows Forms General
 located here:http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=8&SiteID=1.
Have a great day!

Similar Messages

  • On my iphone 4 i tried to enter my $25 itunes card and it says its not valid when i bought it yesterday... whats the problem?

    On my iphone 4 i tried to enter my $25 itunes card and it says its not valid when i bought it yesterday... whats the problem?

    http://support.apple.com/kb/ts1292Try this link...
    Message was edited by: all the answers

  • Attribute value is not valid

    After executing an RFC, I want to get a table of elements that is passed as the Output.
    As soon as I try to get the first element of the Output table, via xxxNode.getElementAt(index), I receive this error:
    Attribute value is not valid for attribute 'Flag_Stam_Orig' of model class 'it.prova.mctciat_rfc.checkprintstatus_sr00.Zmctbpm_Rfc_Output_Print_A'
    com.sap.tc.cm.base.model.BaseGenericModelClass.setAttributeValue(BaseGenericModelClass.java:327)
    com.sap.tc.cm.arfc2.model.ARFC2GenericModelClass.unmarshalFromJCoRecord(ARFC2GenericModelClass.java:287)
    com.sap.tc.cm.arfc2.model.ARFC2ModelObjectCollection.doUnMarshalAt(ARFC2ModelObjectCollection.java:97)
    com.sap.tc.cm.arfc2.model.ARFC2ModelObjectCollection.get(ARFC2ModelObjectCollection.java:120)
    com.sap.tc.webdynpro.progmodel.context.ModelElementList.getElement(ElementList.java:1726)
    com.sap.tc.webdynpro.progmodel.context.Node.getElementAtInternal(Node.java:387)
    com.sap.tc.webdynpro.progmodel.context.Node.getElementAt(Node.java:395)
    it.prova.mctciat_rfc_client_man.rfcclientmanagercomp.RFCClientManagerComp.callSpecifiedRFC(RFCClientManagerComp.java:1163)
    Before calling .getElementAt(index) I use xxxNode.size() to get the number of returned elements and then I execute a for loop in which I visit all the elements of node XXX.
    Can someone help me?
    Thank you,
    Pietro
    Edited by: pietro.m on Dec 3, 2010 2:10 PM

    I've solved the problem.
    At first the attribute generating the error was defined ABAP-side as a custom domain based on CHAR (1) type that allowed only two possible values: "O" or "X". But the ABAP function returned only " " (empty space) or "X".
    So we tried to add "O" to the set of the legitimate values, but that did not solve the problem.
    Next we got rid of the custom type and custom domain and we defined the parameter as a simple CHAR (1).
    That made the problem disappear and, best of all, I can't still figure why. Anyway, the problem is solved and that is all that matters now.
    *I'm sorry to say this in a SAP forum, but SAP's approach to type checking sucks really hard.*
    It is not possible that the ABAP side does not check types and the Java side raises these kind of errors (and, please note that it is not allowed to change a model type in Java).
    Anyway, thank you Nizamudeen for helping me.
    Edited by: pietro.m on Dec 7, 2010 9:41 AM

  • Error : This balancing segment value is not valid for the current ledger

    Dear friend,
    Error : This balancing segment value is not valid for the current ledger.
    when I click Account Assignment in Budget Organization.
    I used R12
    Thank you
    Best regards,
    Hareyuya, Junior.

    Hi,
    Please see these documents.
    Note: 756765.1 - Cannot Use Parent Balancing Segment Values In Massbudget or MassAllocation Formula
    Note: 790339.1 - Cannot Select Parent Values In Mass Budgets
    Note: 437588.1 - Rel 12: Balancing Segment Value Is Not Valid For Current Ledger
    Regards,
    Hussein

  • MDSModelDeploy Operation Failed, clone cannot be deployed, The Attribute Value is not valid

    I've created a model containing a customer entity with various domain based attributes.  I've populated the entities via a combination of manual entry and the staging tables.  In the source system I have approx 950 customer records, all of which
    fail validation on the source system as some of the attributes will be maintained only in MDS and are not in the source systems I'm pulling the initial data from.
    I ran the MDSModelDeploy.exe to create a package containing data on the source system.  I then ran the package to apply the package using the -deployclone option on my target system.  I piped the output into a flat file for review.
    Here is the error I'm receiving.
    MDSModelDeploy operation failed. Elapsed time: 00:01:00.2314612
    Error:
    A clone of the "Subzero_1" model cannot be deployed.
    An error occurred while processing message request type 'EntityMembersMergeRequest'. See exception details for more information.
    Package deployment failed with 344 errors
    The attribute value is not valid.
    The attribute value is not valid.   (repeated 344 times)
    Any ideas what the issue might be?  I have tried verbose logging as well and did not find anything that would point me in the direction of the problem.  The end result was that the model was not deployed to the target.
    I have also created a package without data, deployed that, then applied the data.  This gets the model to the target and the data also appears to be there but I did receive this error on the deployupdate.
    This is on SQL Server 2012.

    I am seeing the same error. Created a model, Cloned the model. Made changes to the clone (Schema and Data), and used MDSModelDeploy UpdateModel to update the primary (not cloned) model.  In looking at the log, I see the error shown below, but I do not
    see anything that points to what was happening at the time.
    I tried running a SQL trace to see if one of the SQL commands received an error, but none of the commands did.
    In looking at the model that was updated, I can see all of the schema changes were made, and most of the data was updated. There is one table that did not update completely. The attributes in the table consist of Domain Specific and text attributes only. 
    I also verified that everything on both models was validated before starting.
    In the weblog I see the error listed below, but there is nothing in the data that would match that value 
    Not sure were to go from here....
    Chad
    --- MDSMODELDEPLOY ERROR RECEIVED ---
    MDS Error: 0 : Microsoft.MasterDataServices.WebUI.ServiceAdapterObjectInvalidException: An error occurred while processing message request type 'EntityMembersMergeRequest'. See exception details for more information.
       at Microsoft.MasterDataServices.WebUI.ServiceAdapter.InspectResponseForErrors(MessageRequest request, MessageResponse response)
       at Microsoft.MasterDataServices.WebUI.ServiceAdapter.ExecuteRequest[TRequestType,TResponseType](MdmServiceOperation`2 operation, TRequestType request)
       at Microsoft.MasterDataServices.WebUI.ServiceAdapter.DoEntityMembersMerge(EntityMembers entityMembers)
       at Microsoft.MasterDataServices.Deployment.ModelDeployer.BatchEntityMembersMerge(Collection`1 masterData, Boolean membersOnly, Int32 batchSize, Int32 totalBatches, Collection`1 errors)
       at Microsoft.MasterDataServices.Deployment.ModelDeployer.UpdateData(Collection`1 masterData, Warnings errorsAsWarnings)
       at Microsoft.MasterDataServices.Deployment.ModelDeployer.DeployUpdate(Package package, Boolean includeData, Identifier targetVersionId)
       at Microsoft.MasterDataServices.Deployment.Utility.ModelDeploy.DeployUpdate(String serviceName, String packageFile, String versionName)
       at Microsoft.MasterDataServices.Deployment.Utility.ModelDeploy.Main(String[] args)
        DateTime=2014-02-06T16:03:17.8405277Z
    -- WEB ERROR RECEIVED --
    MDS Verbose: 0 : Unable to convert value of query string parameter Id = VID to an integer
        DateTime=2014-02-06T17:18:00.7367274Z

  • Business Rule err The following value is not valid for the run time prompt.

    Hyperion Planning v 9.3.3
    I have created a new BR with 2 local variables (created at the time of the BR), Variables are set as run time prompts. They are created as "Member" (not Members). The BR basically does a calc dim on dense and Agg on Sparce other than the prompt on Entity and Version dimensions. The entity variable has a limit on level 0 of the dimension. The Version variable limits to the input (Submit and Sandboxes)
    The BR is associated in Planning with an input web form. Entity and Version are in the page. Is set to Run on Save and Use members on form.
    If the run time prompts Hide boxes are checked, an empty Prompt pops up with only a Submit button. Click the button and an error comes up: "The following value is not valid for the run time prompt it was entered for:. But it does not indicate what member - just ends in the :.
    The BR will run sucessfully only if the Run-time prompt is not hidden - "Hide" in the BR is unchecked. So the syntax and logic of the BR is correct and security should not be an issue.
    The client wants no prompt. In production we have similar situations in which the BR works with the Web Forms without a prompt.
    What am I doing wrong - I have tried restarting the Planning service and the EAS service.

    My preferred method of doing this is:
    1. In business rule, do not hide the run-time prompts. This makes it easy to validate the business rule as you are building it. I only use Global Variables.
    2. On the form, have business rule set to run on save, use members on data form and hide prompt.
    Check that in the business rule, for the variables (Run-Time prompts), that they are all in use. If not, delete them from the business rule. Are all your variables global? Are some local and some global? This could be the issue.
    Deanna

  • Error in InfoView "The Parameter Value is not Valid"

    Hello,
    I have developed a Crystal Report in CR2008 and uploaded in the InfoView. Now when i run the report via scheduling or load the report with the data and try to change the parameter (editable set in CR) from the drop down list and hit apply i get an error dialogue box "The parameter value is not valid" and message says "null".
    Also another issue is that i cannot execute the report directly in InfoVIew, i have to schedule it to run the report. Report is connected to the SAP InfoSet.
    Any input would be much appreciated.
    Thanks.

    We have rebuild new servers for InfoVIew and it just works fine. Both the problem solved.

  • My Songs in my Ipod Touch 4 is not appearing when I tried to Play it but when i insert to my PC and use Itunes, songs,playlist appears in I tunes.What do I need to do?Can someone help me?Many thanks

    My Songs in my Ipod Touch 4 is not appearing when I tried to Play it but when i insert to my PC and use Itunes, songs,playlist appears in I tunes.What do I need to do?Can someone help me?Many thanks

    Try:
    - Another cable
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer          
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • The page contains markup that is not valid when attached to master page

    Hi,
    I have create an web application in VS 2005 and convert into VS2008. now i am facing a problem that a single page is not open in design mode which is inherit from master page.
    and a message comes.
    Error: The page contains markup that is not valid when attached to master page
    please give me the suggestion that how can i open this page in design mode.
    Thanks
    Gaurav Anand

    Neither worked for me.  Here is my code.
    <
    asp:Content ID="Content1" ContentPlaceHolderID="fkhead" Runat="Server">
    <script runat="server">
    Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not Page.IsPostBack Then
    Dim a As String = "This is other data"
    pqriminadpaylbl.Text = a
    pqrimincustlbl.Text = a
    pqriminadpaylbl.Text = a
    pqriminpcdevlbl.Text = a
    pqriminpctoollbl.Text = a
    pqriminsaleslbl.Text = a
    pqriminspadeslbl.Text = a
    pqriminspamatlbl.Text = a
    pqrimintdamortlbl.Text = a
    pqrimintdcclbl.Text = a
    pqrimintddtlbl.Text = a
    pqrimintdfclbl.Text = a
    pqrimintucdeslbl.Text = a
    pqrimintucdollarlbl.Text = a
    pqrimintucmatlbl.Text = a
    pqriminvolaslbl1.Text = a
    pqriminvolaslbl2.Text = a
    pqriminvolasyear1lbl1.Text = a
    pqriminvolasyear1lbl2.Text = a
    pqriminvolasyear1lbl3.Text = a
    pqriminvolasyear1lbl4.Text = a
    pqriminvolasyear1lbl5.Text = a
    pqrimindislbl.Visible =
    False
    pqriminprevbtn.Visible =
    False
    pqriminnextbtn.Visible =
    False
    End If
    End Sub
    </script>
    <style type="text/css">
    .trest
    .newStyle1
    text-align: right;
    .table
    width: 100%;
    .newStyle2
    font-size: 20pt;
    font-weight: bold;
    text-decoration: underline;
    text-align: center;
    .tdparts2
    font-size: 16pt;
    font-weight: bold;
    .tb25
    width: 25%;
    font-size: 9pt;
    .tb20
    width: 20%;
    font-size: 9pt;
    .tb40
    width: 40%;
    font-size: 9pt;
    .tb30
    width: 30%;
    font-size: 9pt;
    </style>
    </
    asp:Content>
    It works fin, but the designer keeps craping out.  This was not happening until recently.  Not sure what is up with it.

  • HT4528 My Apple ID or password is not recognized when I tried to download an app. I reset my password but it still did not work. My id and password worked fine on this website.

    My Apple id and password is not recognized when I tried to download an app. I reset my password but it still did not recognize it. This website recognized it.

    Did you go to Settings>iTunes and App Stores and sign out and sign back in?

  • My July 2009 iMac with OSX Mavericks "iMac is not supported" when I tried to perform bluetooth with my iPhone 5. What is the problem. thanks

    My July 2009 iMac with OSX Mavericks "iMac is not supported" when I tried to perform bluetooth with my iPhone 5. What is the problem. thanks

    Bluetooth is only supported for tethering.
    Barry

  • Serial number not valid when upgrading from LR4 to LR5 [was:leewayphotography]

    J’ai acheté LR 4 il y a 1 an avec le n° de série sur la boite. J’ai acheté l’upgrade pour LR 5 et je n’ai jamais pu installer la version définitive avec ce n° de série.Ce n° de série n'est pas valide. La durée version d’essai est terminée et donc je dois retourner à LR 4 pour continuer à travailler ? Pourquoi cela ne fonctionne pas?

    Bonjour.
    J'ai bien compris votre réponse qu'il fallait utiliser un nouveau n° de série. J'ai bien téléchargé LR5 le 18 mars 2014, j'ai bien reçu une facture
    n° IEE2014000174985 mais je n'ai pas de trace d'un nouveau n° de série. Il n'est pas sur la facture, ni dans le logiciel?
    Que faut-il faire
    Leewayphotography
    From: John Waller
    Sent: Monday, April 21, 2014 10:14 PM
    To: leewayphotography
    Subject: Serial number not valid when upgrading from LR4 to LR5 was:leewayphotography
          Re: Serial number not valid when upgrading from LR4 to LR5 was:leewayphotography
          created by John Waller in Photoshop Lightroom - View the full discussion

  • Trying to buy an app, but it took me tore-set my credit card...My security code is all of a sudden not valid. I tried to re-enter itbutits the same MSG. Can u help?

    Trying to buy an app, but it took me tore-set my credit card...My security code is all of a sudden not valid. I tried to re-enter itbutits the same MSG. Can u help?

    Is the address on your iTunes account exactly the same (format and spacing etc) as on your credit card bill : http://support.apple.com/kb/TS1646 ? If it is then you could try what it says at the bottom of that page :
    If the issue persists, contact your credit card company and verify that they and any company they use to process credit card authorisations have the correct information on file.
    And/or try contacting iTunes support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • I bought student mac air through university account, Iworks were included when I purchased mac air. But there are no iworks and It's not free when I tried to download from App Store

    I bought student mac air through university account, Iworks were included when I purchased mac air. But there are no iworks and It's not free when I tried to download from App Store. OS was OS X Mountain Lion 10.9 When I received it. Is it because of OS? I upgraded to OS X Mavericks right after I got it.

    Today, I went to the mac store and asked the staff about above issue. Apple obviously sent me a mac air which was manufactured before October 2013 and therefore, iworks and OX Mavericks weren't installed. I have refund for around £45 to purchase iworks. However, I wasn't happy with what Apple actually did. I asked for replacement and refund the one I got and getting the new one from store so I can use mac straight away. however, the refund takes 5-7 working days. The staff on the phone told me if I have enough money I can just buy the new one in the store and get refund later. So I gave up! I was so disappointed with Apple. Even though I use the mac now, this was not the one Apple promised when I purchased online. if anyone would like to buy a mac, Please go to the actual store. DO NOT buy a mac through MAC ONLINE STORE!!! I strongly recommend! I feel like I wasted my time because the company doesn't keep its promise.

  • Please i just got an ipnone 4 from my brother in the UK, after unlocking and upgrading to IOS5, it keeps showing "sim card not valid" when i want to activate it. am confused, and any help will be well appreciated. Thanks i live in Nigeria

    Please i just got an ipnone 4 from my brother in the UK, after unlocking and upgrading to IOS5, it keeps showing "sim card not valid" when i want to activate it. am confused, and any help will be well appreciated. Thanks i live in Nigeria

    How was this iPhone unlocked?  Did a carrier unlock for you?
    If you did the unlocking by jailbreaking there is nothing anyone on here can do to help you.

Maybe you are looking for

  • Help needed in creating a multiple surface graph.

    Dear all, Thank you for taking the time to read my question. I have an equation with 3 variables. I have managed to plot 2 variable(and the result of the equation) on a 3d surface plot and now I am trying to plot the third one as multiple surfaces. M

  • Any way to pass Multiple Values for a single Label in the Parameter?

    I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610" One of the Filters in the Report is an Operation numbe

  • Is there a max # of Sidekick Component Groups?

    Our site currently has 5 component groups including 'Other', but if I try to add a new one, they just get added to 'Other' instead of their own component group that I tried to create. Is there a maximun number of component groups that can display in

  • Epson Perfection 4870 not working with Mountain Lion

    I've just upgraded to Mountain Lion.  Now my scanner is not working.  I can get it to make a preview scan, but then I get a dialogue box that says the carriage is locked.  This is not the case.  Worked fine with lion.  There is no update on the Epson

  • Error when copying purchase order to AP invoice

    When trying to copy purchase orders to AP invoice for one vendor (several invoices).... we receive error "This document cannot be added, becuase the base document row was updated. Copy the document again from its base document. Message 439-197