I want to put my own values in a specific cell in the ultraWebGrid. My code return "no data can be display" :
uwg = new UltraWebGrid();
UltraGridRow ugRow = new UltraGridRow();uwg.Rows.Add(ugRow);
UltraGridCell ugCell = new UltraGridCell();uwg.Rows[Convert.ToInt32(rowTest["DTC01"])].Cells.Add(ugCell); uwg.Rows[Convert.ToInt32(rowTest["DTC01"])].Cells[Convert.ToInt32(rowTest["DTC02"])].Value = "allo";
wb.ContentPane.Controls.Add(uwg);
Normally, I want to see "allo" in the cell, but i had no result.
And, I want to see "allo" like a hyperLinkButton
Thanks for the future help
Gabriel Deschênes
Hello,Please take a look at the sample code below. here you can create UltraWebGrid programmatically and set value of cells. protected void Page_Load(object sender, EventArgs e) { UltraWebGrid newGrid = new UltraWebGrid("myGrid"); newGrid.Columns.Add("Columns1", "Columns1"); newGrid.Columns.Add("Columns2", "Columns2"); newGrid.Columns.Add("Columns3", "Columns3"); UltraGridRow newRow = new UltraGridRow(); newRow.Cells.Add(new UltraGridCell("1")); newRow.Cells.Add(new UltraGridCell("1")); newRow.Cells.Add(new UltraGridCell("1")); newGrid.Rows.Add(newRow); PlaceHolder1.Controls.Add(newGrid); }Hope this helps.
I believe this thread is a duplicate of the following thread, where I provided additional details:http://forums.infragistics.com/forums/t/24133.aspx