3.0.0

CheckBox in Grid shown using XML

Hi,
I will take a couple of minutes to present my problem. We have a web ui using plain HTML code. My application displays grids using HTML <table> and we display checkbox as the first column in the grid for all our grid. This checkbox allows the users to select the row and then click on a delete button or an edit button which takes the user to another screen.

We want to change our HTML grids to use ActiveWidgets. I have successfully displayed the grid using AW.UI.Grid by using a XML. I am able to show a checkbox as the first column. What i am not able to do is to specify that the id value in the XML(see below) should be the checked value for the checkbox. Meaning when the user clicks on the checkbox and submits the page the ID should go to the server.

The XML that i am using is
<Jobs>
<Job>
<queued-date>01/15/2009 14:55:00</queued-date>
<base-priority>High</base-priority>
<start-date>01/15/2009 14:55:00</start-date>
<allow-multiples>No</allow-multiples>
<category-id>2666321</category-id>
<email-success>[email protected]</email-success>
<job-no>1821184</job-no>
<job-date>01/15/2009 14:55:00</job-date>
<job-template-id>1818982</job-template-id>
<current-priority>2</current-priority>
<email-failure>[email protected]</email-failure>
<entity-name>My Own Entity</entity-name>
<seq>1/1</seq>
<id>1821183</id><status>Suspend</status>
<category>Category One</category>
<radio-date>1</radio-date>
<entity-id>3070993464</entity-id>
<is-priority-modified>No</is-priority-modified>
<max-time>0</max-time>
<name>Test Entry in Grid</name>
</Job>
</Jobs>
YB
January 21,
You should define 'id' as another column in the datasource, make it hidden, and then retrieve its value and send to the server in your submit code.

http://www.activewidgets.com/aw.xml.table/columns.html
http://www.activewidgets.com/grid.howto.columns/hide.html
Alex (ActiveWidgets)
January 22,
Thnx Alex. I could use the hide column information that you provided. I was also able to show a checkbox using information from another of your post.
obj.setSelectionMode("multi-row");
obj.setSelectorVisible(true);
obj.setColumnIndices([1,2,3,4,5,6,7,8,9]);
obj.setSelectorWidth(30);
obj.setSelectorTemplate(new AW.Templates.CheckedItem);
obj.onRowSelectedChanged = function(value, i)
{
this.getSelectorTemplate(i).refresh();
alert(i);
}
obj.setSelectionMode("none");

I used the above code to show the checkbox . Everything works good.

Thnx for your help.
January 22,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.