Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Is jqgrid the wrong choice for my project?
28/11/2008
19:20
Avatar
vinofilus
New Member
Members
Forum Posts: 2
Member Since:
29/11/2008
sp_UserOfflineSmall Offline

I have just started using jqgrid on a different project and am loving it.
But I am wondering if I am doing it the hard way with this project.

(I've redesigned the database twice already, but I have a hunch it's still wrong, and that may be my real problem.)

The user is supposed to be able to fill out a timesheet, something like the one pictured below, with dates along the top and project numbers along the side:

Form GridImage Enlarger

The 3 columns within each date column are for recording regular time worked or two kinds of overtime. When a new week starts they will see a blank grid and begin entering the project on which they are working, and what kind of hours on what days they worked. Throughout the week they will return to it and add or edit their work hours.

The database has fields: id, lineid, projectid, workdate, regulartime, overtime, bankedtime, employeeid (plus some others).

As you can see, a unique line of data in my database doesn't coincide with a line of data on the form. For example, the 3 green cells would be from one db entry, which holds the date, project id and times worked.

I can imagine writing the looping php/mysql code to extract the data manually into the xml necessary for jqgrid to build this form very nicely, but it seems like my php code is doing all the work, and when it comes to editing a cell or a line, I'll be writing all the code and loops and not really using the power and elegance of jqgrid.

Am I missing something obvious?
Am I barking up the wrong tree?
Is there an elegant way to do this?
(By the way, my bosses don't seem to think that the layout of the input form should be changed.)

Thanks for any help, criticism, suggestions or ideas you all have!

29/11/2008
11:23
Avatar
palobo
Portugal
Member
Members
Forum Posts: 41
Member Since:
13/11/2008
sp_UserOfflineSmall Offline

Hi,

Just a quick thought, but wouldn't maybe a grd/subgrid or master/detail layout be more suited for such a task.

Elaborationg a bit more on this idea. In the main/master grid you could have the various projects and then use the subgrid/detail forf the time input.

Cheers,

P.

29/11/2008
12:01
Avatar
vinofilus
New Member
Members
Forum Posts: 2
Member Since:
29/11/2008
sp_UserOfflineSmall Offline

Thanks. The grid/subgrid or master/detail option is very intriguing, and one that I hadn't explored at all. In this case, the reason the user enters a project number as text (rather than selecting from a list) is because there are hundreds of projects in the database, and we're trying to keep the form as simple and compact as possible (plus they'd like it to look somewhat like the old MS Jet database one we're replacing). So when they enter a project number, it's is looked up in the database and an english name is shown to the user, and then the rest of the line knows which project ID to assign the work times to when writing to the database. It seems convoluted to me, but I'm struggling with finding the simpler solution that must be out there. So far I can see the subgrid as simplifying this, but I'll keep pondering throughout the day.

Thanks again. Your suggestions get me thinking in different directions, which is exactly what I need!

29/11/2008
13:58
Avatar
palobo
Portugal
Member
Members
Forum Posts: 41
Member Since:
13/11/2008
sp_UserOfflineSmall Offline

OK. I see your dilema then.

Let's get creative then. A simple input filed before diplaying the grid. User starts typing in project number. Jquery autocomplete fetches possible matches from database. Onblur of the input feild and gird is created with the data pertaining to the specific project. This would maybe allow you to instead of relying on the users to update the time spent, just add aditional time and let server sum it all up.

Just an idea 😉

Cheers,
P.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
61 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information