Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to create groups in SelectItem ? like html : SELECT / OPTGROUP / OPTION

    How to create groups in com.smartgwt.client.widgets.form.fields.SelectItem ?

    With setSeparatorRows(ListGridRecord[] separatorRows) ? The are no exemple of use...

    For exemple like : OPTGROUP - Option Group :
    Code:
      <SELECT NAME=browser>
        <OPTGROUP LABEL="Firefox">
          <OPTION LABEL="2.0 or higher">
            Firefox 2.0 or higher
          </OPTION>
          <OPTION LABEL="1.5.x">Firefox 1.5.x</OPTION>
          <OPTION LABEL="1.0.x">Firefox 1.0.x</OPTION>
        </OPTGROUP>
        <OPTGROUP LABEL="Microsoft Internet Explorer">
          <OPTION LABEL="7.0 or higher">
            Microsoft Internet Explorer 7.0 or higher
          </OPTION>
          <OPTION LABEL="6.x">Microsoft Internet Explorer 6.x</OPTION>
          <OPTION LABEL="5.x">Microsoft Internet Explorer 5.x</OPTION>
          <OPTION LABEL="4.x">Microsoft Internet Explorer 4.x</OPTION>
        </OPTGROUP>
        <OPTGROUP LABEL="Opera">
          <OPTION LABEL="9.0 or higher">Opera 9.0 or higher</OPTION>
          <OPTION LABEL="8.x">Opera 8.x</OPTION>
          <OPTION LABEL="7.x">Opera 7.x</OPTION>
        </OPTGROUP>
        <OPTION>Safari</OPTION>
        <OPTION>Other</OPTION>
      </SELECT>
    Last edited by immobilia; 20 May 2009, 05:11. Reason: Add links

    #2
    How to create groups in SelectItem ? like html : SELECT / OPTGROUP / OPTION

    I am also having the same requirement this needs to be implement into my project. Please give us any suggestion on the above mentioned query.

    I think this feature is not provided by the SmartGWT. If not give any alternative solution.
    Last edited by satyag; 18 Dec 2009, 01:05.

    Comment


      #3
      How to create groups in SelectItem ? like html : SELECT / OPTGROUP / OPTION

      Sorry to resurrect an old thread.

      I'd like to know if this is possible for a SelectItem in a DynamicForm (we're using SmartClient 8.2 Pro) ?

      I'd use this in the context of a static list of items (not bound to a dataSource).
      Last edited by couimet; 15 Apr 2013, 11:29. Reason: Forgot to add a title

      Comment


        #4
        You can provide separator rows as mentioned above if you use an optionDataSource.

        If you have a static list, you can make it into a DataSource using DataSource.clientOnly.

        Comment


          #5
          optionDataSource and OptGroup for SelectItem

          Thanks for the help Iso...

          But, are there any examples out there we can look at? Like maybe on the ShowCase? Any docs you can refer us to?

          BTW .. I am using the latest SmartGWT 4.0 with Firefox 22.

          Comment

          Working...
          X