Adding form elements
Nice work on the grid control. I have found that there does not seem to be much available out there when looking for well featured flexible grid component. Your grid control appears to be designed for maximum flexibility and perhaps with some added features could be the answer that we are all looking for! One problem with other grid controls I have looked at is that they rely soly on XML for data binding and therfore you cannot put your own HTML code into the cells. But I have found with the ActiveWidgets control that I can insert my own HTML code. However, and to my question, if I insert a form element such as an input element, when I focus on it the focus is immediately removed and the value reset. What is the best way to go about setting the grid up to support editing via HTML form elements and custom controls? And what is the best way to adjust cell height and width to the appropriate size for the content?
keep up the good work,
Grid uses Active.Templates.Text as a simple text-only cell template or Active.Templates.Image when you want to display images (see /examples/grid/images.htm). Try to look at those templates (/source/lib/templates/image.js) and create your custom control in a similar way.
For the very simple things you can just return html instead of plain text directly from the data model instead of building custom template.
I will try to make some examples on this.
PS I don't yet know the answer to your second question - the grid does not use tables, so you need to adjust size from your code somehow.
As for my second question I've found that the active-templates-row class controls the row height but the row headers are not affected when I adjust this. What determines the height of the row headers?
This topic is archived.
Back to support forum
Version 2Looking for AW 2.6 ?
The old site is here.