Trouver un fichier de code source :
   

Version Française - English Version
Accueil > 

ASP

 > 

GRIDVIEW WITH TREEVIEW AND CALLBACK

 > 

WindowsControlLibrary1/WebControlLibrary1/Javascripts/TreeViewButton.js


GRIDVIEW WITH TREEVIEW AND CALLBACK

WindowsControlLibrary1/WebControlLibrary1/Javascripts/TreeViewButton.js


Informations sur ce code source

Cliquez pour voir la capture en taille normale
Code Source GRIDVIEW WITH TREEVIEW AND CALLBACK
Auteur fredzool
Fichier WindowsControlLibrary1/WebControlLibrary1/Javascripts/TreeViewButton.js en ASP / ASP.NET
Publié le 01/05/2010
Mis à jour le 01/05/2010

Voici un gridview qui contient un tree view pour plier et deplier les lignes il faut que dans la source de donnee il y ai un colonne expandable, qui definit que cette ligne a des enfants il faut egalement un colonne level qui definit le niveau hi
 

Fichier : WindowsControlLibrary1/WebControlLibrary1/Javascripts/TreeViewButton.js

Nombre de lignes : 77 lignes


Afficher ce fichier en plein écran
  • /*
  • function TreeViewButtonReceiveData(arg, context) {
  • if (context.firstChild == null) {
  • context.value = arg;
  • }
  • else {
  • context.firstChild.nodeValue = arg;
  • }
  • }*/
  • function Test111() {
  • alert('ca marche');
  • }
  • function TreeViewButtonReceiveData(arg, context) {
  • var index = parseInt(arg);
  • index++;
  • var imageColumn = 0;
  • var disp = '';
  • var collapse = false;
  • //ce n'est pas un plus ou un moins on ne traite pas
  • if (context.rows[index].cells[imageColumn].firstChild.src != plus &&
  • context.rows[index].cells[imageColumn].firstChild.src != minus)
  • return;
  • if (context.rows[index].cells[imageColumn].firstChild.src == plus) {
  • disp = 'inline';
  • context.rows[index].cells[imageColumn].firstChild.src = minus;
  • collapse = false;
  • }
  • else {
  • disp = 'none';
  • context.rows[index].cells[imageColumn].firstChild.src = plus;
  • collapse = true;
  • }
  • var level = parseInt(context.rows[index].cells[levelColumn].innerText);
  • for (var i = index + 1; i < context.rows.length; i++) {
  • var currentRow = context.rows[i];
  • if (parseInt(currentRow.cells[levelColumn].innerText) <= level
  • || parseInt(currentRow.cells[levelColumn].innerText) == 0) {
  • break;
  • }
  • processRow(currentRow, level, collapse, plus, minus, imageColumn, levelColumn, expandableColumn);
  • }
  • }
  • function processRow(currentRow, level, collapse, imgPlus, imgMinus, imgColmun, levelColumn, expandableColumn) {
  • if (collapse == false) {//on extend
  • if (parseInt(currentRow.cells[levelColumn].innerText) == level + 1) {
  • if (currentRow.cells[expandableColumn].innerText == "True") {
  • //on met un plus
  • currentRow.cells[imgColmun].firstChild.src = imgPlus;
  • currentRow.cells[imgColmun].firstChild.style.display = 'inline';
  • currentRow.cells[imgColmun].firstChild.style.visibility = 'visible';
  • }
  • else {//on rend la ligne simplement visible
  • currentRow.cells[imgColmun].firstChild.style.display = 'inline';
  • currentRow.cells[imgColmun].firstChild.style.visibility = 'visible';
  • }
  • currentRow.style.display = 'inline';
  • }
  • }
  • else {//collapse
  • if (parseInt(currentRow.cells[levelColumn].innerText) >= level + 1) {
  • if (currentRow.cells[imgColmun].firstChild.src == imgPlus)
  • currentRow.cells[imgColmun].firstChild.src = imgMinus;
  • currentRow.cells[imgColmun].firstChild.style.display = 'none';
  • currentRow.style.display = 'none';
  • }
  • }
  • }


Liste des fichiers du ZIP

FichierTaille
WindowsControlLibrary1/UpgradeLog.XML7,96 Ko
WindowsControlLibrary1/Web.config7,66 Ko
WindowsControlLibrary1/WebApplication2/Datas/CreationScript.sql3,74 Ko
WindowsControlLibrary1/WebApplication2/Datas/MyDatas.dbml1,36 Ko
WindowsControlLibrary1/WebApplication2/Datas/MyDatas.dbml.layout1,27 Ko
WindowsControlLibrary1/WebApplication2/Datas/MyDatas.designer.cs7,84 Ko
WindowsControlLibrary1/WebApplication2/Datas/myDatas.xml1,37 Ko
WindowsControlLibrary1/WebApplication2/Default.aspx3,25 Ko
WindowsControlLibrary1/WebApplication2/Default.aspx.cs2,72 Ko
WindowsControlLibrary1/WebApplication2/Default.aspx.designer.cs6,39 Ko
WindowsControlLibrary1/WebApplication2/GridTreeView.aspx2,05 Ko
WindowsControlLibrary1/WebApplication2/GridTreeView.aspx.cs3,65 Ko
WindowsControlLibrary1/WebApplication2/GridTreeView.aspx.designer.cs1,45 Ko
WindowsControlLibrary1/WebApplication2/Images/Blue.gif1,15 Ko
WindowsControlLibrary1/WebApplication2/Images/minus.gif856 o
WindowsControlLibrary1/WebApplication2/Images/plus.gif868 o
WindowsControlLibrary1/WebApplication2/Images/railroad.gif843 o
WindowsControlLibrary1/WebApplication2/Images/Thumbs.db6,5 Ko
WindowsControlLibrary1/WebApplication2/MyCallbackTests.aspx2,24 Ko
WindowsControlLibrary1/WebApplication2/MyCallbackTests.aspx.cs2,79 Ko
WindowsControlLibrary1/WebApplication2/MyCallbackTests.aspx.designer.cs2,42 Ko
WindowsControlLibrary1/WebApplication2/PourOdile.aspx1,21 Ko
WindowsControlLibrary1/WebApplication2/PourOdile.aspx.cs1,39 Ko
WindowsControlLibrary1/WebApplication2/PourOdile.aspx.designer.cs1,81 Ko
WindowsControlLibrary1/WebApplication2/Properties/AssemblyInfo.cs1,5 Ko
WindowsControlLibrary1/WebApplication2/Properties/Resources.Designer.cs2,79 Ko
WindowsControlLibrary1/WebApplication2/Properties/Resources.resx4,32 Ko
WindowsControlLibrary1/WebApplication2/Web.config7,54 Ko
WindowsControlLibrary1/WebApplication2/WebApplication2.csproj7,99 Ko
WindowsControlLibrary1/WebApplication2/WebApplication2.csproj.user1,26 Ko
WindowsControlLibrary1/WebApplication2/WebForm1.aspx1,65 Ko
WindowsControlLibrary1/WebApplication2/WebForm1.aspx.cs767 o
WindowsControlLibrary1/WebApplication2/WebForm1.aspx.designer.cs3,11 Ko
WindowsControlLibrary1/WebApplication2/WebForm2.aspx3,84 Ko
WindowsControlLibrary1/WebApplication2/WebForm2.aspx.cs3,22 Ko
WindowsControlLibrary1/WebApplication2/WebForm2.aspx.designer.cs3,4 Ko
WindowsControlLibrary1/WebControlLibrary1/cal/calendar.gif1,17 Ko
WindowsControlLibrary1/WebControlLibrary1/cal/close.gif106 o
WindowsControlLibrary1/WebControlLibrary1/cal/divider.gif49 o
WindowsControlLibrary1/WebControlLibrary1/cal/drop1.gif856 o
WindowsControlLibrary1/WebControlLibrary1/cal/drop2.gif877 o
WindowsControlLibrary1/WebControlLibrary1/cal/left1.gif850 o
WindowsControlLibrary1/WebControlLibrary1/cal/left2.gif864 o
WindowsControlLibrary1/WebControlLibrary1/cal/popcalendar.css3,18 Ko
WindowsControlLibrary1/WebControlLibrary1/cal/popcalendar.js23,13 Ko
WindowsControlLibrary1/WebControlLibrary1/cal/right1.gif851 o
WindowsControlLibrary1/WebControlLibrary1/cal/right2.gif862 o
WindowsControlLibrary1/WebControlLibrary1/cal/up2.gif112 o
WindowsControlLibrary1/WebControlLibrary1/cal/vssver.scc240 o
WindowsControlLibrary1/WebControlLibrary1/CallBackButton.cs3,63 Ko
WindowsControlLibrary1/WebControlLibrary1/CustomButton.cs2,2 Ko
WindowsControlLibrary1/WebControlLibrary1/CustomDatePicker.cs10,03 Ko
WindowsControlLibrary1/WebControlLibrary1/CustomImageButton.cs1,75 Ko
WindowsControlLibrary1/WebControlLibrary1/DatePickerTextBox.cs4,79 Ko
WindowsControlLibrary1/WebControlLibrary1/Images/minus.gif856 o
WindowsControlLibrary1/WebControlLibrary1/Images/plus.gif868 o
WindowsControlLibrary1/WebControlLibrary1/Javascripts/CallBackScripts.js255 o
WindowsControlLibrary1/WebControlLibrary1/Javascripts/IsNumeric.js1,31 Ko
WindowsControlLibrary1/WebControlLibrary1/Javascripts/Money.js1,41 Ko
WindowsControlLibrary1/WebControlLibrary1/Javascripts/TreeViewButton.js2,72 Ko
WindowsControlLibrary1/WebControlLibrary1/MoneyTextBox.cs5,11 Ko
WindowsControlLibrary1/WebControlLibrary1/MoneyTextBoxWithoutJs.cs4,22 Ko
WindowsControlLibrary1/WebControlLibrary1/NumericTextBox.cs4,62 Ko
WindowsControlLibrary1/WebControlLibrary1/Properties/AssemblyInfo.cs3,06 Ko
WindowsControlLibrary1/WebControlLibrary1/TreeViewButton.cs6,38 Ko
WindowsControlLibrary1/WebControlLibrary1/WebControlLibrary1.csproj5,32 Ko
WindowsControlLibrary1/WebControlLibrary1/WebControlLibrary1.csproj.user486 o
WindowsControlLibrary1/WindowsControlLibrary1.sln2,59 Ko
WindowsControlLibrary1/WindowsControlLibrary1.suo71,5 Ko

Pour télécharger le zip au complet, veuillez vous rendre sur cette page :
Télécharger GRIDVIEW WITH TREEVIEW AND CALLBACK


Sources du même auteur ayant un ZIP


Voir la suite...


Sources du même langage comportant un zip


Voir la suite...





Logiciels à télécharger...

  • Easy-Planning (4.5.0.11)
    Easy-Planning (4.5.0.11)
    Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté aux petites et moyennes entreprises(PME). Easy-Planning permet la création de plannings prévisionnels, p...
  • CVEasy (3.1.0.51)
    CVEasy (3.1.0.51)
    PHMSD-CVEasy est un logiciel d'aide à la rédaction de CV d'une simplicité déconcertante. PHMSD-CVEasy vous assistera pour la rédaction de votre CV, le CV de vos amis ou de membres de votre famille, m...
  • LettresFaciles 2011 (8.6.0.31)
    LettresFaciles 2011 (8.6.0.31)
    LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types. Son interface simple d'utilisation mais suffisamment complète vous permettra de créer une multitude de lettres....

Sondage...

 

Développement réalisé par Nicolas SOREL (Nix) et Emmanuel (EBArtSoft) avec l'aide de Cyril DURAND, Merci à Vincent pour ses précieux conseils
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés
Temps d'éxécution de la page : 0,53 sec