4 Replies Latest reply on Mar 2, 2012 10:20 AM by v2adam

    rich:extendedDataTable disable column resizable and drag in richfaces 4.2?

    v2adam

      Hi!

       

      I used richfaces 4.2 and extendedDataTable and i want to disable column resizable and drag.

      How can i do this?

       

      Thanks for attention!

        • 1. Re: rich:extendedDataTable disable column resizable and drag in richfaces 4.2?
          pvito

          Hi, Adam

           

          Try use attribute frozenColumns with value equal amount column.

           

          <rich:extendedDataTable value="#{myBeen.list}" var="v" iterationStatusVar="isv" id="table" frozenColumns="3">

           

              <rich:column>

                    <f:facet name="header">1</f:facet>

                      #{isv.index}

              </rich:column>

           

              <rich:column>

                   <f:facet name="header">2</f:facet>

                       #{v.value1}

              </rich:column>

           

              <rich:column>

                   <f:facet name="header">3</f:facet>

                      #{v.value2}

              </rich:column>

           

          </rich:extendedDataTable>

           

          Regards, Vitaliy

          • 2. Re: rich:extendedDataTable disable column resizable and drag in richfaces 4.2?
            v2adam

            Sorry Vitaliy, but not help, tried on several tables

            Vitaliy Pavlov wrote:

             

            Hi, Adam

             

            Try use attribute frozenColumns with value equal amount column.

             

            <rich:extendedDataTable value="#{myBeen.list}" var="v" iterationStatusVar="isv" id="table" frozenColumns="3">

             

                <rich:column>

                      <f:facet name="header">1</f:facet>

                        #{isv.index}

                </rich:column>

             

                <rich:column>

                     <f:facet name="header">2</f:facet>

                         #{v.value1}

                </rich:column>

             

                <rich:column>

                     <f:facet name="header">3</f:facet>

                        #{v.value2}

                </rich:column>

             

            </rich:extendedDataTable>

             

            Regards, Vitaliy

            • 3. Re: rich:extendedDataTable disable column resizable and drag in richfaces 4.2?
              v2adam

              I found how disabled column resizable, difine this css class:

               

              .rf-edt-rsz {

                   display: none;

              }

               

              Remains open question about disabled drag column?

              1 of 1 people found this helpful
              • 4. Re: rich:extendedDataTable disable column resizable and drag in richfaces 4.2?
                v2adam

                I found how disabled drag column, probably this not good solution, but ..... you must off mousedown event on table header:

                 

                <rich:jQuery selector=".rf-edt-hdr-c" query="off('mousedown')" timing="immediate"/>

                 

                and it works, but when you rerender extended table in stop work, so you must rerender not all table, just table body, like this idTable@body

                1 of 1 people found this helpful