Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to extract all the data from a Datasource?
    primarykey
    data
    text
    <p>I have a datasource in SmartGWT. How do i extract data from it? I have tried using <code>fetchData()</code>method but then in criteria i need to add a value i.e.</p> <pre><code>Criteria cr = new Criteria(); cr.addCriteria("Name", "Name_Value"); </code></pre> <p>In order to execute a selectall on the DataSource what do i need to do?</p> <p>Here is the code : </p> <pre><code>import com.smartgwt.client.types.Alignment; import com.smartgwt.client.types.DragDataAction; import com.smartgwt.client.widgets.TransferImgButton; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.layout.HStack; import com.smartgwt.client.widgets.layout.VStack; import com.smartgwt.client.widgets.tree.Tree; import com.smartgwt.client.widgets.tree.TreeGrid; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.widgets.tree.TreeGridField; public class TreeDragNodesSample implements EntryPoint { TreeGrid grid1 = new TreeGrid(); TreeGrid grid2 = new TreeGrid(); String name=null; public void onModuleLoad() { Tree test = new Tree(); grid1.setDragDataAction(DragDataAction.COPY); grid1.setAutoFetchData(true); grid1.setDataSource(EmployeeXmlDS.getInstance()); grid1.setWidth(200); grid1.setHeight(200); grid1.setShowEdges(true); grid1.setBorder("0px"); grid1.setBodyStyleName("normal"); grid1.setShowHeader(false); grid1.setLeaveScrollbarGap(false); grid1.setEmptyMessage("&lt;br&gt;Drag &amp; drop parts here"); grid1.setManyItemsImage("cubes_all.png"); grid1.setAppImgDir("icons/16/"); grid1.setNodeIcon("cube.png"); grid1.setFolderIcon("person.png"); grid1.setCanReorderRecords(true); grid1.setCanAcceptDroppedRecords(true); grid1.setCanDragRecordsOut(true); grid1.setCanAcceptDrop(true); grid1.setCanDrop(true); TreeGridField tname = new TreeGridField("Name"); TreeGridField child = new TreeGridField("ChildID"); TreeGridField reps = new TreeGridField("ReportsTo"); grid1.setFields(tname); grid2.setLeft(250); grid2.setAutoFetchData(true); grid2.setDataSource(EmployeeXmlDSDrop.getInstance()); grid2.setWidth(200); grid2.setHeight(200); grid2.setShowEdges(true); grid2.setBorder("0px"); grid2.setBodyStyleName("normal"); grid2.setShowHeader(false); grid2.setLeaveScrollbarGap(false); grid2.setEmptyMessage("&lt;br&gt;Drag &amp; drop parts here"); grid2.setManyItemsImage("cubes_all.png"); grid2.setAppImgDir("icons/16/"); grid2.setNodeIcon("cube.png"); grid2.setFolderIcon("person.png"); grid2.setCanReorderRecords(true); grid2.setCanAcceptDroppedRecords(true); grid2.setCanDragRecordsOut(true); grid2.setCanAcceptDrop(true); grid2.setCanDrop(true); TreeGridField tname2 = new TreeGridField("Name"); TreeGridField child2 = new TreeGridField("ChildID"); TreeGridField reps2 = new TreeGridField("ReportsTo"); grid2.setFields(tname2); VStack moveControls = new VStack(10); moveControls.setWidth(32); moveControls.setHeight(74); moveControls.setLayoutAlign(Alignment.CENTER); TransferImgButton rightArrow = new TransferImgButton(TransferImgButton.RIGHT, new ClickHandler() { public void onClick(ClickEvent event) { grid2.transferSelectedData(grid1); } }); moveControls.addMember(rightArrow); TransferImgButton leftArrow = new TransferImgButton(TransferImgButton.LEFT, new ClickHandler() { public void onClick(ClickEvent event) { grid1.transferSelectedData(grid2); } }); moveControls.addMember(leftArrow); HStack grids = new HStack(10); grids.setHeight(160); grids.addMember(grid1); grids.addMember(moveControls); grids.addMember(grid2); grids.draw(); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload