This question is locked. New answers and comments are not allowed.
Hi telerik and thank for your product!
I created pop windows form form for add news at site. Form have how control text and to upload file control. Upload file control for news picture. After add news I try close this window and refresh grid.
But my code $('#NewsGrid').data('tGrid').ajaxRequest();$('.t-window').data('tWindow').close(); return how text :(
I created pop windows form form for add news at site. Form have how control text and to upload file control. Upload file control for news picture. After add news I try close this window and refresh grid.
[HttpPost]
public
ActionResult Add(NewsGrid news, HttpPostedFileBase img)
{
if
(
string
.IsNullOrEmpty(news.TitleTranslit))
{
news.TitleTranslit = news.Title.ToTranslit();
}
news.AuthorPublish = UserInfo.Name;
if
(ModelState.IsValid)
{
this
.GridNewsRepository.InsertOrUpdate(news);
string
fileName =
string
.Format(
"short-{0}"
, news.Id);
string
getFileName;
this
.SaveNewsImage(img, fileName,
out
getFileName);
var imaeg =
new
ImageNews { Id = news.Id, NewsImage = getFileName };
this
.NewsImageRepository.InsertOrUpdate(imaeg);
return
JavaScript(
"$('#NewsGrid').data('tGrid').ajaxRequest();$('.t-window').data('tWindow').close();"
);
}
return
View(news);
}