Hey,
I have a RadGrid on my page and I am trying to access the information that I am editting and I am having a problem with the TemplateColumn. This is the code that I am using to traverse through a Grid that is all text and it works great but when I try to edit it to work on Template Columns I keep getting that the column is null when it has Data in it. Just so you know that when I am using a TemplateColumn I have a RadComboBox inside it and that is what I am trying to grab the information from when i am updating or inserting. I am making the change to make the editor be a RadComboBox but it is still giving me null values when there is data in my ComboBox.
foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)
{
if (column is IGridEditableColumn)
{
IGridEditableColumn editableCol = (column as IGridEditableColumn);
if (editableCol.IsEditable)
{
IGridColumnEditor editor = editManager.GetColumnEditor(editableCol);
if (editor is GridTextColumnEditor)
{
if (Decimal.Parse((editor as GridTextColumnEditor).Text) > 0)
{
offerValues[i] = Decimal.Parse((editor as GridTextColumnEditor).Text);
i++;
}
else
{
status = false;
}
}
}
}
}
I have a RadGrid on my page and I am trying to access the information that I am editting and I am having a problem with the TemplateColumn. This is the code that I am using to traverse through a Grid that is all text and it works great but when I try to edit it to work on Template Columns I keep getting that the column is null when it has Data in it. Just so you know that when I am using a TemplateColumn I have a RadComboBox inside it and that is what I am trying to grab the information from when i am updating or inserting. I am making the change to make the editor be a RadComboBox but it is still giving me null values when there is data in my ComboBox.
foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)
{
if (column is IGridEditableColumn)
{
IGridEditableColumn editableCol = (column as IGridEditableColumn);
if (editableCol.IsEditable)
{
IGridColumnEditor editor = editManager.GetColumnEditor(editableCol);
if (editor is GridTextColumnEditor)
{
if (Decimal.Parse((editor as GridTextColumnEditor).Text) > 0)
{
offerValues[i] = Decimal.Parse((editor as GridTextColumnEditor).Text);
i++;
}
else
{
status = false;
}
}
}
}
}