Here I am using collapsible GridView to display all student details and their details I want to expand all records at a time by using button or check box
Here I am using collapsible GridView to display all student details and their details I want to expand all records at a time by using button or check box
if any solution or links suggest me ASAP.
Thanks in advance
According to your needs, I write an example, you can refer to it.
Class
public class Customers
{
public int CustomerId { get; set; }
public string ContactName { get; set; }
public string City { get; set; }
}
public class Orders
{
public int CustomerId { get; set; }
public int OrderId { get; set; }
public DateTime OrderDate { get; set; }
}
Thank you for replying to my answer .But I getting an Issuse that ,whenever i am clicking on ExpandAll button ,All the data in grid view is expanding only for a second and again its collapsing back.Im not understanding why its collpsing back without clicking
on close All button .Please Reply as soon as possible .
But I getting an Issuse that ,whenever i am clicking on ExpandAll button ,All the data in grid view is expanding only for a second and again its collapsing back.Im not understanding why its collpsing back without clicking on close All button .Please Reply
as soon as possible .
I suppose there might be a problem with the script.
I have tried the code, performed normally, currently unable to reproduce your problem, you can also compare the code to see if there
are inconsistencies.
Thank you for your reply .I solved that Issue ,but Im again getting an Issue that Whenever Iam clicking on expand All -all the data in the grid view is expanding and when i click on close All it works fine .but again when i click on expand its not expanding
.If you have any Idea please help me out .
I got another Issue that whenever i click on (-) or (+) symbol it works fine for the first time ,but if i click again then it is removing the particular row from the grid view .I am trying to write the script in a function and calling it through onclick
method .But the function is not working .Can you suggest me .
Member
6 Points
17 Posts
how to expand collapsible gridview all records in c#
Nov 16, 2017 06:43 AM|mamidi234|LINK
Hi team,
Here I am using collapsible GridView to display all student details and their details I want to expand all records at a time by using button or check box
if any solution or links suggest me ASAP.
Thanks in advance
Participant
1627 Points
457 Posts
Re: how to expand collapsible gridview all records in c#
Nov 16, 2017 07:58 AM|Rohit Rao|LINK
Hope it will help you :
http://www.aspforums.net/Threads/142438/Expand-Collapse-All-Child-Nested-GridViews-from-GridView-Header-in-ASPNet/
Participant
980 Points
475 Posts
Re: how to expand collapsible gridview all records in c#
Nov 16, 2017 08:04 AM|zxj|LINK
Hi Mamidi234,
According to your needs, I write an example, you can refer to it.
Class
Html markup
Code behind
Regards,
zxj
Member
6 Points
17 Posts
Re: how to expand collapsible gridview all records in c#
Nov 21, 2017 12:42 PM|mamidi234|LINK
Hi,
Thank you for replying to my answer .But I getting an Issuse that ,whenever i am clicking on ExpandAll button ,All the data in grid view is expanding only for a second and again its collapsing back.Im not understanding why its collpsing back without clicking on close All button .Please Reply as soon as possible .
Thanks in Advance.
Regards
Mamidi
Participant
980 Points
475 Posts
Re: how to expand collapsible gridview all records in c#
Nov 22, 2017 01:24 AM|zxj|LINK
Hi Mamidi,
I suppose there might be a problem with the script.
Can you show related code?
Regards,
zxj
Member
6 Points
17 Posts
Re: how to expand collapsible gridview all records in c#
Nov 23, 2017 08:12 AM|mamidi234|LINK
Hi,
Here My code is
<script type="text/javascript">
$("[src*=plus]").live("click", function () {
$(this).closest("tr").after("<tr><td></td><td colspan = '999'>" + $(this).next().html() + "</td></tr>")
$(this).attr("src", "../images/minus.jpg");
});
$("[src*=minus]").live("click", function () {
$(this).attr("src", "../images/plus.jpg");
$(this).closest("tr").next().remove();
});
$(".expand").live("click", function () {
$("[src*=plus]").trigger("click");
})
$(".close").live("click", function () {
$("[src*=minus]").trigger("click");
})
</script>
Participant
980 Points
475 Posts
Re: how to expand collapsible gridview all records in c#
Nov 23, 2017 09:29 AM|zxj|LINK
Hi Mamidi,
I have tried the code, performed normally, currently unable to reproduce your problem, you can also compare the code to see if there are inconsistencies.
Regards,
zxj
Member
6 Points
17 Posts
Re: how to expand collapsible gridview all records in c#
Nov 23, 2017 10:13 AM|mamidi234|LINK
Hi ,
Thank you for your reply .I solved that Issue ,but Im again getting an Issue that Whenever Iam clicking on expand All -all the data in the grid view is expanding and when i click on close All it works fine .but again when i click on expand its not expanding .If you have any Idea please help me out .
Thank you in Advance
Mamidi
Member
6 Points
17 Posts
Re: how to expand collapsible gridview all records in c#
Nov 23, 2017 11:30 AM|mamidi234|LINK
Hi ,
I got another Issue that whenever i click on (-) or (+) symbol it works fine for the first time ,but if i click again then it is removing the particular row from the grid view .I am trying to write the script in a function and calling it through onclick method .But the function is not working .Can you suggest me .
Thank you