Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
804
put my own values in the ultraWebGrid
posted

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

Parents
No Data
Reply
  • 7694
    posted

    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.

Children