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
20
Key and Tag properties wont set on Dynamicall added Columns , Rows
posted

 I am dynamically adding columns and rows to my UltraWebGrid however the Key property and the Tag properties will not persist to the page. This is a problem when i have cell updates and am trying to check the row or cell identity.

UltraGridRow row = new UltraGridRow(true);

row.Key = tenor.Identity.ToString();

row.Tag ="GRRRR";

this.UltraWebGrid1.Rows.Add(row, false, true);

 

Any ideas?

  • 45
    posted

    I have nearly the same problem: 

    I am also dynamically adding my columns and rows, i bind a list of objects to my Webgrid.
    Then I do following:

    uwgDaten.Rows[i].Cells.FromKey("myColName").Tag = 1;

    After a postback, I want to read out this tag:
    string tagValue = Int32.Parse(uwgDaten.Rows[i].Cells.FromKey("myColName").Tag.ToString());

    Then I get a NullPointerException!

    Did you find a solution or another way?