Hi there,
I have a radgrid which is created dynamically in C#. Now I want to add a new dynamic row which should be different in every row. I have managed adding a new link coloumn, however it seems same in every row.
Here is the code;
Thanks.
I have a radgrid which is created dynamically in C#. Now I want to add a new dynamic row which should be different in every row. I have managed adding a new link coloumn, however it seems same in every row.
Here is the code;
| public void Gridi_Getir() |
| { |
| DataSet musteriDataSet = new DataSet(); |
| musteriDataSet = bllMusteri.MusteriGetir(); |
| DataView musteriDataView = musteriDataSet.Tables["Musteriler"].DefaultView; |
| RadGrid1.DataSource = musteriDataView; |
| for (int i = 0; i < musteriDataView.Count; i++) |
| { |
| dtoMusteri musteri = new dtoMusteri(); |
| musteri.MusteriID = Convert.ToInt32(musteriDataView[i].Row.ItemArray[0]); |
| HesapKartlariniGetir(musteri, i); |
| } |
| RadGrid1.DataBind(); |
| } |
| public void HesapKartlariniGetir(dtoMusteri musteri, int k) |
| { |
| ArrayList hesapKartlari = bllMusteriHesapKarti.MusteriIDyeGoreMusteriHesapKartiGetir(musteri.MusteriID); |
| for (int i = 0; i < hesapKartlari.Count; i++) |
| { |
| //TableCell cell = new TableCell(); |
| //cell.Text = ((CoalSoft.DTO.dtoMusteriHesapKarti)(hesapKartlari[i])).MusteriHesapKartiAdi; |
| GridHyperLinkColumn column = new GridHyperLinkColumn(); |
| //column.InitializeCell(cell, i, RadGrid1.Items[k]); |
| column.ItemStyle.Font.Name = "Tahoma"; |
| column.Text = ((CoalSoft.DTO.dtoMusteriHesapKarti)(hesapKartlari[i])).MusteriHesapKartiAdi; |
| column.NavigateUrl = "MusteriHesapKartiDetay.aspx?MusteriHesapKartID=" + ((CoalSoft.DTO.dtoMusteriHesapKarti)(hesapKartlari[i])).MusteriHesapKartiID; |
| RadGrid1.Columns.Insert(i + 4, column); |
| } |
| } |
Thanks.