private void grdLogs_RowEnter(object sender, DataGridViewCellEventArgs e) { if (grdLogs.CurrentRow == null) { return; } //label1.Text =string.Concat( "CurrentRow = ",grdLogs.CurrentRow.Index ,"e.RowIndex", e.RowIndex); EventGrid x = (EventGrid)grdLogs.Rows[e.RowIndex].DataBoundItem as EventGrid; Message wMessage = LoadMessage(x.Message.Text); x.FormatedMessage = wMessage; if (wMessage.MessageContenType == MessageContenType.ServiceError) { if (_ServiceErrorView == null) { _ServiceErrorView = new ServiceErrorView(); } _ServiceErrorView.Populate(x); AddtoPanel(_ServiceErrorView); } if (wMessage.MessageContenType == MessageContenType.Service) { if (_ServicesView == null) { _ServicesView = new ServicesView(); } _ServicesView.Populate(x); AddtoPanel(_ServicesView); } if (wMessage.MessageContenType == MessageContenType.Other) { if (_OtherView == null) { _OtherView = new OtherView(); } _OtherView.Populate(x); AddtoPanel(_OtherView); } }
private void grdLogs_RowEnter(object sender, DataGridViewCellEventArgs e) { if (grdLogs.CurrentRow == null) return; //label1.Text =string.Concat( "CurrentRow = ",grdLogs.CurrentRow.Index ,"e.RowIndex", e.RowIndex); EventGrid x = (EventGrid)grdLogs.Rows[e.RowIndex].DataBoundItem as EventGrid; Message wMessage = LoadMessage(x.Message.Text); x.FormatedMessage = wMessage; if (wMessage.MessageContenType == MessageContenType.ServiceError) { if (_ServiceErrorView == null) _ServiceErrorView = new ServiceErrorView(); _ServiceErrorView.Populate(x); AddtoPanel(_ServiceErrorView); } if (wMessage.MessageContenType == MessageContenType.Service) { if (_ServicesView == null) _ServicesView = new ServicesView(); _ServicesView.Populate(x); AddtoPanel(_ServicesView); } if (wMessage.MessageContenType == MessageContenType.Other) { if (_OtherView == null) _OtherView = new OtherView(); _OtherView.Populate(x); AddtoPanel(_OtherView); } }