Group,
Not sure there is an easy way to explain this, but basically I have an HTML table containing 4 columns with a bunch of RadTextBox controls. What I am trying to do is iterate through each row of the HTML table and grab the the value of the RadTextBox based off of the cell index.
Below is a snippet of the code which appears to work for a regular asp textbox but not a radtextbox. I get the error:
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'Telerik.Web.UI.RadTextBox'.
Not sure there is an easy way to explain this, but basically I have an HTML table containing 4 columns with a bunch of RadTextBox controls. What I am trying to do is iterate through each row of the HTML table and grab the the value of the RadTextBox based off of the cell index.
Below is a snippet of the code which appears to work for a regular asp textbox but not a radtextbox. I get the error:
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'Telerik.Web.UI.RadTextBox'.
foreach (HtmlTableRow row in uc.RecommendationTable.Rows)
{
var rec1 = (RadTextBox)row.Cells[1].Controls[0];
}
i basically want to avoid having to use any find controls or anything because there are like 20 rows of 4 columns. I want to iterate through each row and give me the value of the control located in each column of the HTML table.