I have a grid in which I have the following fields IssueCode - Defined as a DropDown IssueStatus - Defined as a DownDown StartDate - Defined as a DateChooser EndDate - Defined as a DateChooser
The two dropdowns are defined using the following ValuesList information
In the code behind the valuelist are defined like this... //Set dropdown for Issue Code ValueList vlIssueCode = uwgIssues.Bands[0].Columns.FromKey("IssueCode").ValueList; vlIssueCode.DataSource = ds1; vlIssueCode.DataMember = "IssueControl"; vlIssueCode.ValueMember = "DataValue"; vlIssueCode.DisplayMember = "DataText"; vlIssueCode.DataBind(); //Set dropdown for Issue Status| ValueList vlIssueStatus = uwgIssues.Bands[0].Columns.FromKey("IssueStatus").ValueList; vlIssueStatus.DataSource = ds1; vlIssueStatus.DataMember = "IssueStatus"; vlIssueStatus.ValueMember = "DataValue"; vlIssueStatus.DisplayMember = "DataText"; vlIssueStatus.DataBind();
When the grid displays the IssueCode field displays the DataText value in the field and the dropdown works just fine. But in the Status field it displays the DataValue in the field but when you click the cell it displays the dropdown and it too works just fine. It's just when the grid is displayed that the second filed defined as a dropdown field doesn't display the correct text value it displayes the code value. This grid also has child records and the dropdowns in those fields also don't display the correct value. But the dropdowns work correctly so my clients can see the proper values when they click in the cells.
Thanks for any help...
Thanks for the quicl reply.
Yes in the ds1 datasource are 2 table members "IssueControl" and "IssueStatus". Both of these tables have the exact same fields; DataValue - which is the code and DataText - which is the display field
Example: The IssueCode has the following: DataValue DataText 0120 120 - Fraud 0121 121 - Fraud - MisReport
The IssueStatus has the following: DataValue DataText 1 Allow 2 Deny
As stated in my original post the dropdowns display correctly showing the proper text values and when selected and updated the data values are updated in the DB correctly. It's just when you view the grid the first dropdown field in each parent row displays the DataText correctly but all dropdown fields later in each row of the grid including the child rows display the DataValue instead of the DataText.
So the grid looks like
The IssueCode displays correctly but the Status field doesn't show the DataText correctly nor do the child records. The Type and DecisionID fields are dropdowns as well. All of the dropdowns as far as I can tell are all setup the exact same way so I don't see why the first one "Issue Code" is working and none of the others are.
Thanks!
You need to set the display type in band(1).
ValueList vlIssueStatus = uwgIssues.Bands[1].Columns.FromKey("IssueStatus").ValueList; vlIssueStatus.DataSource = ds1; vlIssueStatus.DataMember = "IssueStatus"; vlIssueStatus.ValueMember = "DataValue"; vlIssueStatus.DisplayMember = "DataText"; vlIssueStatus.DataBind();