hiiiiii
i have a Ajax tabcontainer inside tab container i have create a Gridview.
but i cant' find the gridview value . in java script.
i have write like this.--
var grid = document.getElementById('<%= Gridview1.ClientID %>');
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Sep 30, 2013, 6:24 AM
In the dropdown_selectionchangedEvent()
{
//Fetch all the dropdowlist controls from the datagrid. use document.getElementsByTagName()
// get the value from the dropdownlist controls
// Sum-up the values.
//Find the footer control in the gridview control and bind the value there.
}
I don't have visual studio to create the complete set. Let me try with Notepad and IE browser for the javascript part.
ranjan sahooPosted Sep 30, 2013, 6:14 AM
Posted Sep 30, 2013, 6:08 AM
During the databound event, add the javascript for the dropdownlist selectionchanged event.
In the comobox_selectionchangedEvent()
{
//Fetch all the dropdowlist controls from the datagrid. use document.getElementsByTagName()
// get the value from the dropdownlist controls
// Sum-up the values.
//Find the footer control in the gridview control and bind the value there.
}
Please let me know, if you need more help.
ranjan sahooPosted Sep 30, 2013, 5:55 AM
Posted Sep 30, 2013, 4:24 AM
Can you please upload screenshot of your gridview (while running)?
ranjan sahooPosted Sep 30, 2013, 4:19 AM
ranjan sahooPosted Sep 30, 2013, 4:13 AM
Sunny SharmaPosted Sep 30, 2013, 2:10 AM
-----------------------------------------------------------
var grid = document.getElementById('<%= Gridview1.ClientID %>');
-----------------------------------------------------------
should be:
-----------------------------------------------------------
var grid = document.getElementById('<%= GridAssessment.ClientID %>');
-----------------------------------------------------------
as per your code.
In order to show the total in footer you need to sum the total on RowDataBound and assign it to the label control in footer. Refer to this post:
http://www.beansoftware.com/ASP.NET-Tutorials/Total-GridView-Footer.aspx
It will help you achieve this purpose.
Hope it helps :)
Posted Sep 30, 2013, 1:26 AM
In your HTML , the gridview id is GridAssessment and in your javascript the control name is
GridView1.ClientId.
Change your javascript as below,
var grid = document.getElementById('<%= GridAssessment .ClientID %>');
Please let me know, if it is not working.
ranjan sahooPosted Sep 30, 2013, 1:13 AM
ranjan sahooPosted Sep 30, 2013, 1:12 AM
PERSONAL
0
Sunny SharmaPosted Sep 28, 2013, 6:52 AM
Please share your html code so that we help you quickly and better.
ranjan sahooPosted Sep 28, 2013, 3:19 AM
thanx in advance