Hello!
I have upgraded to the new ajax controls in our project and an existing grid has stopped working properly...
On the ItemDataBound it grabs the value out of column 3 and then runs it through a function to display a new value in column 4 which is a template column.. this is the existing code..
This was working fine before we upgraded (altho possibly not the best way of doing it), but now the line
brings back a value of " " when in editmode.
Why would this have stopped working?
Thanks
Bex
I have upgraded to the new ajax controls in our project and an existing grid has stopped working properly...
On the ItemDataBound it grabs the value out of column 3 and then runs it through a function to display a new value in column 4 which is a template column.. this is the existing code..
| if( e.Item is GridDataItem ) { |
| GridDataItem item = (GridDataItem)e.Item; |
| if (item.OwnerTableView.Name == "ControlFields") |
| { |
| CultureInfo ci = new CultureInfo(selectedEditCulture); |
| string controlName = item.OwnerTableView.ParentItem["Name"].Text; |
| string culture = ci.Name; |
| string parentCulture = ci.TwoLetterISOLanguageName; |
| string key = item.Cells[4].Text; //<THIS LINE |
| string value = string.Empty; |
| value = doFunction(key); |
| if (item.IsInEditMode) |
| { |
| TextBox tb = (TextBox)item.FindControl("txtValue"); |
| if (tb != null) |
| tb.Text = value; |
| } else { |
| Label lb = (Label)item.FindControl("lblValue"); |
| if (lb != null) |
| lb.Text = value; |
| } |
| } |
| } |
This was working fine before we upgraded (altho possibly not the best way of doing it), but now the line
| string key = item.Cells[4].Text; |
brings back a value of " " when in editmode.
Why would this have stopped working?
Thanks
Bex