Hi -
I have a column in the database that has repeating values. I'm using that column to populate a ComboBox on my page. I don't want the repeated values to show up, but just the one time.
Example:
1940
1940
1940
1950
1950
1960
1970
1970
1970
So, I only want this to be populated in the ComboBox:
1940
1950
1960
1970
Is there a parameter or keyword that can be used on the aspx side or the c# side that can give me the outcome I need?
Here is my c#:
Here is my aspx:
Any help would be great. Thanks!
wen
I have a column in the database that has repeating values. I'm using that column to populate a ComboBox on my page. I don't want the repeated values to show up, but just the one time.
Example:
1940
1940
1940
1950
1950
1960
1970
1970
1970
So, I only want this to be populated in the ComboBox:
1940
1950
1960
1970
Is there a parameter or keyword that can be used on the aspx side or the c# side that can give me the outcome I need?
Here is my c#:
private
void
PopulateComboBox()
{
IQueryable allSystemPlantAccount = system_PlantAccount.GetAllBindings();
this
.systemPlantAccountRadComboBox.DataSource = allSystemPlantAccount;
this
.systemPlantAccountRadComboBox.DataValueField =
"ID"
;
this
.systemPlantAccountRadComboBox.DataTextField =
"Year"
;
this
.systemPlantAccountRadComboBox.DataBind();
this
.systemPlantAccountRadComboBox.Filter = RadComboBoxFilter.Contains;
this
.systemPlantAccountRadComboBox.Sort = RadComboBoxSort.Ascending;
this
.systemPlantAccountRadComboBox.SortItems();
}
Here is my aspx:
<
telerik:RadComboBox
ID
=
"systemPlantAccountRadComboBox"
runat
=
"server"
Width
=
"200px"
style
=
"left: 20px; top: 125px; position: absolute; text-align: right;"
></
telerik:RadComboBox
>
Any help would be great. Thanks!
wen