//Take the start and end dates and set them for the start and end X axis this.Chart1.ChartAreas[0].AxisX.Minimum = initialDate.ToOADate(); this.Chart1.ChartAreas[0].AxisX.Maximum = completeDate.ToOADate(); //Get the total hours between start and end double totalSeriesHours = completeDate.Subtract(initialDate).TotalHours; //We will be showing 8 grid lines on the X axis so keep adding an hour until we can divide evenly by 8 if (totalSeriesHours > 0) { // How many hours per label? while ((totalSeriesHours % 8.0) != 0) { totalSeriesHours++; } totalSeriesHours /= 8; } //Set the X axis lines, labels and tick marks. this.Chart1.ChartAreas[0].AxisX.MajorGrid.IntervalType = DateTimeIntervalType.Hours; this.Chart1.ChartAreas[0].AxisX.MajorGrid.Interval = totalSeriesHours; this.Chart1.ChartAreas[0].AxisX.LabelStyle.IntervalType = DateTimeIntervalType.Hours; this.Chart1.ChartAreas[0].AxisX.LabelStyle.Interval = totalSeriesHours; this.Chart1.ChartAreas[0].AxisX.MajorTickMark.Interval = totalSeriesHours; this.Chart1.ChartAreas[0].AxisX.MajorTickMark.IntervalType = DateTimeIntervalType.Hours;double minDateValue = initialDate.ToOADate(); double maxDateValue = completeDate.ToOADate(); double totalSeriesHours = maxDateValue - minDateValue; //We will be showing 8 grid lines on the X axis so keep adding an hour until we can divide evenly by 8 if (totalSeriesHours > 0) { // How many hours per label? while ((totalSeriesHours % 8.0) != 0) { totalSeriesHours++; } totalSeriesHours /= 8; } //Take the start and end dates and set them for the start and end X axis this.Chart1.PlotArea.XAxis.IsZeroBased = false; this.Chart1.PlotArea.XAxis.AutoScale = false; this.Chart1.PlotArea.XAxis.AddRange(minDateValue, maxDateValue, totalSeriesHours);I have a databound ComboBox that the application user needs to be able to 'check'. What need to do is to show the user which entries have already been 'checked', that is I need to be able to programmatically set the checked property of the items in the combobox. I can id the items to be checked, I just need the code to actually "check" the item.
Here is my code so far:
If item.IsInEditMode Then
Dim indx As Integer = ctlUserCombo.FindItemIndexByText("Test, Sabo")
Dim cmbo As RadComboBox = CType(item.FindControl("ctlUserCombo"), RadComboBox)
Dim cbox As RadComboBoxItem = CType(cmbo.Items(indx), RadComboBoxItem)
cmbo.Items(indx).Enabled = False
So I am able to change the Enabled property to False...what I need to be able to do is set the combobox to "Checked". However the RadComboBoxItem does not have a 'checked' property. Anyone know how to get the combo box to show checked = true for individual items in the combobox?
Thanks.
var logid = dataBoundItem["LogId"].Text;
var deleted = dataBoundItem["Deleted"].Text; // this is a boolean
var Ownerid = dataBoundItem["OwnerId"].Text;
var locked = Convert.ToBoolean(dataBoundItem["Locked"].Text); // this is a boolean
}
}