¿ GridView how to hide the column header filter ?

  1. #1

    ¿ GridView how to hide the column header filter ?

    Hello,

    ¿ Is there any way to hide my filters (gridView), from server side without hiding the headers ?


    thanks in advance! =)
  2. #2
    hello again,

    I am hiding the filters using this line...

    Ext.get(Ext.query(".x-grid3-hd-row-r0")).setStyle('display', 'none', 'important');
    by:
    X.AddScript("Ext.get(Ext.query(".x-grid3-hd-row-r0")).setStyle('display', 'none', 'important');");
    when the gridview is updated, the header is displayed again!, how can I to modify a style permanently ?
  3. #3
    Hi,

    When a grid is refreshed it causes all things to be re-rendered. So, there is no more an element which you add custom style for.

    There is the Refresh event of GridView which you could you to re-apply styles.
  4. #4
    hello Daniil,

    I found something that I can do..

    When I set the datasource to the store, I could add the style:

                                Store store = this.seleccionarCfdiGridPanel.GetStore();
                                store.DataSource = listaCfdi;
                                store.DataBind();
    
    X.AddScript("Ext.get(Ext.query(".x-grid3-hd-row-r0")).setStyle('display', 'none', 'important');");
    but, this is not working because, the script is placed before the update...


    please, check the attached images =)

    thanks!Click image for larger version. 

Name:	steep_one.png 
Views:	213 
Size:	43.9 KB 
ID:	4120Click image for larger version. 

Name:	steep_two.png 
Views:	184 
Size:	70.7 KB 
ID:	4121
  5. #5
    Why don't want to use GridView Refresh?

    Well, if you want to execute some JavaScript after loading a data to the Store (after DataBind), you should use its Load listener.
  6. #6
    Hello,

    sorry, I didn't see you answer!

    I just want to know... ¿ is there a chance to execute some function after the data bind from server side? I see that the generated response script has a "serviceresponse" variable that is used to bind the store..

    by example..

    <textarea>{script:"winSeries.setTitle(\"AAAA\");", serviceResponse:{success:true,data:{data:[{"Id_Folio":"82a5ed33-b0ed-46c5-b72b-1b8b561b5411","Id_Usuario":"5fd99a35-21d4-4ee2-8d4e-44f1088fb850","Id_Num_Emisor":"faebc9dd-8f21-4ae5-a17d-3d6fd9102819","Serie":"A","FolioDesde":1,"FolioA": 100,"FolioInicio":1,"Fec_Movto":"2012-04-30T19:40:58.877","Fol_UltAsignado":1,"Estatus":tru e}], total: 0}} Add here something }</textarea>
    thats is the idea.. is that posible ?
  7. #7
    I think you should listen the Store Load listener. It fires when the Store loads its data.
    http://docs.sencha.com/ext-js/3-4/#!...ore-event-load

Similar Threads

  1. [CLOSED] How to Hide Header row in gridview of GridPanel
    By legaldiscovery in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 06, 2012, 1:20 PM
  2. [CLOSED] Hide the column option(on click of column header) for treegrid
    By AnulekhaK in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 01, 2012, 11:16 AM
  3. Replies: 0
    Last Post: Jun 21, 2011, 12:18 PM
  4. gridpanel: hide column header
    By pintun in forum 1.x Help
    Replies: 2
    Last Post: Sep 23, 2009, 11:53 AM
  5. [CLOSED] Add filter button to grid column header
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 08, 2009, 10:10 AM

Posting Permissions