Hello Infra team,
I'm currently having a problem in my infragistics UltraWebGrid.
The mentioned UltraWebGrid has one column that is a dropdown list, when someone changes the index of the dropdown list I fire the UpdateCell event... so far so good.
On my UpdateCell Event I add a new row to the same UltraWebGrid and fill the new line with the dropdown list.
Now I'm getting one problem!!! When I change for the first time the dropdown list of row[1] I'm adding the new row(row[2]) below, but if I change the same dropdownlist(row[1]) to another index I get a new row[3]... I would like some kind of validation on my UpdateCell Event that prevented the duplication of new rows.
I tried to check the text of the last row like this:
int rowNumber = this.myWebGrid.Rows.Count-1;
string myText = this.myWebGrid.Rows[rowNumber].Cells[1].Text;
//I'm using Cells[1] because the UltraWebGrid has 2 columns and the text I want to
//find is on the second column
if(myText == string.Empty)
{
this.myWebGrid.Rows.Remove(e.Cell.Row);
}
I didnt managed to get this code working...
Some help would be much appreciated,
Cheers,
AN
I got my problem worked out.
At the beggining of the methods I'm making the myWebGridID.Rows.Clear() and then I recreate one line
at each time using a foreach statement.