on 04-15-2014 10:12 AM
Hello Everyone,
I am facing few issues while using UI5 Grid.
Scenario1:
I am using Sql query to display data in i5Grid.
This query accepts 3 input parameters and gives the respective values.
Initially i am giving the default parameters values in query template.
Now while generating report, I need to change the data in Grid based on selection.
I am passing the parameters as following.
gridObject.getQueryObject().setParameter("Param.1", param1value);
gridObject.getQueryObject().setParameter("Param.2", param2value);
gridObject.getQueryObject().setParameter("Param.3", param3value);
gridObject.getGridObject().setDisplayColumns("Column1,Column2");
gridObject.update(true);
I am also setting display column names as they are dynamic.
This time I am getting the Grid with default values only. The Grid is not updating as per the parameters passed.
Scenario2:
I am removing the default query input parameters and trying the same. It gives me an error:
Object doesn't support property or method 'setDisplayColumns'
Please help me with this issue.
Thanks and Regards,
Minakshi
Hi Minakshi,
I tried this.
Grid.getQueryObject().setParameter("Param.1",0); |
Grid.getQueryObject().setParameter("Param.2",30000);
Grid.getQueryObject().setParameter("Param.3","Available");
Grid.getGridObject().setDisplayColumns("eid,ename,esal");
Grid.update(true);
In 14.0 it is not working. You are correct.
But i tried the same in 15.0 , There it is working perfectly. So i think You can raise a ticket for the same mentioning the above scenario is not working in 14.0. So that It might be fixed in a patch.
Hope this info helps.
Regards,
Sriram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Minakshi,
Please mention the patch of MII 14.0 SP04 that you are using.
Now regarding the 2 scenarios:
1. This is an issue, and needs to be fixed. I haven't figured a work around for this.
2. In this case I assume you are calling setDisplayColumns() after draw(<id>)
I tried the same i.e on click of a button I call:
gridObject.getGridObject().setDisplayColumns("DateTime,AssetUtil1,AssetUtil3");
gridObject.refresh();
This worked fine.
However when I tried using setDisplayColumns method before calling draw i.e in the below sequence:
gridObject.getGridObject().setDisplayColumns("DateTime,AssetUtil1,AssetUtil3");
gridObject.draw('div1');
This failed giving js error.
Hope this helps.
Regards,
Ria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ria,
Thanks for your reply.
I am also using SAP MII 14.0 SP4.
In second scenario, as I mentioned, I am still getting error at
gridObject.getGridObject().setDisplayColumns("Column1,Column2");
gridObject.refresh();
I guess this error might be because I am not giving any initial parameters to Query and also
gridObject.getQueryObject().setParameter("Param.1", param1value);
is not working. So my Grid will not get any data and further it cannot set any display columns. Once I am resolved with the parameter setting issue I will get the setDisplayColumns command working.
I am making this statement based on a case where I hardcoded the default parameters in query and then try setDisplayColumns function. In this case, no errror is thorwn.
Please confirm this.
I am facing one more issue:
On page load, I do not wish to update my grid with any data but I need the grid to be displayed. So I am drawing the grid on initialize function(with no default/ actual parameters). So it throws error at this moment also. Is there any way to avoid this error.
Regards,
Minakshi
User | Count |
---|---|
8 | |
7 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.