Copied to clipboard

Flag this post as spam?

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


  • ridi 71 posts 103 karma points
    Jun 17, 2010 @ 11:26
    ridi
    0

    creating a custom datatype that display binding data

    DEar All,

    I want to create custom datatype that display as a radiobutton...

    starting by viewed the video in umbraco documentation and try to

    • create user control
    • drag and drop a grid...
    • in page load i read the database using old sqlconnection and include the connectionstring also to make sure it can work when i move it into umbraco project
    • i implement umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor
    • set and get the value with SelectedItem

    but unfortunetaly when i add it into datatype using usercontrolwrapper the umbraco is error without any clue..:(

    does anybody have a correct sample to create custom datatype that bind into an outer database in its UI?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jun 17, 2010 @ 13:22
    Ismail Mayat
    0

    ridi,

    Can you paste your code then we can see what you are trying todo.

    Thanks

    Ismail

  • ridi 71 posts 103 karma points
    Jun 17, 2010 @ 13:52
    ridi
    0

    Thanks for  a respons Ismail , i try to simplified what i want to do .. create a simple panel that read from umbraco library (group) and diplayed in a checkbox group...

     

    public partial class GroupPanel : System.Web.UI.UserControl,
            umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor

        {
            protected void Page_Load(object sender, EventArgs e)
            {
                MemberGroup[] groups = MemberGroup.GetAll;
                foreach(MemberGroup item in groups)
                {
                    chkGroup.Items.Add(item.Text);
                }
            }

            public object value
            {
                get
                {
                    return chkGroup.SelectedValue;
                }
                set
                {
                    if(value != null)
                    {
                        // will read from database
                       
                       
                    }
                }
            }
        }

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jun 17, 2010 @ 16:03
    Ismail Mayat
    0

    ridi,

    What is the error you are getting? Also take a look at Tims guide on how to create one http://www.nibble.be/?p=24

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft