Hi,
I am populating combo boxes to show values from DB when I need to create/update record and I am using same DataSource for ListGrid. ListGrid is smart enough to use displayField attribute while showing record and populates the exact record matching to primary key of original datasource but when I click same record to show in detailViewer I see actual primary key.
Below is DataSource portion to populate
isc.RestDataSource.create( {
ID :"XXXXX",
.....
.....
fields : [
{
name :"empid", // listgrid automatically map this to valueField but detailViewer not.
title :"EmpName",
valueField :"id",
displayField :"name",
optionDataSource :"YYYYY"
}
Using below code to set record for detailViewer.
var record = this.getSelectedRecord();
detailViewer.setData(record);
I was told on forum that DetailViewer do not support displayField. I believe it should support this so that listgrid and detailviewer can be used together without writing custom code.
Thanks,
Ashish.
I am populating combo boxes to show values from DB when I need to create/update record and I am using same DataSource for ListGrid. ListGrid is smart enough to use displayField attribute while showing record and populates the exact record matching to primary key of original datasource but when I click same record to show in detailViewer I see actual primary key.
Below is DataSource portion to populate
isc.RestDataSource.create( {
ID :"XXXXX",
.....
.....
fields : [
{
name :"empid", // listgrid automatically map this to valueField but detailViewer not.
title :"EmpName",
valueField :"id",
displayField :"name",
optionDataSource :"YYYYY"
}
Using below code to set record for detailViewer.
var record = this.getSelectedRecord();
detailViewer.setData(record);
I was told on forum that DetailViewer do not support displayField. I believe it should support this so that listgrid and detailviewer can be used together without writing custom code.
Thanks,
Ashish.
Comment