Solved

HTML Page with grid and column help results on page are jumbled

Posted on 2015-01-22
10
179 Views
Last Modified: 2015-01-23
To say I am a novice at this is best so the simpler the better. I am trying to create an html page with some javascript for a project type of tracking page. I found a site that gives me exactly what I need and I am trying to duplicate it on my local machine. Locally on my machine I setup some folders and sub folders that you will see that references the js for now. The problem I am having is everything on my page is jumbled as you can see from my attachment. The page I am looking to duplicate is at: http://mleibman.github.io/SlickGrid/examples/example-multi-column-sort.html

Can someone please tell me what I could be missing. I also provided my code in my attachment.
example.docx
0
Comment
Question by:tmaususer
  • 5
  • 5
10 Comments
 
LVL 11

Accepted Solution

by:
Radek Baranowski earned 500 total points
ID: 40564400
are you sure you import:

<script src="../lib/jquery-1.7.min.js"></script>
<script src="../lib/jquery.event.drag-2.2.js"></script>

<script src="../slick.core.js"></script>
<script src="../slick.grid.js"></script>

and

  <link rel="stylesheet" href="../slick.grid.css" type="text/css"/>
  <link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css"/>
  <link rel="stylesheet" href="examples.css" type="text/css"/>

?
0
 

Author Comment

by:tmaususer
ID: 40564554
Will Double check and update asap.
0
 

Author Comment

by:tmaususer
ID: 40564737
It looks like I did not have the slick.grid.css and examples.css. I now have the slick grid css but cannot find the examples css. I am close. My screen now looks like the following (see new attachment)
ScreenShot2.docx
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:tmaususer
ID: 40564804
Also one other question about the data populating the page. Where is this coming from and how do I modify?
0
 
LVL 11

Expert Comment

by:Radek Baranowski
ID: 40565877
everything is int ht github source, including examples.css

https://github.com/mleibman/SlickGrid/tree/gh-pages/examples
0
 
LVL 11

Expert Comment

by:Radek Baranowski
ID: 40565880
data is generated here, but it's just for testing purposes:

 $(function () {
    var MS_PER_DAY = 24 * 60 * 60 * 1000;
    var data = [];
    for (var i = 0; i < 500; i++) {
      var startDate = new Date(new Date("1/1/1980").getTime() + Math.round(Math.random() * 365 * 25) * MS_PER_DAY);
      var endDate = new Date(startDate.getTime() + Math.round(Math.random() * 365) * MS_PER_DAY);
      data[i] = {
        title: "Task " + i,
        duration: Math.round(Math.random() * 30) + 2,
        percentComplete: Math.round(Math.random() * 100),
        start: startDate,
        finish: endDate,
        effortDriven: (i % 5 == 0)
      };
    }

Open in new window

0
 

Author Comment

by:tmaususer
ID: 40566093
I saw that but did not respond. So what do I get rid of without removing the grid and how do I put in my own data?
0
 
LVL 11

Expert Comment

by:Radek Baranowski
ID: 40566102
the above function produces 500 rows of some random data, organizing it into desired structure, records (rows) of 6 items (columns)

just put in place any other data import or data generator, up to your preference. you probably need to create a function to load data from db/other page/api service
0
 

Author Comment

by:tmaususer
ID: 40566124
I would have no idea being a novice how to acomplish this.
0
 
LVL 11

Expert Comment

by:Radek Baranowski
ID: 40566131
I mean, if you are doing such page, you surely have *some* data you want to show, right ? so you need to figure out how to put your data into javascript objects. there are a plenty of tutorials and how-to's around. if you make some attempts, certainly me or other experts will eagerly help you. But well, you need to know something at least. Good Luck!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question