Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    May 14, 2014 @ 10:23
    Ismail Mayat
    0

    usync with datatype grid

    I am using umbraco 6.1.6 and ucomponents 6.0.0.6 (well that's what the assembly version of uComponents.core is).  I have created a datatype grid property it has for the time being just 2 fields one textbox and one textbox multiple. When i look at the .config file in the usync/datatypedefintion folder i get:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <DataType Name="[Core] [uComponents dtg] Golden Questions" Id="82cc7433-acb3-4a7a-8ab3-a02ec6dd181e" Definition="08087dae-6535-40f4-b820-ac3ce3e0df19">
      <PreValues>
        <PreValue Id="1320" Value="{&quot;ShowLabel&quot;:false,&quot;ShowGridHeader&quot;:true,&quot;ShowGridFooter&quot;:true,&quot;ReadOnly&quot;:false,&quot;TableHeight&quot;:300,&quot;Mandatory&quot;:false}" />
      </PreValues>
    </DataType>

    This does not look like it has picked up my fields?  Any ideas?

    Regards

     

    Ismail

  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    May 14, 2014 @ 10:40
    Kevin Jump
    0

    Have you tried a "double" save (pressing save twice) - I have a sneeking recolection that the datagrid in ucomponentes had a strange "save gets fired before all the data is in the DB" thing going on.

    this - http://our.umbraco.org/projects/developer-tools/usync/usync/42358-uComponents-DataType-Grid - don't think i ever got to the bottom of it.

    It was in the uComponents forum too. http://our.umbraco.org/forum/developers/extending-umbraco/42412-Umbraco-or-uComponents-DataType-Grid-not-firing-OnSaving-Event

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    May 14, 2014 @ 11:18
    Ismail Mayat
    0

    Kevin,

    Just tried that no joy.  So one idea was to manually update the defintion file manually I did find in db table the json for each field looks like:

    {"Name":"Question","Alias":"question","Mandatory":false,"Visible":true,"ValidationExpression":"","DataTypeId":-88}

    {"Name":"Options","Alias":"options","Mandatory":false,"Visible":true,"ValidationExpression":"","DataTypeId":-89}

    So I guess i could just add that to the xml as PreValue for each field? One issue is I do not know where Id attribute on PreValue element comes from?  

    Is this good idea or very bad idea ;-}

    Regards

     

    Ismail

  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    May 14, 2014 @ 12:16
    Kevin Jump
    0

    I am by principle an avoider of the DB :)

    I don't quite now why the datagrid isn't getting it's properties stored in the same way, so I'm not sure it would work - as far as i know the prevalue id is just incremented from the table, but i think everything including drop downs takes the ID from there.

    up-until v7 the data value code was proper old school - it lives here https://github.com/umbraco/Umbraco-CMS/blob/6.1.6/src/umbraco.cms/businesslogic/datatype/PreValue.cs it tends not to follow the same patterns as some of the later stuff, but it looks like everything goes on in cmsDataTypePreValues

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    May 21, 2014 @ 10:13
    Ismail Mayat
    0

    Kevin,

    Only just got back onto this, when you say prevalue id is incremented from table which table do you mean?

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    May 21, 2014 @ 10:13
    Ismail Mayat
    0

    Kevin,

    Ignore that last post I just looked at the code link you sent DOH!!!

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft