Gridview Column Resizing using Jquery/ Javascript

Posted by Patil_Rakesh under ASP.NET on 1/2/2013 | Points: 10 | Views : 7043 | Status : [Member] | Replies : 8
Hi,
Anyone knows how resize column width of gridview using Jquery/ Javascript. Note: Gridview is in update panel.
Thanks in advance




Responses

Posted by: Saratvaddilli on: 1/2/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Once go through this link

http://www.codeproject.com/Articles/366013/Resizable-asp-net-Gridview-columns-using-Jquery

Thanks and Regards
V.SaratChand
Show difficulties that how difficult you are

Patil_Rakesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Baimey on: 1/2/2013 [Member] Starter | Points: 25

Up
0
Down
Yeah its possible

Please check this link
http://www.codeproject.com/Articles/366013/Resizable-asp-net-Gridview-columns-using-Jquery

Please Mark as Answer If this Helps

Patil_Rakesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Baimey on: 1/2/2013 [Member] Starter | Points: 25

Up
0
Down
u can check this as well
http://forums.asp.net/t/1647834.aspx/1

Please Mark as Answer If this Helps

Patil_Rakesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patil_Rakesh on: 1/2/2013 [Member] Starter | Points: 25

Up
0
Down
Thank you,Saratvaddilli and Baimey,
but still i have a problem,
my gridview is in update panel and when i change the page index then it will not work and grid remains constant.




Patil_Rakesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Baimey on: 1/2/2013 [Member] Starter | Points: 25

Up
0
Down
Hi
You'll need to manually update the SqlDataSource each time you postback. If there is no real logic behind it you can just add the following to your Page_Load:

protected void Page_Load(object sender, EventArgs e)
{
.....

if (IsPostBack)
{
SqlDataSource1.DataBind();
GridView1.DataBind();
}
}
And if you want this done ONLY when the UpdatePanel performs a postback
as in http://stackoverflow.com/questions/8184331/how-to-check-whether-updatepanel-is-posting-back/8184608#8184608

Please Mark as Answer If this Helps

Patil_Rakesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patil_Rakesh on: 1/2/2013 [Member] Starter | Points: 25

Up
0
Down
Not working Baimey,
is there any solution for it?

Patil_Rakesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Baimey on: 1/2/2013 [Member] Starter | Points: 25

Up
0
Down
I believe that you need to rebind the data to your gridview after you change the page index.

Please Mark as Answer If this Helps

Patil_Rakesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Baimey on: 1/2/2013 [Member] Starter | Points: 25

Up
0
Down
I think u have to call the whole method that selected the data from the database all over again, but that seems to be the only way to do it.

Please Mark as Answer If this Helps

Patil_Rakesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response