Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Displaying data in Listgrid and DynamicForm

$
0
0
Hello there,

SmartClient Version: v10.0p_2015-05-08/PowerEdition Deployment (built 2015-05-08) testing on FF26.

I am trying to display the data I fetch from the database in the listgrid and dynamicForm. I have a datasource file which loads the data in the Listgrid and DynamicForm. Now I have field called name in that datasource and then I have another datasource file where one of the field is called name. Now when I am loading the listgrid both the col are getting filled with this name data. But in the dynamicForm it is putting the correct name in their respective component. How can I tell smartgwt to distinguish these names. I tried displayField,but no luck

Code:

<DataSource ID="productDS" serverType="sql" tableName="pdu">

        <fields>
                <field name="id" type="sequence" hidden="true" primaryKey="true" />
                <field name="name" title="Product Name" type="ntext" length="128" required="true"/>
                <field name="code" title="Code" type="integer" required="true"/>
       
                <field name="dfid" title="Dosage Form" type="integer" foreignKey="dosformDS.id" displayField="name" required="true">
                </field>

this is the other datasource file which i am calling in the above datasource file

Code:


<DataSource ID="dosformDS" serverType="sql" tableName="dfor">
        <fields>
                <field name="id" type="sequence" hidden="true" primaryKey="true" />
                <field name="name" title="Description" type="ntext" required="true"/>
        </fields>
</DataSource>


Attached Images
File Type: gif sgwt.gif (3.8 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles