Click here to Skip to main content
15,912,756 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionHelp with class assignment Pin
GeraldBlackmore22-Apr-14 17:56
GeraldBlackmore22-Apr-14 17:56 
AnswerRe: Help with class assignment Pin
Peter Leow22-Apr-14 18:17
professionalPeter Leow22-Apr-14 18:17 
SuggestionRe: Help with class assignment Pin
Richard Deeming23-Apr-14 1:32
mveRichard Deeming23-Apr-14 1:32 
GeneralRe: Help with class assignment Pin
GeraldBlackmore24-Apr-14 16:37
GeraldBlackmore24-Apr-14 16:37 
AnswerRe: Help with class assignment Pin
vbmike24-Apr-14 6:12
vbmike24-Apr-14 6:12 
GeneralRe: Help with class assignment Pin
GeraldBlackmore24-Apr-14 16:38
GeraldBlackmore24-Apr-14 16:38 
Questionis it possible to get a value from another page using JavaScript language? Pin
Hakan Bulut21-Apr-14 21:43
Hakan Bulut21-Apr-14 21:43 
AnswerRe: is it possible to get a value from another page using JavaScript language? Pin
Blikkies21-Apr-14 21:55
professionalBlikkies21-Apr-14 21:55 
GeneralRe: is it possible to get a value from another page using JavaScript language? Pin
Hakan Bulut21-Apr-14 22:27
Hakan Bulut21-Apr-14 22:27 
GeneralRe: is it possible to get a value from another page using JavaScript language? Pin
Blikkies21-Apr-14 22:51
professionalBlikkies21-Apr-14 22:51 
GeneralRe: is it possible to get a value from another page using JavaScript language? Pin
Hakan Bulut22-Apr-14 0:13
Hakan Bulut22-Apr-14 0:13 
GeneralRe: is it possible to get a value from another page using JavaScript language? Pin
Hakan Bulut22-Apr-14 1:08
Hakan Bulut22-Apr-14 1:08 
QuestionRequireJs Pin
Suraj Sahoo | Coding Passion16-Apr-14 9:36
professionalSuraj Sahoo | Coding Passion16-Apr-14 9:36 
AnswerRe: RequireJs Pin
ujjwal shukla16-Apr-14 20:46
ujjwal shukla16-Apr-14 20:46 
GeneralRe: RequireJs Pin
Suraj Sahoo | Coding Passion16-Apr-14 20:59
professionalSuraj Sahoo | Coding Passion16-Apr-14 20:59 
AnswerRe: RequireJs Pin
ujjwal shukla16-Apr-14 22:36
ujjwal shukla16-Apr-14 22:36 
GeneralRe: RequireJs Pin
Suraj Sahoo | Coding Passion16-Apr-14 22:41
professionalSuraj Sahoo | Coding Passion16-Apr-14 22:41 
GeneralRe: RequireJs Pin
Sibeesh KV24-Sep-14 18:31
professionalSibeesh KV24-Sep-14 18:31 
GeneralRe: RequireJs Pin
Suraj Sahoo | Coding Passion24-Sep-14 19:28
professionalSuraj Sahoo | Coding Passion24-Sep-14 19:28 
GeneralRe: RequireJs Pin
Sibeesh KV24-Sep-14 21:00
professionalSibeesh KV24-Sep-14 21:00 
AnswerRe: RequireJs Pin
thatraja16-Apr-14 21:32
professionalthatraja16-Apr-14 21:32 
GeneralRe: RequireJs Pin
Suraj Sahoo | Coding Passion16-Apr-14 21:36
professionalSuraj Sahoo | Coding Passion16-Apr-14 21:36 
QuestionGridview fixed header and footer while scrolling Pin
harsha714-Apr-14 4:09
harsha714-Apr-14 4:09 
Hi ,

I workin on Gridview fixed header and footer while scrolling by using java script

<script language="javascript">
$(document).ready(function() {
try {
$(".divgrid").each(function() {
var grid = $(this).find("table")[0];
var ScrollHeight = $(this).height();
var gridWidth = $(this).width()-10;
var headerCellWidths = new Array();
// for (var i = 0; i < grid.getElementsByTagName('TH').length; i++) {
// headerCellWidths[i] = grid.getElementsByTagName('TH')[i].offsetWidth;
// }
grid.parentNode.appendChild(document.createElement('div'));
var parentDiv = grid.parentNode; var table = document.createElement('table');
for (i = 0; i < grid.attributes.length; i++) {
if (grid.attributes[i].specified && grid.attributes[i].name != 'id') {
table.setAttribute(grid.attributes[i].name, grid.attributes[i].value);
}
}


table.appendChild(document.createElement('tbody'));
table.getElementsByTagName('tbody')[0].appendChild(grid.getElementsByTagName('TR')[0]);
gridRow.getElementsByTagName('TD')[i].offsetWidth) {
}
var gridHeight = grid.offsetHeight;
if (gridHeight < ScrollHeight)
ScrollHeight = gridHeight;
parentDiv.removeChild(grid);
var dummyHeader = document.createElement('div');
dummyHeader.appendChild(table); parentDiv.appendChild(dummyHeader);
var scrollableDiv = document.createElement('div');
if (parseInt(gridHeight) > ScrollHeight) {
gridWidth = parseInt(gridWidth) + 17;
}
scrollableDiv.style.cssText = 'overflow:auto;height:' + ScrollHeight + 'px;width:' + gridWidth + 'px';

scrollableDiv.appendChild(grid);
parentDiv.appendChild(scrollableDiv);
});
}
catch (err) { }
}
);
</script>

&lt;div class="divgrid"&gt;
&lt;asp:GridView ID="gvEmployees" runat="server" ShowFooter="true"&gt;
&lt;FooterStyle BackColor="Green" /&gt;
&lt;/asp:GridView&gt;
&lt;/div&gt;


now problem is alignment header columns width and data columns width are different size.

Thanks & Regards
Harsha

-- modified 14-Apr-14 10:22am.
AnswerRe: Gridview fixed header and footer while scrolling Pin
Anurag Gandhi24-Apr-14 5:29
professionalAnurag Gandhi24-Apr-14 5:29 
AnswerRe: Gridview fixed header and footer while scrolling Pin
sankarsan parida12-May-14 7:23
professionalsankarsan parida12-May-14 7:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.