LockingGridPanel - Frozen Columns

Page 1 of 2 12 LastLast
  1. #1

    LockingGridPanel - Frozen Columns

    Coolite implementation of Condor's LockingGridPanel extension.http://extjs.com/forum/showthread.php?p=369120


    You should be able to open the solution and make sure the reference to Coolite dlls are correct.


  2. #2

    RE: LockingGridPanel - Frozen Columns

    Thanks for sharing :)

    I am mainly using codebehind in order to autogenerate grids to display data from various SQL server tables based upon an xml configuration file

    I have some problems getting your control to work as intended
    Your sample runs ok and I can see that you're wrapping the gridpanel and column objects

    I have added the webcontrol to my solution and changed references to ext.GridPanel to use ux.LockingGridPanel likewise with all columns

    I have also set the Locked property on the first columns in my grid, but don't "see" any locked columns

    Is it possible to use the control in codebehind or is only for markup?

    Thanks in advance
  3. #3

    RE: LockingGridPanel - Frozen Columns



    I also generate my grid from codebehind because of dynamic column configs from the database. It works for me. I can even change columns on ajaxevents. Can you post a code sample?

    Also, what version are you using? I believe the newest Coolite is using ExtJS 2.3 which does not support this extension. That's the main reason why I haven't updated from SVN in awhile.
  4. #4

    RE: LockingGridPanel - Frozen Columns

    Hi

    I am using Coolite 8.1
    I will try to downgrade to see if it works on earlier versions just to check my implementation
    If it turns out to be a problem I'll throw together a sample later

    8.1 is the earliest I can use in prod due to a little nasty bug in the gridpanel
    http://forums.ext.net/showthread.php...14891-5-1.aspx

    EDIT: I am also using 8.1 when running the small testapp you have provided, it's not the version then
    I'll build a small sample

    I am using Accordians/Treeview in a Viewport where I have the GridPanel in the center
    Both topbar (toolbar) and bottombar (pagingtoolbar) are used in the GridPanel

    Thanks
  5. #5

    RE: LockingGridPanel - Frozen Columns

    That sounds like the same setup I have. A treepanel in West region, tabs and gridpanel in Center. I am using 0.8.2.1.
  6. #6

    RE: LockingGridPanel - Frozen Columns

    I have thrown together a small sample which is working execellent :-)

    EDIT: First of all I am using "ColumnModel.Columns.AddRange" returning af range of columns using a method to return a range of columns based upon an xml configuration
    I am also using a range of different types of columns eg date, checkbox etc

    I will assume that all columns needs to have the locked property to have it all work properly?

    EDIT2: I can confirm that AddRange is working nicely and as expected

    I haven't tested the "all columns needs to have the locked property set" thing, but when examining the clientside sourcecode behind IE I noticed that the property is only send to the client if it's set explicit in code (nice) - looks like it is not nessecary to extend the checkColumn class - this is not tested

    I have managed to drill down my problem though :-)
    I have been using a customized gridview in order to translate eg EmptyText
    I commented out the sourcecode involved and everything started working as designed

    Offending code:
    // Add customized gridview
    ext.GridView gridview = new ext.GridView();
    gridview.ID = "gridView";
    gridview.EmptyText = String.Format(Language.Danish.View_EmptyText, table.Label);
    gridPanel.View.Add(gridview);
    Thanks
  7. #7

    RE: LockingGridPanel - Frozen Columns

    Ups I have a problem with misalignment of rows due to height of the row as I have an icon in my first column

    Any ideas?

    EDIT: I am using detailsrenderer as in this example
    https://examples1.ext.net/#/GridPane...Window_Remote/

    I have added "margin-top: -2px; margin-bottom: -2px;" to the style section of the javascript function, eg:

    var detailsRenderer = function () 
        {
            return '<img class="imgEdit" 
                ext:qtip="Klik for at se / redigere detaljer" 
                style="cursor:pointer; margin-top: -2px; margin-bottom: -2px;" 
                src="images/vcard_edit.png" />';
        }
    rgds
  8. #8

    RE: LockingGridPanel - Frozen Columns



    I had a similar issue because I was using a row command in one of the columns. I ended up increasing the size of each row. Please try adding the following styles to your page (the last one is optional to turn on vertical gridlines).

    I believe I also made a few more updates to the lockinggridpanel js file for some bug fixes with IE6 scrolling. I will try and post an updated file soon.

    /* Bigger row height to accomodate review column */ 
    .x-grid3-row td, .x-grid3-summary-row td
    {
     line-height: 15px !important;
     padding-left: 0px;
     padding-right: 0px;
    }
    
    
    /* Fix locked row numberer */ 
    .x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner
    {
     padding-bottom: 3px !important;
    }
    
    
    /* Vertical grid lines */.
     .x-grid3-col
    {
     border-left: 1px solid #FFFFFF;
     border-right: 1px solid #EEEEEE;
    }
  9. #9

    RE: LockingGridPanel - Frozen Columns

    Thanks a lot

    I have a minor problem though
    As I wrote I had added a gridview in codebehind which is in conflict with the view you're adding in the javascript (only added if a view is not created)

    The more advanced part of ExtJS and clientside scripting is a little too much for me too fully grasp what's going on :)

    In my code I am changing the background color based on row status
    Codefragments:

    <style type="text/css">
        /* Styles for setting different row colors */
        .dirty-row {
            background:#fffdd8;
        }
        .new-row {
            background:#c8ffc8;
        }
    <body>
        <form id="form1" runat="server">
            <script type="text/javascript">
            //<![CDATA[
                function getRowClass(record) {
                    if (record.newRecord) {
                        return 'new-row';
                    }
                    if (record.dirty) {
                        return 'dirty-row';
                    }
                }
            //]]>
            </script>
    // Add customized gridview
    ext.GridView gridview = new ext.GridView();
    gridview.ID = "gridView";
    gridview.EmptyText = String.Format(Language.Danish.View_EmptyText, table.Label);
    // There is a bug in the gridview component
    // ref: http://forums.ext.net/showthread.php...ew+getrowclass
    ext.JFunction fn = new ext.JFunction();
    fn.Fn = "getRowClass";
    gridview.GetRowClass = fn;
    gridPanel.View.Add(gridview);
    gridPanel.Listeners.RowContextMenu.Handler = Scripts.DataGrid.RowContextMenu;
    This also gives me a belt across the grid based upon cursorposition of the mouse
    Any ideas on how to add the above to your code?

    Thanks
  10. #10

    RE: LockingGridPanel - Frozen Columns

    jchau (10/25/2009)


    I believe I also made a few more updates to the lockinggridpanel js file for some bug fixes with IE6 scrolling. I will try and post an updated file soon.
    Thanks

    I just found a little but confusing bug in the header row
    I am using the rowfilters and lockinggridpanel interferes and recoloring of the header cell is misaligned to the right depending on the number of rows currently locked
    Not so pretty

    Any ideas?

    I will check the ExtJS forums and see if I can find something

    rgds
Page 1 of 2 12 LastLast

Similar Threads

  1. Help with Combobox Two Columns
    By abelvn in forum 1.x Help
    Replies: 4
    Last Post: Oct 20, 2011, 4:53 PM
  2. [CLOSED] Any chance of adding frozen columns to GridPanel?
    By jchau in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 22, 2009, 12:21 PM
  3. Replies: 0
    Last Post: Mar 10, 2009, 4:56 AM
  4. Replies: 1
    Last Post: Jan 29, 2009, 10:46 AM

Posting Permissions