Progresss Bar in Grid

Hello
I have tried to add progressbar in a grid but fail
I found this pageInsert control in gridbut not found clientsideevent in core
I found thi pagetemplatetemplate in example work but when I try use the progressbar I fail..

Could you please give me a example

Thanks you

Attachment: progressbar_9f0c0841.zip

3 Replies

MS Mani Sankar Durai Syncfusion Team January 2, 2018 12:32 PM UTC

Hi Atolgan, 

Thanks for contacting Syncfusion support.  

We have analyzed your query and found that you would like to show the progressBar inside the column in grid. Based on your requirement we have prepared a sample that can be downloaded from the below link 
We have achieved your requirement using template property by rendering the element and in the template-refresh event we have rendered the progress bar control for the element rendered as template.  
Please refer the code example 
<ej-grid id="Grid" allow-paging="true" datasource="ViewBag.datasource" template-refresh="template"> 
        <e-columns> 
            <e-column field="OrderID" header-text="Order ID" is-primary-key="true"></e-column> 
            <e-column field="EmployeeID" header-text="Employee ID"></e-column> 
            <e-column template="#coltemplate" header-text="progress bar"></e-column> 
           </e-columns> 
    </ej-grid> 
 
 
<script type="text/template" id="coltemplate"> 
    <div id="target1"> 
    </div> 
</script> 
 
<script> 
    function template(args) { 
        $(args.cell).find("#target1").ejProgressBar({ enabled:true , value: 20}); 
 
    } 
</script> 


Please let us know if you need further assistance  

Regards, 
Manisankar Durai. 



TH TheDarkBoz January 2, 2018 04:16 PM UTC

Hello

Thanks you so much it is okay.

I have two more question:

- Could I use custom css class or only syncfusion theme class?
- How could I put the text/template in separated file ? What is the file extension?

Best Regards


MS Mani Sankar Durai Syncfusion Team January 3, 2018 12:16 PM UTC

Hi TheDarkBoz, 

Query 1: Could I use custom CSS class or only syncfusion theme class? 
 
We have analyzed your query and we found that you would like to set the different style in grid. We can achieve your requirement using cssClass property in grid.  
Refer the documentation link: 
Refer the KB link to customize in grid. 
Also to modify the grid appearance we can also create a custom theme by generating and download the theme for Grid using theme studio. 
Please refer to the below documentation.  
 
Query 2: How could I put the text/template in separated file? What is the file extension? 
 
To render the template in a separate file and to bind for the grid we suggest you to refer the below document link 
Here we can use the template as JS extension or txt file 
 
Please let us know if you need further assistance.  
  
Regards, 
Manisankar Durai. 
 


Loader.
Up arrow icon