find a register exist grid

Hello, How can found a register if exist ? is to foreach(){ or exist a function from ejgrid?


4 Replies

AG Ajith Govarthan Syncfusion Team October 15, 2021 01:26 PM UTC

Hi Jose, 

Thanks for contacting Syncfusion support. 

Based on your query you want to found register existence from the ej Grid. So, before we procced to your query, please share the below details to validate further on your requirement. 

  1. Please explain more details on the reported query “How can found a register if exist ? is to foreach(){ or exist a function from ejgrid?”.

  1. Please confirm that are you using EJ1 or EJ2 grid in your Grid application?
 
  1. Share the complete Grid code example.
 
  1. Please share your exact requirement.
 
  1. Share the Syncfusion package version.
 


Please refer the above links to refer about both EJ1 and EJ2 Grids. 

Regards, 
Ajith G. 



JA Jose Arturo October 15, 2021 07:03 PM UTC

I use ej1, I fix about if exist same IDProduct. If exist product not add to rows and if no exit product on grid add to row.



JA Jose Arturo October 15, 2021 07:23 PM UTC

Now, I have one problem, how can get all data row, not select.
Example I add a column with input:

 { field: "Cantidad", headerText: 'Cantidad', template: "<input id='product-{{:ProductId}}' type='number' value='1' size='7' min='1' max='{{:Cantidad}}' >", width: 80 },


I want send all data rows with button

$(".button").click(function(){

return allgridrows

})



FS Farveen Sulthana Thameeztheen Basha Syncfusion Team October 19, 2021 03:38 PM UTC

Hi Jose, 
 
Query#:-If exist product not add to rows and if no exit product on grid add to row. 
 
From your query, we suspect that you need to add only unique values to the corresponding row on performing add Action. We have already discussed these requirements in our KB  
 
Refer to the below KB links:- 
 
Also it is necessary to set isPrimaryKey property for unique field to perform Editing operation. So please ensure this scenario. 

Query#:- how can get all data row, not select. 

In order to get all rows we suggest to use getRows(to get all rows) and getCurrentViewData( to get the corresponding data) of the current Page. 

 
API links:- 
 
If we misinterpreted your query, please share more details such as detailed Explanation and what you need to perform using Template column to proceed further. 
 
Regards,
Farveen sulthana T 


Loader.
Up arrow icon