Dear all,
We could create a dynamic tab with grid by using rowselected event. but please advance how could make it be selected and display on the top of the tabs.
the following code which we had
var totalItems = 0;
function rowSelected(arg) {
var content = document.getElementById('tab-content').value;
var ajax = new ej.base.Ajax('/Home/_StaffView?GUID='+ arg.data.EM_GUID, 'GET', true);
ajax.send().then();
ajax.onSuccess = function (data) {
var ctn2 = data;
// Required tab item object formed by using textbox inputs
var item = { header: { text: arg.data.EM_NAME }, content: ctn2 };
totalItems = document.querySelectorAll('#element .e-toolbar-item').length;
// Item object and the index argument passed into the addTab method to add a new tab
tabObj.addTab([item], totalItems-1);
}
};
var totalItems = 0;
function rowSelected(arg) {
var content = document.getElementById('tab-content').value;
var ajax = new ej.base.Ajax('/Home/_StaffView?GUID='+ arg.data.EM_GUID, 'GET', true);
ajax.send().then();
ajax.onSuccess = function (data) {
var ctn2 = data;
// Required tab item object formed by using textbox inputs
var item = { header: { text: arg.data.EM_NAME }, content: ctn2 };
totalItems = document.querySelectorAll('#element .e-toolbar-item').length;
// Item object and the index argument passed into the addTab method to add a new tab
tabObj.addTab([item], totalItems-1);
}
};
Thank a lot!
KennethT