griddropdowncolumn and group by problem

4 posts, 1 answers
  1. Juan
    Juan avatar
    16 posts
    Member since:
    Mar 2008

    Posted 07 May 2008 Link to this post

    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?


  2. Answer
    Prangadj
    Prangadj avatar
    174 posts
    Member since:
    Jan 2008

    Posted 10 May 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Juan
    Juan avatar
    16 posts
    Member since:
    Mar 2008

    Posted 12 May 2008 Link to this post

    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.
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 May 2008 Link to this post

    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.

Back to Top