Hello,
I have a very simple table called Lokacije that has two columns. First one is IdLokacije (autonumber) and 2nd one is description of Location with name NazivLokacije.
Second table named Uredjaji, has a column that is foreign key of Lokacija named Lokacije.
Table: Uredjaji
foreign key: Lokacija
Table: Lokacije
primary key: IdLokacije (int)
column desc: NazivLokacije
In my grid (that has datasource through SQLDataSource to Uredjaji) i have GridDropDownColumn, that is bound to Lokacija.
Everything works well, i have in edit mode dropdown list showing me NazivLokacije as DisplayValue it is bound to idLokacije.
When i want to group using Lokacija column, i am getting field IdLokacije showing me numbers, and i want to show friendly name NazivLokacije.
So my question is, how to change default grouping column display value from idLokacije to NazivLokacije?
Below is copy code of my GridDropDownColumn and also picture that should explain better
Thank you in advance
I have a very simple table called Lokacije that has two columns. First one is IdLokacije (autonumber) and 2nd one is description of Location with name NazivLokacije.
Second table named Uredjaji, has a column that is foreign key of Lokacija named Lokacije.
Table: Uredjaji
foreign key: Lokacija
Table: Lokacije
primary key: IdLokacije (int)
column desc: NazivLokacije
In my grid (that has datasource through SQLDataSource to Uredjaji) i have GridDropDownColumn, that is bound to Lokacija.
Everything works well, i have in edit mode dropdown list showing me NazivLokacije as DisplayValue it is bound to idLokacije.
When i want to group using Lokacija column, i am getting field IdLokacije showing me numbers, and i want to show friendly name NazivLokacije.
So my question is, how to change default grouping column display value from idLokacije to NazivLokacije?
Below is copy code of my GridDropDownColumn and also picture that should explain better
Thank you in advance
<
telerik:GridDropDownColumn
ColumnEditorID
=
"GridDropDownColumnEditor1"
DataField
=
"Lokacija"
DataSourceID
=
"SqlDataSourceLokacija"
DataType
=
"System.Int64"
HeaderText
=
"Lokacija"
ListTextField
=
"NazivLokacije"
ListValueField
=
"idLokacije"
UniqueName
=
"ColumnLokacija"
>
<
FilterTemplate
>
<
telerik:RadComboBox
ID
=
"ColumnLokacija"
runat
=
"server"
AppendDataBoundItems
=
"true"
DataSourceID
=
"SqlDataSourceLokacija"
DataTextField
=
"NazivLokacije"
DataValueField
=
"idLokacije"
Height
=
"200px"
OnClientSelectedIndexChanged
=
"TitleIndexChanged"
SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("ColumnLokacija").CurrentFilterValue%>'>
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"All"
/>
</
Items
>
</
telerik:RadComboBox
>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function TitleIndexChanged(sender, args) {
var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");
tableView.filter("ColumnLokacija", args.get_item().get_value(), "EqualTo"); }
</
script
>
</
telerik:RadScriptBlock
>
</
FilterTemplate
>
</
telerik:GridDropDownColumn
>