xml = new Glade.XML (null, "consultar_afiliado.glade", "consultar_afiliado", null);
xml.Autoconnect (this);
- lista.Model = new ListStore (typeof(int), typeof(string), typeof(int), typeof (string), typeof(string));
+ lista.Model = new TreeModelSort (new ListStore (typeof(int), typeof(string), typeof(int), typeof (string), typeof(string)));
/* Columnas */
lista.HeadersVisible = true;
lista.AppendColumn ("Número Doc.", new CellRendererText (), "text", 2);
lista.AppendColumn ("Nombre", new CellRendererText (), "text", 3);
lista.AppendColumn ("Apellido", new CellRendererText (), "text", 4);
+
+ int i = 0;
+ foreach (TreeViewColumn col in lista.Columns) {
+ col.SortColumnId = i++;
+ }
+ lista.EnableSearch = true;
+ lista.Reorderable = true;
+ lista.HeadersClickable = true;
}
public void OnVerAfiliado (object o, EventArgs args)
}
AfiliadoSolicitanteController c = new AfiliadoSolicitanteController ();
- ListStore store = (ListStore)lista.Model;
+ ListStore store = (lista.Model as TreeModelSort).Model as ListStore;
store.Clear ();
ArrayList lst = c.BuscarAfiliados (tipoDoc, nroDoc, cod, null);
foreach (Afiliado p in lst) {