Mootools: Advanced DataGrid (beta)

by brunofig 15. March 2007 06:30

The Advanced Datagrid allows you to have a scrollable table with fixed headers and also fixed columns.

The usage is simple:

First initialize the object, passing as argument the div wrapper or the html table:

var datagrid1 = new AdvancedDataGrid($("dtgWrapperFortblData"));

If the table element is passed, the wrapper will be created by the AdvancedDataGrid object.

then just render it:

datagrid1.render();

 

If you want to fix columns, just call the set_fixedColumnsNumber passing the number of columns to fix starting from left to right. So if we want to fix the first to columns we:

datagrid1.set_fixedColumnsNumber(2);

 

You can also zebrafy you table :

datagrid1.set_zebrasCssClass("gAl");

 

For now it just do this. Next steps:

  • Allow databinding;
  • Allow Paging and sorting;
  • allow fix footer;
  • any suggestions?!!?!?

 

You can download the code here.

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Comments

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.7
Theme by Mads Kristensen

About the author

Hi!

My name is Bruno and I'am a senior consultant. When I'm not working, you can catch me playing with my daugther, taking pictures and hanging out with my friends. :)

Page List

Most comments

Root Server Root Server
1 comments
de Germany
steph steph
1 comments
sg Singapore

RecentComments

Comment RSS