Hello there,
as you might have seen from other threads, I have to do some work with javascript.
I have some points where I cant see a solution but I guess, the webdatagrid can solve this:
On the edit mode, I want the editing template to overlay the clicked row. So before entering the edit mode, I save the original height and set this as Margin-Top after showing.
Here is the javascript function:
function enterRolesEditMode(btnClientId) { var btn = document.getElementById(btnClientId); var origTrHeight = $(btn).closest('tr').height(); GridRowEnterEditMode(btn, 'EditRole'); var templateId = $find('dgrRoles').get_behaviors().get_editingCore()._behaviors._behaviors[0]._templateId; var divToChange = $('#' + templateId).children('div'); divToChange.css('margin-top', "-" + origTrHeight + "px"); }
It works not bad, but the height doesnt seem to fit the real height of the row, since there are small stripes of the underlayed row shown.
Is there a possibity per grid to find the correct height? the JQuery height doesnt seem to fit.
Second case:
I have troubles removing empty rows (which I create as hack for the hierarchical grid case), my approach is something like this:
function RemoveRoleAttributeGridRow(previousBtnClientId) { var btn = $('#' + previousBtnClientId); var tr = btn.closest('tr'); tr.next('tr').remove(); }
It would work, but the timing is wrong since I dont have the information I need at this time. Is there a easy solution for something like 'GetEmptyRows'?
Thanks for your response and a good start in the week!
Matthias
Hello Matthias,
I have updated this thread http://es.infragistics.com/community/forums/t/80926.aspx.
Hello Prabha,
thanks for your response.
This case http://es.infragistics.com/community/forums/t/80926.aspx
has to do with positionating the row as well, you might wanna close this one and merge it here.
I am currently working on this matter. I will update you before the end of the day Friday with the progress.
Please let me know if you have any questions.