From 6796e84364450d31007388befc5dcb5d9028fa24 Mon Sep 17 00:00:00 2001
From: tux091 <renaud.legac@free.fr>
Date: Mon, 30 Jan 2012 21:15:30 +0100
Subject: [PATCH] Bug fixed

---
 models/widgets.py             | 3 +++
 modules/plugin_dbui/cvtsvc.py | 9 +++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/models/widgets.py b/models/widgets.py
index 723fd7e2..8017f885 100755
--- a/models/widgets.py
+++ b/models/widgets.py
@@ -164,6 +164,9 @@ gridModifier.merge_columns('title',
 
 gridModifier.hide_columns('authors_cppm',
                           'e_print')
+
+gridModifier.set_rownumbering()
+
 #
 # Setup a filter panel for the publication grid
 #
diff --git a/modules/plugin_dbui/cvtsvc.py b/modules/plugin_dbui/cvtsvc.py
index 6b78fdaf..532b6fa7 100644
--- a/modules/plugin_dbui/cvtsvc.py
+++ b/modules/plugin_dbui/cvtsvc.py
@@ -117,10 +117,6 @@ class CvtSvc(BaseSvc):
             delete_columns = grid_modifiers[tablename].delete_columns
             template_columns = grid_modifiers[tablename].template_columns
         
-        # row numbering in the first colum,
-        if grid_modifiers[tablename].row_numbering:
-            models.append({'xtype': 'rownumberer'})
-            
         # standard column
         for field in table:
             fieldname = field.name
@@ -135,6 +131,11 @@ class CvtSvc(BaseSvc):
             col = {'xtype': 'templatecolumn', 'sortable': True}
             col.update(tpl.extjs)
             models.insert(tpl.position, col)
+
+        # row numbering in the first column
+        if grid_modifiers[tablename].row_numbering:
+            models.insert(0, {'xtype': 'rownumberer'})
+            
                 
         return models
 
-- 
GitLab