This is a migrated thread and some comments may be shown as answers.

griddropdowncolumn and group by problem

3 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Juan
Top achievements
Rank 1
Juan asked on 07 May 2008, 02:21 PM
hello
i have a grid with a griddropdowncolumn
this field came from a table that have a relation with other table
i can show in the grid the value of the other table
but when i group by this field,the agrupation text came from to the firts table

for example

the first table                                        second table

id  country    city                                       id   countryname
1   2             Bogota                                 2    Colombia
2   4             Buenos Aires                        4    Argentina
3   2             Cali
when i group by country the grid show me

     country              city
>country : 2
     colombia            Bogota
     colombia            Cali
>country:4
      Argentina           Buenos aires

   
but a i want

     country              city
>country : Colombia
     colombia            Bogota
     colombia            Cali
>country:Argentina
      Argentina           Buenos aires
  how can i do this?


3 Answers, 1 is accepted

Sort by
0
Accepted
Prangadj
Top achievements
Rank 1
answered on 10 May 2008, 11:18 AM
To change the country number with its text value, hook the ItemDataBound event of the grid and modify the text of the group headers directly. I did that in one of my projects starting from this help topic.

Prangadj
0
Juan
Top achievements
Rank 1
answered on 12 May 2008, 02:01 PM
thanks a lot , its just i have been loking for

but i have a new question , how can i know which column from  my radgrid made  the 
RadGrid1_ItemDataBound event, because the change is for any column and i want change only a specific column.
0
Shinu
Top achievements
Rank 2
answered on 13 May 2008, 12:33 PM
Hi,

ItemDataBound is Fired after an item is databound to the RadGrid control. Have a look at the following help article.
Getting familiar with server-side API

Shinu.

Tags
Grid
Asked by
Juan
Top achievements
Rank 1
Answers by
Prangadj
Top achievements
Rank 1
Juan
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or