This question is locked. New answers and comments are not allowed.
I have a grid that have a ClientTemplate is a link to call a window popup and outside the grid I have a button also call a window popup.
The issue is when I click a link on grid to call the window popup, after that I click button (outside grid) to call window popup then combobox in the window popup does not work anymore (all telerik control). I didn't figure out what happen. Please help me to fix this.
Thanks & Best regards
Here is my code:
<table style="width: 100%" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 30%" class="dev_body_title dev_body_title_bottom_line">
@Resources.StaticMessages.HEADER_BRANCH_LIST
</td>
<td style="text-align: right" class="dev_body_title_bottom_line">
<div class="dev_add_new_format">
<input type="button" class="submit_blue_99" onclick="jsBranchAdd()" name="btnAddNewBranch" id="btnAddNewBranch" value="@Resources.StaticMessages.BUTTON_ADD_NEW" />
</div>
</td>
</tr>
</table>
Html.Telerik().Grid(Model)
.Name("grid_roles_normal")
.DataKeys(keys => { keys.Add(o => o.ID); })
.DataBinding(data => data.Ajax()
.Select("AjaxBranchesList", "Branch"))
.Columns(cols =>
{
cols.Bound(o => o.Bra_code).Title(Resources.StaticMessages.TITLE_CODE).Width(60);
cols.Bound(o => o.Bra_name).Title(Resources.StaticMessages.TITLE_BRANCH_NAME).Width(100);
cols.Bound(o => o.Respon_person_name).Title(Resources.StaticMessages.TITLE_BRANCH_RESP_PERSON).Width(100);
cols.Bound(o => o.Add_province_name).Title(Resources.StaticMessages.TITLE_PROVINCE).Width(100);
cols.Bound(o => o.Add_district_name).Title(Resources.StaticMessages.TITLE_DISTRICT).Width(100);
cols.Bound(o => o.Address).Title(Resources.StaticMessages.TITLE_ADDR).Width(150);
cols.Bound(o => o.Status_name).Title(Resources.StaticMessages.TITLE_STATUS).Width(90);
cols.Bound(o => o.Created_by).Title(Resources.StaticMessages.TITLE_CREATED_BY).Width(100);
cols.Bound(o => o.Created_date).Title(Resources.StaticMessages.TITLE_CREATED_DATE).Width(100).Format(Resources.Settings.DATE_TIME_FORMAT_GRID_104);
cols.Bound(o => o.ID).Width(20).Title(Resources.StaticMessages.TITLE_EDIT).Sortable(false).Filterable(false).ClientTemplate("<a href='javascript:void(0)' class='dev_img_edit_action_16' onclick='jsBranchEdit(\"<#= ID #>\")'></a>");
cols.Bound(o => o.ID).Width(20).Title(Resources.StaticMessages.TITLE_DELETE).Sortable(false).Filterable(false).ClientTemplate("<a href='javascript:void(0)' class='dev_img_delete_action_16' onclick='jsBranchDelete(\"<#= ID #>\")'></a>");
})
.Selectable()
.Sortable()
.Filterable()
.Pageable(paging => paging.PageSize(15))
.ColumnContextMenu()
.Reorderable(orders => orders.Columns(true))
)
@(Html.Telerik().Window()
.Name("pop_BranchAdd")
.Title(Resources.StaticMessages.TITLE_BRANCH_POPUP_ADD)
.Buttons(b => b.Close())
.Visible(false)
.Modal(true)
.Width(900)
.Draggable(true)
)
<script type="text/javascript">
function jsBranchAdd() {
var url = '@Url.Action("AddBranch", "Branch")';
$.post(url, function (data) {
var window = $('#pop_BranchAdd').data('tWindow');
window.content(data);
window.center().open();
});
}
</script>
The issue is when I click a link on grid to call the window popup, after that I click button (outside grid) to call window popup then combobox in the window popup does not work anymore (all telerik control). I didn't figure out what happen. Please help me to fix this.
Thanks & Best regards
Here is my code:
<table style="width: 100%" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 30%" class="dev_body_title dev_body_title_bottom_line">
@Resources.StaticMessages.HEADER_BRANCH_LIST
</td>
<td style="text-align: right" class="dev_body_title_bottom_line">
<div class="dev_add_new_format">
<input type="button" class="submit_blue_99" onclick="jsBranchAdd()" name="btnAddNewBranch" id="btnAddNewBranch" value="@Resources.StaticMessages.BUTTON_ADD_NEW" />
</div>
</td>
</tr>
</table>
Html.Telerik().Grid(Model)
.Name("grid_roles_normal")
.DataKeys(keys => { keys.Add(o => o.ID); })
.DataBinding(data => data.Ajax()
.Select("AjaxBranchesList", "Branch"))
.Columns(cols =>
{
cols.Bound(o => o.Bra_code).Title(Resources.StaticMessages.TITLE_CODE).Width(60);
cols.Bound(o => o.Bra_name).Title(Resources.StaticMessages.TITLE_BRANCH_NAME).Width(100);
cols.Bound(o => o.Respon_person_name).Title(Resources.StaticMessages.TITLE_BRANCH_RESP_PERSON).Width(100);
cols.Bound(o => o.Add_province_name).Title(Resources.StaticMessages.TITLE_PROVINCE).Width(100);
cols.Bound(o => o.Add_district_name).Title(Resources.StaticMessages.TITLE_DISTRICT).Width(100);
cols.Bound(o => o.Address).Title(Resources.StaticMessages.TITLE_ADDR).Width(150);
cols.Bound(o => o.Status_name).Title(Resources.StaticMessages.TITLE_STATUS).Width(90);
cols.Bound(o => o.Created_by).Title(Resources.StaticMessages.TITLE_CREATED_BY).Width(100);
cols.Bound(o => o.Created_date).Title(Resources.StaticMessages.TITLE_CREATED_DATE).Width(100).Format(Resources.Settings.DATE_TIME_FORMAT_GRID_104);
cols.Bound(o => o.ID).Width(20).Title(Resources.StaticMessages.TITLE_EDIT).Sortable(false).Filterable(false).ClientTemplate("<a href='javascript:void(0)' class='dev_img_edit_action_16' onclick='jsBranchEdit(\"<#= ID #>\")'></a>");
cols.Bound(o => o.ID).Width(20).Title(Resources.StaticMessages.TITLE_DELETE).Sortable(false).Filterable(false).ClientTemplate("<a href='javascript:void(0)' class='dev_img_delete_action_16' onclick='jsBranchDelete(\"<#= ID #>\")'></a>");
})
.Selectable()
.Sortable()
.Filterable()
.Pageable(paging => paging.PageSize(15))
.ColumnContextMenu()
.Reorderable(orders => orders.Columns(true))
)
@(Html.Telerik().Window()
.Name("pop_BranchAdd")
.Title(Resources.StaticMessages.TITLE_BRANCH_POPUP_ADD)
.Buttons(b => b.Close())
.Visible(false)
.Modal(true)
.Width(900)
.Draggable(true)
)
<script type="text/javascript">
function jsBranchAdd() {
var url = '@Url.Action("AddBranch", "Branch")';
$.post(url, function (data) {
var window = $('#pop_BranchAdd').data('tWindow');
window.content(data);
window.center().open();
});
}
</script>