NoorAhmed says:
<
script
type
=
"text/javascript"
>
$(function () {
$('[id*=GridView1]').footable();
$('[id*=GridView1] tr :last').closest('table').closest('tr').find('td').show();
$(window).resize(function () {
});
$('[id*=GridView1] tr :last').closest('table').closest('tr').on('click', function () {
$(this).next('tr').hide();
});
});
</
script
>
replace above code with below
<script type="text/javascript">
function pageLoad(sender, args) {
$('[id*=GridView1]').footable();
$('[id*=GridView1] tr:last-child').find('td').removeClass();
}
</script>
NoorAhmed says:
GridView1.HeaderRow.Cells(0).Attributes(
"data-class"
) =
"expand"
GridView1.HeaderRow.Cells(1).Attributes(
"data-hide"
) =
"phone"
GridView1.HeaderRow.Cells(2).Attributes(
"data-hide"
) =
"phone"
GridView1.HeaderRow.Cells(3).Attributes(
"data-hide"
) =
"phone"
GridView1.HeaderRow.Cells(4).Attributes(
"data-hide"
) =
"phone"
GridView1.HeaderRow.Cells(5).Attributes(
"data-hide"
) =
"phone"
GridView1.HeaderRow.TableSection = TableRowSection.TableHeader
remove above code from pageload event and place it in where you are binding the gridview like below
Public Sub getdata()
Dim objCourseFilter As New ScheduleNewDB
objCourseFilter.CategoryIDPro = DropDownListCategory.SelectedValue
objCourseFilter.CityIDPro = DropDownListCity.SelectedValue
objCourseFilter.FieldIDPro = DropDownListField.SelectedValue
objCourseFilter.MonthsIDPro = DropDownListMonths.SelectedValue
Dim dt As DataTable = objCourseFilter.FindCourse()
GridView1.DataSource = dt
GridView1.DataBind()
'Attribute to show the Plus Minus Button.
GridView1.HeaderRow.Cells(0).Attributes("data-class") = "expand"
'Attribute to hide column in Phone.
GridView1.HeaderRow.Cells(1).Attributes("data-hide") = "phone"
GridView1.HeaderRow.Cells(2).Attributes("data-hide") = "phone"
GridView1.HeaderRow.Cells(3).Attributes("data-hide") = "phone"
GridView1.HeaderRow.Cells(4).Attributes("data-hide") = "phone"
GridView1.HeaderRow.Cells(5).Attributes("data-hide") = "phone"
'Adds THEAD and TBODY to GridView.
GridView1.HeaderRow.TableSection = TableRowSection.TableHeader
End Sub