or
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
|
function
Click() {
var ajaxManager = $find("RadAjaxPanel2");
ajaxManager.ajaxRequest(2);
}
2 problems on this scenarioi. First is that the function is not only called on rowclick, but also on page lod. Is there a workaround for this? Second is that $find("RadAjaxPanel2") gives null at page load. Any suggestions on how to fix?
| protected void Category_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e) | |
| { | |
| //First reference the edited grid item through the NamingContainer attribute | |
| GridEditableItem editedItem = (sender as RadComboBox).NamingContainer as GridEditableItem; | |
| //The dropdown list will be the first control in the Controls collection of the corresponding cell | |
| RadComboBox ddlist = editedItem["ParentCategory"].Controls[0] as RadComboBox; | |
| //Change the data source of the sub-categories dropdown list | |
| sdsSubCategories.SelectParameters.Clear(); | |
| sdsSubCategories.SelectParameters.Add("ParentCategoryId", ddlist.SelectedValue); | |
| sdsSubCategories.DataBind(); | |
| //Change the combox's datasource to the sub categories datasource | |
| RadComboBox ddlistSub = editedItem["SubCategory"].Controls[0] as RadComboBox; | |
| ddlistSub.DataSource = Schools.SubCategoryList(Convert.ToInt32(ddlist.SelectedValue)); | |
| ddlistSub.DataBind(); | |
| } |