wxPropertyGridManager* pgman = m_pPropGridManager;
     wxPropertyGridPage* pg = pgman->GetPage(wxT("wxWidgets Library Config"));
 
-    // Set custom column proportions
-    pg->SetColumnProportion(0, 3);
-    pg->SetColumnProportion(1, 1);
+    // Set custom column proportions (here in the sample app we need
+    // to check if the grid has wxPG_SPLITTER_AUTO_CENTER style. You usually
+    // need not to do it in your application).
+    if ( pgman->HasFlag(wxPG_SPLITTER_AUTO_CENTER) )
+    {
+        pg->SetColumnProportion(0, 3);
+        pg->SetColumnProportion(1, 1);
+    }
 
     wxPGProperty* cat;