Drag a control and Drop it on a cell of a table as in ASP.Net
-
Hi to all, How is it possible and help needed in "Drag a control(like textbox,button etc some where on the page and Drop it on a cell of a table which is on the same page". Just like when we create a table with some rows and columns on a ASP.Net webpage and from ToolBox when we drag a control and drop it on any of the cell of a table, then the control's parent is now that table and that cell will adjust to the control's size. I need the same concept for my application. Can anybody help me in this regard. Thanks.
-
Hi to all, How is it possible and help needed in "Drag a control(like textbox,button etc some where on the page and Drop it on a cell of a table which is on the same page". Just like when we create a table with some rows and columns on a ASP.Net webpage and from ToolBox when we drag a control and drop it on any of the cell of a table, then the control's parent is now that table and that cell will adjust to the control's size. I need the same concept for my application. Can anybody help me in this regard. Thanks.
Well, I'm sure it is possible, not with ASP.NET, but with Javascript. Try to search the web for "Javscript drag & drop" or something like this. I hope you will find something useful. Generaly you have to keep structure of controls on server, when you do drag&drop on client, javascript should raise a postback and tell server which control was moved to which parent, then structure is changed on server, html is regenerated and sent to a client again. Or you can keep the structure in javascript all the time without a postback and send info to server only when clicked 'Save' button for example... Anyway, you have to do lots of javascript coding probably, if you don't find exact solution for you problem on the web. Pilo