Skip to main content
1-Visitor
August 30, 2018
Solved

advance grid search

  • August 30, 2018
  • 1 reply
  • 5903 views

How Can I implement search functionality in Advance Grid, I have enabled the "Enable Grid Search" checkbox in the advance grid properties.

how can I configure so that I can start working?

please suggest if anyone has an idea

Best answer by Harsha11

Hi,

As you suggested, this is what I wrote:

 

var params = {
url: "http://localhost:8020/vecv_services/api/shop",
proxyPort: undefined /* INTEGER */,
password: "Mestech@6" /* STRING */,
domain: undefined /* STRING */,
contentType: "application/json;charset=UTF-8" /* STRING */,
username: "mestech" /* STRING */
};

// result: JSON
var json = Resources["ContentLoaderFunctions"].GetText(params);

var obj = JSON.parse(json);

var paramsDS = {
infoTableName : "InfoTable",
dataShapeName : "Shop_DS_Harsha"
};

var infoTable = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(paramsDS);
var dt = obj.data

//for (var elem in json)
for (var i=0; i<dt.length; i++)
{
var row = dt[i];
var shopCodeVal = row.shopCode;
var shopNameVal = row.shopName;
var descriptionVal = row.description;
var plantNameVal = row.plantName;
var shopIdVal = row.shopId;

infoTable.AddRow({shopCode:shopCodeVal,shopName:shopNameVal,description:descriptionVal,plantName:plantNameVal,
shopId:shopIdVal});
}

//var result = infoTable;

var params = {
t: infoTable /* INFOTABLE */,
query: query /* QUERY */
};
// result: INFOTABLE
var result = Resources["InfoTableFunctions"].Query(params);

 

and took query parameter in the input field and base type as infotable

 

but still its not working 

can you please help me??

 

 

1 reply

5-Regular Member
August 30, 2018

If you have enable the search option in advance grid ,then you can simply put the text which you want to search and that is available in grid .What do you mean my configuration after that ?

It is already configured ,just type the text in the search box and see the result in the grid .

 

I think i got your query in right fashion ,correct me if this is about something else .

 

 

Thanks,

Mukul Narang 

Harsha111-VisitorAuthor
1-Visitor
August 30, 2018

yes but when I am entering text under the search text box and hitting the enter button it is doing nothing..

So, I thought there may be some configuration required.

following are the steps I did:

1) Load the service from which data is coming.

2)took a advance grid over the mashup

3)drag data from the service

4)enable the search option

and when I run the mashup and enter the text inside the search textbox it is not searching text.

please correct me If I am doing anything wrong?

 

5-Regular Member
August 30, 2018

So after enabling the search option ,do these two things 

1) Map the filter event from grid properties to the service which is giving data to the grid 

2) Map the QueryFilter event from properties to "query" parameter of your service parameters option .(There are parameter in service click on (+) sign of that and there will be a query ,map QueryFilter to this query )

 

Let me know if you are able to search ant text after this .

 

Thanks ,

Mukul Narang