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
setCell issue with formatoptions
20/05/2010
17:59
Avatar
casperd
Member
Members
Forum Posts: 76
Member Since:
11/05/2009
sp_UserOfflineSmall Offline

Hi,

My code:

            $("#tblActiveProjects").jqGrid({
                url:'../Data_Templates/DTM_Projects_Select.asp?FilterType=1&TeamMemberType=1',
                colNames: ['Prj. No.','Project Name', 'Status','RAG','Latest Update','',''],
                colModel: [
                    {name:'ProjectNumber', width:80, align:'center', sorttype:'text'},
                    {name:'ProjectName', width:300, align:'left', sorttype:'text'},
                    {name:'ProjectStatus', width:100, align:'center', sorttype:'text'},
                    {name:'ProjectRAGIndicator', width:60, align:'center', sortable:false, formatter:RAG_formatter},
                    {name:'ProjectStatusDate', width:90, align:'center', sorttype:'date', formatter:'date', formatoptions:{srcformat: 'y/m/d', newformat:'d M Y'}},
                    {name:'LinkToDashboard', width:30, align:'center', hidden:true},
                    {name:'LinkToWorkspace', width:30, align:'center', hidden:true}
                ],
                height: 155,
                sortname: 'ProjectName',
                pager: '#pagerActiveProjects',
                gridview: false,
                afterInsertRow: function(rowid, aData){
                    $("#tblActiveProjects").setCell(rowid,'ProjectStatusDate',"<a href='PG_Dashboard.asp?ReportProjectID=" + rowid + "' target=_new title='Click the Latest Update Date to open then Project Dashboard'>" + aData.ProjectStatusDate + "</a>","gridLink");
                }
            });

The following issue:

1) I use the prededfined "date" formatter to format the column "ProjectStatusDate";

2) I use the setCell method to add a link to the "ProjectStatusDate" column after the row insert;

3) If I use this setCell method I lose the "d M Y" formatting on this column. The dates are not displayed as '18 May 2010', but as '2010/05/18'.

4) If I don't use the setCell mthod, the dates are displayed correctly.

Any ideas?

Thanks!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
50 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