internal void GridRecordEnter(Entity record)
 {
     buttonOpenLogRecord.Enabled    = record != null;
     buttonOpenLogTrace.Enabled     = record != null && !string.IsNullOrWhiteSpace(record.GetAttributeValue <string>(PluginTraceLog.MessageBlock));
     buttonOpenLogException.Enabled = record != null && !string.IsNullOrWhiteSpace(record.GetAttributeValue <string>(PluginTraceLog.ExceptionDetails));
     traceControl.SetLogText(FixLineBreaks(record != null && record.Contains(PluginTraceLog.MessageBlock) ? record[PluginTraceLog.MessageBlock].ToString() : ""));
     exceptionControl.SetException(FixLineBreaks(record != null && record.Contains(PluginTraceLog.ExceptionDetails) ? record[PluginTraceLog.ExceptionDetails].ToString() : ""),
                                   "Exception" + (record.Contains("exceptionsummary") ? ": " + record["exceptionsummary"].ToString().Replace("\r\n", " ") : ""));
     statsControl.ShowStatistics(record);
 }