tag:blogger.com,1999:blog-3837712541181314500.post1428239838956433453..comments2023-03-23T07:24:26.329+00:00Comments on Web 2 tips, tricks and development cheat sheet: Displaying lookups from other tables in ListGridBradley Kieserhttp://www.blogger.com/profile/10723853755510927711noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-3837712541181314500.post-76659470513680237452011-09-07T19:26:35.562+01:002011-09-07T19:26:35.562+01:00If you use the server-side SmartClient stuff that ...If you use the server-side SmartClient stuff that comes with the Enterprise Edition license then this can be done in the .ds.xml file. For example, if User has a role field mapped to Role's id field, and Role's name field should be displayed then...<br /><br /><field name="role" optionDataSource="Role" valueField="id" displayField="name"/>Chrishttps://www.blogger.com/profile/10226060370151926397noreply@blogger.comtag:blogger.com,1999:blog-3837712541181314500.post-12142482604545147062011-07-05T13:53:28.928+01:002011-07-05T13:53:28.928+01:00I have tried to implement something similar and it...I have tried to implement something similar and it works for datagrid and record edit in DymanicForm but does not work for adding of a new record. Data in combobox is available but after trying to insert record there is a warning - No pointer for xpath. ValueXPath is given in xml datasource and it works for grid and save but not for add...<br />What could be the reason of such behavior?malipunhttps://www.blogger.com/profile/12801361276166112126noreply@blogger.comtag:blogger.com,1999:blog-3837712541181314500.post-84249607605137379422011-02-18T14:28:39.320+00:002011-02-18T14:28:39.320+00:00Hi, is there a easy way to save values when I fini...Hi, is there a easy way to save values when I finished edit mode. Like in forms with datasource?Divagacionshttps://www.blogger.com/profile/01381193835024564667noreply@blogger.comtag:blogger.com,1999:blog-3837712541181314500.post-5481450705177851542011-02-10T23:57:19.310+00:002011-02-10T23:57:19.310+00:00Hi, thank you for this entry. Helped me well to ge...Hi, thank you for this entry. Helped me well to get my id´s but i am having trouble by getting the displays correct. Are you using Smartgwt EE or lgpl?<br /><br />In fact i do not know how to get the setForeignKey inside my parent datasource right. Javadoc says ill need "datasource.field" but this is how i would do it in xml isnt it? I tried nearly everything but it only shows the id :(Felix Duushttps://www.blogger.com/profile/04644437515536597035noreply@blogger.comtag:blogger.com,1999:blog-3837712541181314500.post-80314766267719842522010-12-12T19:25:10.026+00:002010-12-12T19:25:10.026+00:00This post was helpful to me. I have another issue ...This post was helpful to me. I have another issue regarding SelectItem/ComboboxItem. When i run my application in IE, the appearance of these controls disturbs. They look so weired. What shud I do now? I cant attach image here otherwise i would show the issue.Asad Naeemhttps://www.blogger.com/profile/07213975817523134780noreply@blogger.comtag:blogger.com,1999:blog-3837712541181314500.post-66576656203089856202010-08-24T22:04:27.061+01:002010-08-24T22:04:27.061+01:00This saved me hours. Thought I might share
Here ...This saved me hours. Thought I might share<br /><br />Here is code for editing columns based on foreign key dependencies using drop downs.<br /><br />ListGrid myGrid = new ListGrid();<br />ListGridField field = new ListGridField("Foreign Key Field");<br />DataSource dataSource = myDS.getInstance();<br />String pKey = "myDS_id";<br />String pValue = "myDS_value";<br /><br />final SelectItem dropdown = new SelectItem();<br />dropdown.setOptionDataSource(dataSource);<br />dropdown.setValueField(pKey);<br />dropdown.setDisplayField(pValue);<br />dropdown.setAutoFetchData(true);<br /> <br />field.setEditorType(dropdown);<br />field.setOptionDataSource(dataSource);<br />field.setValueField(pKey);<br />field.setDisplayField(pValue);<br />field.setAutoFetchDisplayMap(true);<br /><br />myGrid.setFields(field);<br />myGrid.setAutoFetchDisplayMap(true);<br />myGrid.setAutoFetchData(true);Anonymoushttps://www.blogger.com/profile/02155770436395966944noreply@blogger.com