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

DS Field name same as table column name in DataSource

$
0
0
SmartClient Version: v10.0p_2015-06-10/PowerEdition Deployment (built 2015-06-10)
Browser Version : IE 11.0.9600.17843


1. I have SQL DataSource (test.ds.xml) and its mapped with table TEST_TABLE. here i hope we have to give field name as table cilumn name

<DataSource tableName="TEST_TABLE" ID="testTable" serverType="sql">
<fields>
<field name="NAME" title="Name"></field>
<field name="COUNTRY" title="Country"></field>
</fields>
</DataSource>

2. This dataSource is assigned to ListGrid
3. I have to fetch some data based on the given "Name", So I am using the Criteria to fetch the same.

AdvancedCriteria lCriteria = new AdvancedCriteria(OperatorId.AND);
lCriteria.addCriteria("NAME", "tester");

My question is in the above code, I am creating the criteria in the Client side and now the table column (DS field)name ("NAME") is directly used
in the client code and also after displaying the list grid and need to get some data from listgrid when I click the grid record,
at that time also I have to use the table column name to get that because field name same as table column. Here table column name used as the DS field name.

How to avoid using the DS field name in the ds.xml.

Viewing all articles
Browse latest Browse all 4756

Trending Articles