{
e.Layout.LoadOnDemand = LoadOnDemand.Xml;
UltraWebGrid1.Browser = BrowserLevel.Auto;
...
If I comment out the Browser line the code works in IE and FireFox but not Safari.
If I leave the Browser line in the code works in Safari but maxes out the w3wp.exe process in IE.
Safari will work if I use:
Is there a option were I can use these settings at runtime if the brower is Safari. For example, In psuedo-code:
If browsertype = safari then
else
UltraWebGrid1.Browser = BrowserLevel.Xml;
end if
Safari currently isn't a supported browser for use with WebGrid. Being unable to see the contents of the grid when its Browser property is set to Xml is likely a symptom of this.
I see two options available to you, and there may be others that I haven't yet considered.
The first option is to use the new WebDataGrid control. This grid control is built off our Aikido framework, and all of our Aikido controls are supported for use with Safari. WebDataGrid also has AJAX capabilities built in. If having AJAX functionality is more important, this is likely the best option.
The second option is to not use the AJAX capabilities of WebGrid. If having the other functionality of WebGrid is the most important, and if the grid functions for you when its Browser property is set to Auto, this is likely the best solution. You might be able to reclaim some AJAX functionality by wrapping WebGrid inside either a WebAsyncRefreshPanel or an UpdatePanel.
"If you want the grid to use AJAX, you must have the Browser property set to Xml, in addition to setting LoadOnDemand to Xml."
If I do that I don't see the contents of the grid in Safari.
If you want the grid to use AJAX, you must have the Browser property set to Xml, in addition to setting LoadOnDemand to Xml.
"What happens if you set e.Layout.LoadOnDemand to LoadOnDemand.None instead?"
It will work but the grid will not be using AJAX.
I found the unless I set the BrowserLevel to Auto the grid will not work in Safari.Unfortunently when I do this the Server CPU maxes out when i view the grid in IE.