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

Really strange grouping problem

8 Answers 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ludovic Gerbault
Top achievements
Rank 1
Ludovic Gerbault asked on 30 Dec 2009, 02:16 PM
Hello again

I recently changed the source collection I was using as the itemsource of my grid

(first, I had a collection of string item, now I have a collection of Object items which are being set with a code like this :

if (table.Rows.Count >= 1) 
            { 
                switch (table.Rows[0]["type"].ToString()) 
                { 
                    case "1": temp.txta = r["txt1"].ToString(); 
                        break
                    case "2": temp.txta = r["txt1"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt1"].ToString()); 
                        break
                    case "3": temp.txta = r["txt1"] == DBNull.Value ?0 : Convert.ToDecimal(r["txt1"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txta = r["txt1"] == DBNull.Value ? DateTime.Now: Convert.ToDateTime(r["txt1"].ToString()); 
                        break
                    case "5": temp.txta = r["txt1"] == DBNull.Value ? false : Convert.ToBoolean(r["txt1"].ToString()); 
                        break
                    case "6": temp.txta = r["txt1"].ToString(); 
                        break
                    case "7": temp.txta = r["txt1"].ToString(); 
                        break
                } 
            } 

there are attributes from txta to txtt, which are all Objects

Now, if I add one group descriptor, it works fine. But if I add a second or more groupdescriptors (using the UI), I only get one record in the second grouping.

I really can't go back, because this is the only I can get a completely typed dataset which allows me to sort and filter as I wish.

8 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 04 Jan 2010, 07:17 AM
Hello,

Can you provide more info about this dataset/table? You can check the same scenario with my table also.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ludovic Gerbault
Top achievements
Rank 1
answered on 04 Jan 2010, 01:57 PM
Hi

I've been using your table in some other functionnality, it's working real well.

Unfortunatly, there are too much things that depends on the underlying object of each GridViewRow to be able to perform such changes right now, I simply don't have the time.

Here's the class I use to build the Itemsource collection of the problematic grid.

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.Runtime.Serialization; 
using System.Data; 
 
namespace Model 
    [DataContract(Name = "donnees_grilleBO", Namespace = "http://schemas.datacontract.org/2004/07/T2J.Model")] 
    public class donnees_grilleBO 
    { 
        [DataMember] 
        public String id_tmp_liste { getset; } 
 
        [DataMember] 
        public String id_contact { getset; } 
 
        [DataMember] 
        public String id_categorie_partenaire { getset; } 
 
        [DataMember] 
        public String id_societe { getset; } 
 
        [DataMember] 
        public Object txta { getset; } 
 
        [DataMember] 
        public Object txtb { getset; } 
 
        [DataMember] 
        public Object txtc { getset; } 
        [DataMember] 
        public Object txtd { getset; } 
        [DataMember] 
        public Object txte { getset; } 
        [DataMember] 
        public Object txtf { getset; } 
        [DataMember] 
        public Object txtg { getset; } 
        [DataMember] 
        public Object txth { getset; } 
        [DataMember] 
        public Object txti { getset; } 
        [DataMember] 
        public Object txtj { getset; } 
        [DataMember] 
        public Object txtk { getset; } 
        [DataMember] 
        public Object txtl { getset; } 
        [DataMember] 
        public Object txtm { getset; } 
        [DataMember] 
        public Object txtn { getset; } 
        [DataMember] 
        public Object txto { getset; } 
        [DataMember] 
        public Object txtp { getset; } 
        [DataMember] 
        public Object txtq { getset; } 
        [DataMember] 
        public Object txtr { getset; } 
        [DataMember] 
        public Object txts { getset; } 
        [DataMember] 
        public Object txtt { getset; } 
        [DataMember] 
        public int id_partenaire { getset; } 
        [DataMember] 
        public string nom_colonnes { getset; } 
        [DataMember] 
        public string onglet { getset; } 
        [DataMember] 
        public string combo1 { getset; } 
        [DataMember] 
        public string combo2 { getset; } 
        [DataMember] 
        public string combo3 { getset; } 
        [DataMember] 
        public string combo4 { getset; } 
        [DataMember] 
        public string combo5 { getset; } 
 
        public static donnees_grilleBO GetFromDataRow(DataRow r) 
        { 
            donnees_grilleBO temp = new donnees_grilleBO(); 
            
            String[] ComboValeurs = r["nom_colonnes"].ToString().Split('|'); 
            DataTable table = new DataTable(); 
            table.Columns.Add(new DataColumn() { ColumnName = "Name", DataType = typeof(string) }); 
            table.Columns.Add(new DataColumn() { ColumnName = "type", DataType = typeof(string) }); 
 
            foreach (string ra in ComboValeurs) 
            { 
                String[] temp2 = ra.Split('-'); 
                if (temp2[0] != ""
                { 
                    table.Rows.Add(temp2); 
                    //DataRow row = new DataRow(); 
                    //row["Name"] = temp2[0].ToString(); 
                    //row["type"] = temp2[1].ToString(); 
                    //table.Rows.Add(row); 
                } 
            } 
 
 
            temp.id_tmp_liste = r["id_tmp_liste"].ToString(); 
            temp.id_contact = r["id_contact"].ToString(); 
            temp.id_categorie_partenaire = r["id_categorie_partenaire"].ToString(); 
            temp.id_societe = r["id_societe"].ToString(); 
 
            if (table.Rows.Count >= 1) 
            { 
                switch (table.Rows[0]["type"].ToString()) 
                { 
                    case "1": temp.txta = r["txt1"].ToString(); 
                        break
                    case "2": temp.txta = r["txt1"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt1"].ToString()); 
                        break
                    case "3": temp.txta = r["txt1"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt1"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txta = r["txt1"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt1"].ToString()); 
                        break
                    case "5": temp.txta = r["txt1"] == DBNull.Value ? false : Convert.ToBoolean(r["txt1"].ToString()); 
                        break
                    case "6": temp.txta = r["txt1"].ToString(); 
                        break
                    case "7": temp.txta = r["txt1"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 2) 
            { 
                switch (table.Rows[1]["type"].ToString()) 
                { 
                    case "1": temp.txtb = r["txt2"].ToString(); 
                        break
                    case "2": temp.txtb = r["txt2"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt2"].ToString()); 
                        break
                    case "3": temp.txtb = r["txt2"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt2"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtb = r["txt2"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt2"].ToString()); 
                        break
                    case "5": temp.txtb = r["txt2"] == DBNull.Value ? false : Convert.ToBoolean(r["txt2"].ToString()); 
                        break
                    case "6": temp.txtb = r["txt2"].ToString(); 
                        break
                    case "7": temp.txtb = r["txt2"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 3) 
            { 
                switch (table.Rows[2]["type"].ToString()) 
                { 
                    case "1": temp.txtc = r["txt3"].ToString(); 
                        break
                    case "2": temp.txtc = r["txt3"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt3"].ToString()); 
                        break
                    case "3": temp.txtc = r["txt3"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt3"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtc = r["txt3"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt3"].ToString()); 
                        break
                    case "5": temp.txtc = r["txt3"] == DBNull.Value ? false : Convert.ToBoolean(r["txt3"].ToString()); 
                        break
                    case "6": temp.txtc = r["txt3"].ToString(); 
                        break
                    case "7": temp.txtc = r["txt3"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 4) 
            { 
                switch (table.Rows[3]["type"].ToString()) 
                { 
                    case "1": temp.txtd = r["txt4"].ToString(); 
                        break
                    case "2": temp.txtd = r["txt4"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt4"].ToString()); 
                        break
                    case "3": temp.txtd = r["txt4"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt4"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtd = r["txt4"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt4"].ToString()); 
                        break
                    case "5": temp.txtd = r["txt4"] == DBNull.Value ? false : Convert.ToBoolean(r["txt4"].ToString()); 
                        break
                    case "6": temp.txtd = r["txt4"].ToString(); 
                        break
                    case "7": temp.txtd = r["txt4"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 5) 
            { 
                switch (table.Rows[4]["type"].ToString()) 
                { 
                    case "1": temp.txte = r["txt5"].ToString(); 
                        break
                    case "2": temp.txte = r["txt5"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt5"].ToString()); 
                        break
                    case "3": temp.txte = r["txt5"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt5"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txte = r["txt5"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt5"].ToString()); 
                        break
                    case "5": temp.txte = r["txt5"] == DBNull.Value ? false : Convert.ToBoolean(r["txt5"].ToString()); 
                        break
                    case "6": temp.txte = r["txt5"].ToString(); 
                        break
                    case "7": temp.txte = r["txt5"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 6) 
            { 
                switch (table.Rows[5]["type"].ToString()) 
                { 
                    case "1": temp.txtf = r["txt6"].ToString(); 
                        break
                    case "2": temp.txtf = r["txt6"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt6"].ToString()); 
                        break
                    case "3": temp.txtf = r["txt6"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt6"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtf = r["txt6"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt6"].ToString()); 
                        break
                    case "5": temp.txtf = r["txt6"] == DBNull.Value ? false : Convert.ToBoolean(r["txt6"].ToString()); 
                        break
                    case "6": temp.txtf = r["txt6"].ToString(); 
                        break
                    case "7": temp.txtf = r["txt6"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 7) 
            { 
                switch (table.Rows[6]["type"].ToString()) 
                { 
                    case "1": temp.txtg = r["txt7"].ToString(); 
                        break
                    case "2": temp.txtg = r["txt7"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt7"].ToString()); 
                        break
                    case "3": temp.txtg = r["txt7"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt7"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtg = r["txt7"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt7"].ToString()); 
                        break
                    case "5": temp.txtg = r["txt7"] == DBNull.Value ? false : Convert.ToBoolean(r["txt7"].ToString()); 
                        break
                    case "6": temp.txtg = r["txt7"].ToString(); 
                        break
                    case "7": temp.txtg = r["txt7"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 8) 
            { 
                switch (table.Rows[7]["type"].ToString()) 
                { 
                    case "1": temp.txth = r["txt8"].ToString(); 
                        break
                    case "2": temp.txth = r["txt8"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt8"].ToString()); 
                        break
                    case "3": temp.txth = r["txt8"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt8"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txth = r["txt8"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt8"].ToString()); 
                        break
                    case "5": temp.txth = r["txt8"] == DBNull.Value ? false : Convert.ToBoolean(r["txt8"].ToString()); 
                        break
                    case "6": temp.txth = r["txt8"].ToString(); 
                        break
                    case "7": temp.txth = r["txt8"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 9) 
            { 
                switch (table.Rows[8]["type"].ToString()) 
                { 
                    case "1": temp.txti = r["txt9"].ToString(); 
                        break
                    case "2": temp.txti = r["txt9"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt9"].ToString()); 
                        break
                    case "3": temp.txti = r["txt9"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt9"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txti = r["txt9"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt9"].ToString()); 
                        break
                    case "5": temp.txti = r["txt9"] == DBNull.Value ? false : Convert.ToBoolean(r["txt9"].ToString()); 
                        break
                    case "6": temp.txti = r["txt9"].ToString(); 
                        break
                    case "7": temp.txti = r["txt9"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 10) 
            { 
                switch (table.Rows[9]["type"].ToString()) 
                { 
                    case "1": temp.txtj = r["txt10"].ToString(); 
                        break
                    case "2": temp.txtj = r["txt10"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt10"].ToString()); 
                        break
                    case "3": temp.txtj = r["txt10"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt10"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtj = r["txt10"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt10"].ToString()); 
                        break
                    case "5": temp.txtj = r["txt10"] == DBNull.Value ? false : Convert.ToBoolean(r["txt10"].ToString()); 
                        break
                    case "6": temp.txtj = r["txt10"].ToString(); 
                        break
                    case "7": temp.txtj = r["txt10"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 11) 
            { 
                switch (table.Rows[10]["type"].ToString()) 
                { 
                    case "1": temp.txtk = r["txt11"].ToString(); 
                        break
                    case "2": temp.txtk = r["txt11"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt11"].ToString()); 
                        break
                    case "3": temp.txtk = r["txt11"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt11"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtk = r["txt11"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt11"].ToString()); 
                        break
                    case "5": temp.txtk = r["txt11"] == DBNull.Value ? false : Convert.ToBoolean(r["txt11"].ToString()); 
                        break
                    case "6": temp.txtk = r["txt11"].ToString(); 
                        break
                    case "7": temp.txtk = r["txt11"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 12) 
            { 
                switch (table.Rows[11]["type"].ToString()) 
                { 
                    case "1": temp.txtl = r["txt12"].ToString(); 
                        break
                    case "2": temp.txtl = r["txt12"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt12"].ToString()); 
                        break
                    case "3": temp.txtl = r["txt12"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt12"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtl = r["txt12"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt12"].ToString()); 
                        break
                    case "5": temp.txtl = r["txt12"] == DBNull.Value ? false : Convert.ToBoolean(r["txt12"].ToString()); 
                        break
                    case "6": temp.txtl = r["txt12"].ToString(); 
                        break
                    case "7": temp.txtl = r["txt12"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 13) 
            { 
                switch (table.Rows[12]["type"].ToString()) 
                { 
                    case "1": temp.txtm = r["txt13"].ToString(); 
                        break
                    case "2": temp.txtm = r["txt14"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt14"].ToString()); 
                        break
                    case "3": temp.txtm = r["txt14"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt14"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtm = r["txt14"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt14"].ToString()); 
                        break
                    case "5": temp.txtm = r["txt14"] == DBNull.Value ? false : Convert.ToBoolean(r["txt14"].ToString()); 
                        break
                    case "6": temp.txtm = r["txt13"].ToString(); 
                        break
                    case "7": temp.txtm = r["txt13"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 14) 
            { 
                switch (table.Rows[13]["type"].ToString()) 
                { 
                    case "1": temp.txtn = r["txt14"].ToString(); 
                        break
                    case "2": temp.txtn = r["txt14"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt14"].ToString()); 
                        break
                    case "3": temp.txtn = r["txt14"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt14"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtn = r["txt14"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt14"].ToString()); 
                        break
                    case "5": temp.txtn = r["txt14"] == DBNull.Value ? false : Convert.ToBoolean(r["txt14"].ToString()); 
                        break
                    case "6": temp.txtn = r["txt14"].ToString(); 
                        break
                    case "7": temp.txtn = r["txt14"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 15) 
            { 
                switch (table.Rows[14]["type"].ToString()) 
                { 
                    case "1": temp.txto = r["txt15"].ToString(); 
                        break
                    case "2": temp.txto = r["txt15"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt15"].ToString()); 
                        break
                    case "3": temp.txto = r["txt15"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt15"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txto = r["txt15"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt15"].ToString()); 
                        break
                    case "5": temp.txto = r["txt15"] == DBNull.Value ? false : Convert.ToBoolean(r["txt15"].ToString()); 
                        break
                    case "6": temp.txto = r["txt15"].ToString(); 
                        break
                    case "7": temp.txto = r["txt15"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 16) 
            { 
                switch (table.Rows[15]["type"].ToString()) 
                { 
                    case "1": temp.txtp = r["txt16"].ToString(); 
                        break
                    case "2": temp.txtp = r["txt16"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt16"].ToString()); 
                        break
                    case "3": temp.txtp = r["txt16"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt16"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtp = r["txt16"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt16"].ToString()); 
                        break
                    case "5": temp.txtp = r["txt16"] == DBNull.Value ? false : Convert.ToBoolean(r["txt16"].ToString()); 
                        break
                    case "6": temp.txtp = r["txt16"].ToString(); 
                        break
                    case "7": temp.txtp = r["txt16"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 17) 
            { 
                switch (table.Rows[16]["type"].ToString()) 
                { 
                    case "1": temp.txtq = r["txt17"].ToString(); 
                        break
                    case "2": temp.txtq = r["txt17"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt17"].ToString()); 
                        break
                    case "3": temp.txtq = r["txt17"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt17"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtq = r["txt17"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt17"].ToString()); 
                        break
                    case "5": temp.txtq = r["txt17"] == DBNull.Value ? false : Convert.ToBoolean(r["txt17"].ToString()); 
                        break
                    case "6": temp.txtq = r["txt17"].ToString(); 
                        break
                    case "7": temp.txtq = r["txt17"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 18) 
            { 
                switch (table.Rows[17]["type"].ToString()) 
                { 
                    case "1": temp.txtr = r["txt18"].ToString(); 
                        break
                    case "2": temp.txtr = r["txt18"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt18"].ToString()); 
                        break
                    case "3": temp.txtr = r["txt18"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt18"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtr = r["txt18"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt18"].ToString()); 
                        break
                    case "5": temp.txtr = r["txt18"] == DBNull.Value ? false : Convert.ToBoolean(r["txt18"].ToString()); 
                        break
                    case "6": temp.txtr = r["txt18"].ToString(); 
                        break
                    case "7": temp.txtr = r["txt18"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 19) 
            { 
                switch (table.Rows[18]["type"].ToString()) 
                { 
                    case "1": temp.txts = r["txt19"].ToString(); 
                        break
                    case "2": temp.txts = r["txt19"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt19"].ToString()); 
                        break
                    case "3": temp.txts = r["txt19"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt19"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txts = r["txt19"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt19"].ToString()); 
                        break
                    case "5": temp.txts = r["txt19"] == DBNull.Value ? false : Convert.ToBoolean(r["txt19"].ToString()); 
                        break
                    case "6": temp.txts = r["txt19"].ToString(); 
                        break
                    case "7": temp.txts = r["txt19"].ToString(); 
                        break
                } 
            } 
 
            if (table.Rows.Count >= 20) 
            { 
                switch (table.Rows[19]["type"].ToString()) 
                { 
                    case "1": temp.txtt = r["tx20"].ToString(); 
                        break
                    case "2": temp.txtt = r["txt20"] == DBNull.Value ? 0 : Convert.ToInt32(r["txt20"].ToString()); 
                        break
                    case "3": temp.txtt = r["txt20"] == DBNull.Value ? 0 : Convert.ToDecimal(r["txt20"].ToString().Replace('.', ',')); 
                        break
                    case "4": temp.txtt = r["txt20"] == DBNull.Value ? DateTime.Now : Convert.ToDateTime(r["txt20"].ToString()); 
                        break
                    case "5": temp.txtt = r["txt20"] == DBNull.Value ? false : Convert.ToBoolean(r["txt20"].ToString()); 
                        break
                    case "6": temp.txtt = r["tx20"].ToString(); 
                        break
                    case "7": temp.txtt = r["tx20"].ToString(); 
                        break
                } 
            } 
            temp.id_partenaire = (int)r["id_partenaire"]; 
            temp.nom_colonnes = r["nom_colonnes"].ToString(); 
            temp.onglet = r["onglet"].ToString(); 
            temp.combo1 = r["combo1"].ToString(); 
            temp.combo1 = r["combo2"].ToString(); 
            temp.combo1 = r["combo3"].ToString(); 
            temp.combo1 = r["combo4"].ToString(); 
            temp.combo1 = r["combo5"].ToString(); 
            return temp; 
        } 
 
        public static IList<donnees_grilleBO> GetListFromDataTable(DataTable t) 
        { 
            IList<donnees_grilleBO> l_liste = new List<donnees_grilleBO>(); 
            if (t != null
            { 
                for (int i = 0; i < t.Rows.Count; i++) 
                { 
                    l_liste.Add(donnees_grilleBO.GetFromDataRow(t.Rows[i])); 
                } 
            } 
            return l_liste; 
        } 
 
    } 
 
 

So, I have a method in WCF that returns a IList of donnees_grilleBO, and then, i do RadGrid1.ItemsSource = e.result;

If in the class donnees_grilleBO, attributes txta to txtt are Strings, the problem doesn'ty occur.


0
Stefan Dobrev
Telerik team
answered on 05 Jan 2010, 07:45 AM
Hi Subileau Pascal,

We have fixed similar issue in one of our latest internal build. Can you please update your binaries to the ones of the latest internal build and verify the state of this problem?

Kind regards,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ludovic Gerbault
Top achievements
Rank 1
answered on 05 Jan 2010, 08:23 AM
If you mean the 1219 binaries release, unfortunately, I'm already using it
0
Stefan Dobrev
Telerik team
answered on 07 Jan 2010, 09:23 AM
Hi Subileau Pascal,

In you Silverlight application you should specify the DataType property on the columns that are of type object. This way the grid will correctly be able to group the data on the client.

Sincerely yours,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ludovic Gerbault
Top achievements
Rank 1
answered on 19 Jan 2010, 03:18 PM
I did it and double checked each data of a numbers of rows, the problem is still there.

Every column is coreectly typed, bound with the right converters, but still, the second time I try to group a column, only the first row appears.

Check here for an example of the problem I'm having
0
Stefan Dobrev
Telerik team
answered on 21 Jan 2010, 07:51 AM
Hi Subileau,

Can you send us the application that is used to take the screenshot from? We cannot do much without a small sample application that illustrates your problem exactly.

Kind regards,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ludovic Gerbault
Top achievements
Rank 1
answered on 21 Jan 2010, 09:02 AM
Well, the thing is that I switched yesterday my original data source to a custom source based on a lightweight datatable, which solved the problem and many others I was having.

I will need to compile an example that reproduce the issue.
I'll take some time for that in the interest of making the radcontrols better, in case there would actually be a bug somewhere.

Tags
GridView
Asked by
Ludovic Gerbault
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Ludovic Gerbault
Top achievements
Rank 1
Stefan Dobrev
Telerik team
Share this question
or