How to create a selection entry type with c# development (.NET API)?

Hello,

I want to create a selection entry type but with c# code (.NET API)

and to add to content.

E.g : I want to display a selection of status (comp_status).

How to create this selection and how to fill it?

Thanks.

Parents
  • 0

    Thanks for your answer Dinesh.

    I created a selection list from a "EntryGroup".

    I have a company grid below with a checkbox column.

    I would like to change the checked status following my selection list. How to do this?

    Here my code :

    public override void BuildContents()

    {

    if (this.Mode.Equals(Sage.Mode.View))

    {

    this.Mode = Sage.Mode.Edit;

    }

    GetTabs();

    AddContent("My Custom Page");

    AddContent("
    ");

    List ResultsGrid = new List("CompanyGrid");

    EntryGroup group = new EntryGroup("CompanyStatusCustom");

    vpMainPanel.AddAttribute("width", "100%");

    group.GetHtmlInEditMode();

    vpMainPanel.Add(group);

    AddContent(vpMainPanel);

    ResultsGrid[9].IsVisible = false;

    GridColCheckBox myCheckBox = new GridColCheckBox("comp_check");

    myCheckBox.ReadOnly = false;

    ResultsGrid.Add(myCheckBox);

    AddContent(HTML.Form(432, 2));

    ResultsGrid.Title = "MENGOOOO";

    AddContent(ResultsGrid);

    AddUrlButton("Test", "Save.gif", JsCheckBox());

    }

    Here is javascript code :

    private string JsCheckBox()
    {
    return
    "javascript:" +
    "var schecked='';" +
    "for(i=0;i" +
    "if (document.EntryForm.elements[i].name=='_CKBXcomp_check') {" +
    "if (document.EntryForm.elements[i].checked==true) {" +
    ...?
    "}" +
    "}" +
    "}" +
    "if (schecked == '')" +
    "alert('No Check Box Selected');" ;
    }

    Am I on the right track?

    Thanks.

  • 0 in reply to Sian Comak

    Porque me sale este error? 

    VM18410:1 Uncaught TypeError: Cannot read property 'elements' of undefined

Reply Children
No Data