We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid column filter placeholder

Thread ID:

Created:

Updated:

Platform:

Replies:

128706 Feb 7,2017 09:10 AM UTC Feb 8,2017 10:10 AM UTC Angular 1
loading
Tags: ejGrid
Rykunov Alex
Asked On February 7, 2017 09:10 AM UTC

Is it currently impossible (without custom template, at least) to put placeholder in the grid column filter?

Venkatesh Ayothi Raman [Syncfusion]
Replied On February 8, 2017 10:10 AM UTC

Hi Alex, 
Thanks for contacting Syncfusion support. 
We have prepared the sample based on your requirement which can be download from following link, 

In this sample, we have put place holder for each filter column by using Grid create event. This event triggers after Grid control created. Please refer to the following code example and Help document for more information, 
Code example
@Grid 
<ej-grid #grid  [dataSource]="gridData" [allowPaging]="true" [allowFiltering]="true"  [toolbarSettings.toolbarItems]="['add', 'edit', 'delete','cancel','update']" [toolbarSettings.showToolbar]="true" (toolbarClick)="selectColumn($event)"  (create)="create($event)"
 <e-columns>         
       . . . 
    </e-columns> 
</ej-grid> 
 
@create event 
 
export class AppComponent { 
 
             
           //Create event 
            create(args:any){ 
 
                var length = $(".e-filtertext").length; 
                for( var i=0;i<length;i++){ 
                    var placeholderVal = args.model.columns[i].field +" "+"Value"; //placeholder text (for demonstration purpose we have used the corresponding column field name as placeholder)    
                 $(".e-filtertext").eq(i).attr("placeholder",placeholderVal); //Set the placeholder for each filter column 
 
                } 
            } 

Screenshot
 
If we misunderstood your query, then could you please share the more information about your requirement? 

Regards, 
Venkatesh Ayothiraman. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;