dhtmlxLayout attachGrid() -- grid ID on form submit?

Hi,



I’m attaching a grid into dhtmlXLayout by using:



var grid = layout.cells(“a”).attachGrid();



In this case ID of the grid sent on HTML POST is randomly generated, for example:



dhxGridObj_FZzAFeHkcngR_ROWID



Is there a way I could define the ID used on HTML POST for a grid created using .attachGrid() ?



Thanks,

Sami


Hello,


the following property can be used:


var grid = layout.cells(“a”).attachGrid();
var id = grid.entBox.id;




Thanks for your answer,



Is there a way to assign a new ID?  I’ve tried:



grid.entBox.setAttribute(“ID”, “myGridID”);



and:



grid.endBox.id = “myGridID”;



But the original random ID is still used on form HTTP POST.



 



 


Do you mean the form extension usage ?


Locally grid.endBox.id = “myGridID” was applied correctly:


var grid = layout.cells(“a”).attachGrid();
grid.entBox.id = “myGridID”;



Please, provide the demo that allows to re-create the issue.


Yes,  i’m attempting to use the form extension with an ASP .NET form;



I have the layout inside the form tag like this:
























init_controls javascript function is defined inside page  -tag:








 



 



 



 


Locally the correct request is sent:


SelectedGroups_selected => selected_row_id


We have attached the same with php server-side.


1242047677.zip (117 KB)


Thanks for your quick reply, got it working now after setting the container ID using entBox.id,



after that I’ve just got mixed the correct request data to data from other grids (with random ids) in the same page.



Thanks!