| <telerik:RadChart ID="chartTurnAround" runat="server" Skin="BlueStripes" Width="700px" |
| SkinsOverrideStyles="true"> |
| </telerik:RadChart> |
| chartTurnAround.DataSource = var |
| Dim ser As New Telerik.Charting.ChartSeries("Turn Around", Telerik.Charting.ChartSeriesType.Bar) |
| ser.DataLabelsColumn = "TurnAround" |
| ser.DataYColumn = "TurnAround" |
| chartTurnAround.Series.Add(ser) |
| chartTurnAround.SeriesOrientation = Telerik.Charting.ChartSeriesOrientation.Horizontal |
| chartTurnAround.PlotArea.XAxis.DataLabelsColumn = "FullName" |
| Dim max As Decimal = (From v In var Select v.TurnAround).Max() |
| max = IIf(max = 0, 10, max) |
| chartTurnAround.PlotArea.YAxis.AutoScale = False |
| chartTurnAround.PlotArea.YAxis.MinValue = 0 |
| chartTurnAround.PlotArea.YAxis.MaxValue = max + (max Mod 10) |
| chartTurnAround.PlotArea.YAxis.Step = 10 |
| chartTurnAround.ChartTitle.TextBlock.Text = "Average TurnAround Time (days)" |
| chartTurnAround.Legend.Visible = False |
| chartTurnAround.AutoLayout = True |
| chartTurnAround.PlotArea.EmptySeriesMessage.TextBlock.Text = "No Tasks have been completed in the last 7 days." |
| chartTurnAround.DataBind() |
in a grid with multiselection turned on, I'd like to be able to examine the underlying data row when each row is being created so I can decide whether or not I want that row in the table to be selectable or not (i.e. whether to show the checkbox on the far left for selection).
With the normal datagrid I could use code such as the below to examine each row as it was being created. How do I do this with the radgrid?
Private
Sub MyOnItemCreated(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles dgmain.RowCreated
Dim status As String
Dim flockId As String
Dim requesterEmail As String
If (Not (e.Row.DataItem Is Nothing)) Then
flockId = DataBinder.Eval(e.Row.DataItem,
"flockid").ToString
status = DataBinder.Eval(e.Row.DataItem,
"status").ToString
requesterEmail = DataBinder.Eval(e.Row.DataItem,
"requesteremail").ToString
If (e.Row.RowType = DataControlRowType.DataRow) Then
If ((status = "P") AndAlso (requesterEmail = CustomPrincipal.UserEmail OrElse User.IsInRole("dms") OrElse User.IsInRole("tms"))) Then
sbAll +=
"document.aspnetForm.cxitem" + flockId + ".checked=true;" + Chr(10)
sbNone +=
"document.aspnetForm.cxitem" + flockId + ".checked=false;" + Chr(10)
End If
End If
End If
End Sub