Posted
on Mar 29, 2012
(permalink)
I have telerik grid --->(inside that grid) detailview ---> tabstrip ---> loadcontentfrom("another page"). so i have two different view pages one for grid and another for editing details in detail view.
I have value in one column of grid view and to change(edit) that value and other details, I'm using detail view page.
my problem is when i'm changing value in detailview it should be reflected in the grid as-well but it is not.
I'm using mvc 3 with razor.
I'm trying to do something like below in detailview page but not getting success.
$('#SaveButtonId').click(function () {
var $form = $(this).parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().html();
var $target = $("[myId]", $form);
// alert($target.attr("myId"))
//$target.attr("checked",false);
$target.removeAttr('checked');
//$target.removeAttr('disabled');
});
and my grid is like as below:
@(Html.Telerik().Grid<ParametersSelectModel>()
.Name("ParametersList")
.Sortable(sorting => sorting.Enabled(true))
.Pageable(paging =>
paging.PageSize(15)
.Style(GridPagerStyles.NextPreviousAndNumeric)
.Position(GridPagerPosition.Bottom))
.Footer(true)
.DataBinding(dataBinding => dataBinding.Ajax().Select("_ParametersList", "Parameters"))
.DataKeys(keys => keys.Add(p => p.PARAMETER_ID))
.Filterable(filtering => filtering.Enabled(true))
.Reorderable(reorder => reorder.Columns(true))
.HtmlAttributes(new { style = "font-size: 10pt; margin-left:-13px; margin-right:-13px; margin-top: -4px; margin-bottom: -4px;" })
.Columns(columns =>
{
columns.Bound(p => p.NUMBER).Title("No.").Width(65).ReadOnly();
columns.Bound(p => p.MODULE).Title("Module").Width(207).ReadOnly();
columns.Bound(p => p.SHORT_DESCRIPT).Title("Description").Width(800).ClientTemplate("<dl title='<#= TOOLTIP #>' ><#= SHORT_DESCRIPT #></dl>");
columns.Bound(p => p.VALUE).Title("Value").ClientTemplate("<input type='checkbox' disabled='disabled' name='Active' <#= VALUE ? checked='checked' : '' #> myId='<#= NUMBER #>'/>")
.Width(100).HtmlAttributes(new { @style = "text-align:center"});
})
.DetailView(details => details.ClientTemplate(
Html.Telerik().TabStrip()
.Name("TabStripchk_<#= NUMBER #>")
.HtmlAttributes(new { style = "font-size: 10pt; margin-left:-40px; margin-right:-10px; margin-top: -10px; border: 4px solid #f99f1c;" })
.SelectedIndex(0)
.Items(items =>
{
items.Add()
.Text("Settings")
.HtmlAttributes(new { style = "height: 28px;" })
.LoadContentFrom(Url.Action("GeneralSettings", "Parameters", new { No = "<#= NUMBER #>", Chk = "<#= VALUE#>" }));
}).ToHtmlString()))
.ClientEvents(events => events
.OnDataBound("Flag_onDataBound")
//.OnDetailViewCollapse("Refresh_Gird")
) )
any solution for this please?
Thanks in advance.