Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8338

UI5 Table refresh

$
0
0

Hi All,

 

One of my requirement is to save the data from the text field and show the saved data into the table at the bottom.Also update the data when the user edits.

When the user edits the new data is updated in the grid but when I select the row it gives the old cell value.

Please see the code attached and give me a better solution.

 

var oTableCalc = new sap.ui.table.Table("maintable",{

  id : 'CalcTable',

  visibleRowCount: 5,

  firstVisibleRow: 0,

  selectionMode: sap.ui.table.SelectionMode.Single,

  fixedColumnCount: 1,

  editable:false

  });

 

$.ajax({
type: "POST",
url:'/XMII/Illuminator',
async: false,
cache:false,
data: {"QueryTemplate":"HZL/Call_StorProc", "Content-Type": "text/xml","Param.1":oDatePicker1.getValue(),"Param.2":oDropdownBox3.getValue(), "Param.3":oDatePicker1.getValue(),"Param.4":oTF1.getValue(), "Param.5":oTF3.getValue(), "Param.6":oTF5.getValue(), "Param.7":oTF7.getValue(), "Param.8":oTF9.getValue(), "Param.9":oTF2.getValue(), "Param.10":oTF4.getValue(), "Param.11":oTF6.getValue(), "Param.12":oTF8.getValue(), "Param.13":oTF10.getValue(), "Param.14":User, "Param.15":User,"Param.16":oTF11.getValue(), "Param.17":"1"},
dataType:"xml",
success:function(data)
{
window.xmlData = data;
    if($(data).find('output').text() != "") {

                                                    

                                                      // alert($(data).find('output').text());

                                                                              }

else
{
var oCore = sap.ui.getCore();
var reftable = oCore.byId("maintable");
var oModelCalc = new sap.ui.model.json.JSONModel("/XMII/Illuminator?QueryTemplate=HZL/Get_Roaster_Data&Param.1="+oDatePicker1.getValue()+"&Content-Type=text/json");

                                                                            oTableCalc.setModel(oModelCalc);

                                                                            oTableCalc.bindRows("/Rowsets/Rowset/0/Row");

 

 

 

 

 

 

 

 

}
}
});

 

 

Regards

G.Partheeban


Viewing all articles
Browse latest Browse all 8338

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>