Column as Link

Talk about link fields or link implementations

Moderator: alexandrleonenko

lobosan
Junior
Junior
Posts: 23
Joined: Jan 26th, '09, 16:44

Column as Link

Postby lobosan » Feb 20th, '09, 18:57

Hi... in view mode settings i'm declaring the primary key as type link, here is the code

Code: Select all

"id"=>array("header"=>"ID Actor", "type"=>"link", "align"=>"left", "width"=>"X%|Xpx", "wrap"=>"nowrap", "text_length"=>"-1", "tooltip"=>"false", "tooltip_type"=>"floating|simple", "case"=>"normal", "summarize"=>"false", "sort_type"=>"numeric", "sort_by"=>"", "visible"=>"true", "on_js_event"=>"", "field_key"=>"id", "field_data"=>"id", "rel"=>"", "title"=>"", "target"=>"_top", "href"=>"index.php?id={0}"),

It works ok, but when i want to order by that column clicking over the name of it i have this error

Code: Select all

Fatal error: Call to undefined method DB_Error::tableInfo()

What can i do?

administrator
Site Admin
Site Admin
Posts: 6010
Joined: Jan 7th, '09, 23:18
Contact:

Re: Column as Link

Postby administrator » Feb 21st, '09, 15:54

1. Turn on $debug=true; and say what do you see.
2. Post what do you see here.

lobosan
Junior
Junior
Posts: 23
Joined: Jan 26th, '09, 16:44

Re: Column as Link

Postby lobosan » Feb 25th, '09, 14:59

Hi administrator... if i put debug_mode=true;
I have the same error...

Code: Select all

Fatal error: Call to undefined method DB_Error::tableInfo() in C:\...datagrid.class.php on line 4900

the function is return the error is this:

Code: Select all

protected function GetFieldName($field_offset){
        if(!$this->is_error){
            $fields = $this->data_set->tableInfo();   //This is the line 4900
            $field_name = isset($fields[$field_offset]['name']) ? $fields[$field_offset]['name'] : "";       
            if($field_name) return $field_name;
        }
        return $field_offset;
    } 


I need to resolve this... please help me
Thanks in advance... Santiago

administrator
Site Admin
Site Admin
Posts: 6010
Joined: Jan 7th, '09, 23:18
Contact:

Re: Column as Link

Postby administrator » Feb 27th, '09, 18:21

debug_mode=true; is not for resolving problems, but for understanding what a problem is!

You need to turn debuging on to see on the screen error's description.

kalak
Junior
Junior
Posts: 12
Joined: Nov 10th, '09, 11:45

Re: Column as Link

Postby kalak » Nov 16th, '09, 23:31

Verify the ID values in your table column to make sure they are all numeric or contains valid values
verify your database property settings are all uncommented - removing "//" and that the passwords, user, host settings correct.

Hope that helps some.

Here is my link setting and it column sorts fine:
Im using php dtagrid 6.0.4

Code: Select all

"name"=>array("header"=>"Team",         "type"=>"link",      "align"=>"left",   "width"=>"20%",    "wrap"=>"nowrap", "text_length"=>"30", "tooltip"=>"true",  "tooltip_type"=>"floating",        "case"=>"normal", "summarize"=>"false", "sort_type"=>"string", "sort_by"=>"", "visible"=>"true", "on_js_event"=>"", "field_key"=>"id", "field_key_1"=>"name",     "field_key_2"=>"other_name", "field_key_3"=>"no", "field_data"=>"name",     "rel"=>"", "title"=>"Click for profile",     "target"=>"_blank", "href"=>"$link_path/details.php?col1={0}&col2={1}&col3={2}&col4={3}&view=profile"),


Return to “Field type: "link"”