Trouble with IE10 in compatible mode

QuestionsTrouble with IE10 in compatible mode
Arne asked 11 years ago

hi Abu
sorry to say, but I still have some trouble with this grid. I found that is has to do with the version of IE.

Google Chrome is ok (Versjon 33.0.1750.154 m)
IE10 is ok
IE10 is not ok if I run in compatible mode. All my users are running IE10 in compatible mode, so this is a problem for me.

It is a bit complicated. But I'll try to explain (all in IE10 compat mode)
If I set inlineadd=>true the page is not loading.
If I set inlineadd=>false the page is loading ok.
With inlineadd=>false after loading, the dropdown is cleared for old values when I edit a record. But only if the fields I want to display consist of two fields (concat).

Here is some of the code I use. As you know, I am using MS SQL server.
(I can post you the entire code if you like, it was too big for this forum).

Can you help me?

// —

$g->set_actions(array(
"add"=>true, // allow/disallow add
"inlineadd"=>false,
"clone"=>true, // allow/disallow clone
"edit"=>true, // allow/disallow edit
"delete"=>true, // allow/disallow delete
"view"=>true, // allow/disallow delete
"rowactions"=>true, // show/hide row wise edit/del/save option
"export_excel"=>true, // show/hide export to excel option – must set export xlsx params
"export_pdf"=>true, // show/hide export to pdf option – must set pdf params
"autofilter" => true, // show/hide autofilter for search
"search" => false // show single/multi field search condition (e.g. simple or advance)
)
);

// —

// select query with FK_data as FK_id, e.g. clients.name as client_id
$g->select_command = "SELECT K.[id]
,K.[katalogNavn]
,K.level1
,K.level2
,(F.struktur+F.forretningNavn) as forretningId
,K.beskrivelse
FROM [INDIT].[dbo].[katalog] K
left join indit.dbo.forretning F on F.id=K.forretningId
";
// —

$col = array();
$col["title"] = "Virksomhetsmodell"; // caption of column
$col["name"] = "forretningId"; // grid column name, same as db field or alias from sql
//$col["dbname"] = "F.struktur+F.forretningNavn"; // this is required as we need to search in name field, not id
$col["width"] = "10"; // width on grid
$col["editable"] = true;
$col["edittype"] = "select"; // render as select
# fetch data from database, with alias k for key, v for value
$str = $g->get_dropdown_values("select distinct id as k, (struktur+forretningNavn) as v from [INDIT].[dbo].[forretning] union select top 1 '','' from [INDIT].[dbo].[forretning] order by 2");
$col["isnull"] = true; // THIS DOES NOT WORK, SO I HAVE TO USE SELECT..UNION!
//$str = $g->get_dropdown_values("select distinct id as k, (struktur+forretningNavn) as v from [INDIT].[dbo].[forretning] order by 2");
$col["editoptions"] = array("value"=>$str);
//$col["formatter"] = "select";
$col["stype"] = "select"; // enable dropdown search
$col["searchoptions"] = array("value" => ":;".$str);
$cols[] = $col;

2 Answers
Abu Ghufran answered 11 years ago

Hello,

Logging the resolution for community, The issue was with the white spaces in database.

After applying LTRIM(RTRIM(..)) it got resolved. This is specific to SQL Server.

$str = $g->get_dropdown_values("select distinct id as k, (LTRIM(RTRIM(struktur))+forretningNavn) as v from ….")

Arne answered 11 years ago

Thank you for very good support!

Your Answer

16 + 2 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?