
| Dim cs_hours As New ChartSeries |
| cs_hours.Name = "Hours Recorded" |
| Dim cs_under As New ChartSeries |
| cs_under.Name = "Hours Deficit" |
| Dim cs_over As New ChartSeries |
| cs_over.Name = "Hours Over" |
| cs_hours.Type = ChartSeriesType.StackedBar |
| cs_under.Type = ChartSeriesType.StackedBar |
| cs_over.Type = ChartSeriesType.StackedBar |
| cs_hours.Appearance.FillStyle.FillType = Styles.FillType.Solid |
| cs_hours.Appearance.FillStyle.MainColor = Drawing.Color.Green |
| cs_under.Appearance.FillStyle.FillType = Styles.FillType.Solid |
| cs_under.Appearance.FillStyle.MainColor = Drawing.Color.Blue |
| cs_over.Appearance.FillStyle.FillType = Styles.FillType.Solid |
| cs_over.Appearance.FillStyle.MainColor = Drawing.Color.Red |
| cs_hours.Appearance.LabelAppearance.Visible = False |
| cs_under.Appearance.LabelAppearance.Visible = False |
| cs_over.Appearance.LabelAppearance.Visible = False |
| Chart.Series.Add(cs_hours) |
| Chart.Series.Add(cs_under) |
| Chart.Series.Add(cs_over) |
| While dr.Read |
| Dim tm As String = dr.Item(0) |
| Dim hrs As Decimal = dr.Item(1) |
| Dim ehrs As Decimal = dr.Item(2) |
| Dim ah, vh, rh As Decimal |
| ... |
| cs_hours.AddItem(ah, tm, Drawing.Color.Green) |
| cs_under.AddItem(vh, "", Drawing.Color.Blue) |
| cs_over.AddItem(rh, "", Drawing.Color.Red) |
| End While |
| Month Amount Product |
| Jan 12 A |
| Jan 13 B |
| Feb 10 A |
| Mar 11 C |
| Mar 10 B |
I have following Rad controls on a user control. I load this user control dynamically. I am doing everything mentioned in general to maintain viewsatate.
Following RadText box is not maintaining a viewstate in between postbacks. Next to Rad I have put regular aspText box and it works fine with viewstate.
<telerik:RadTextBox ID="txtName" runat="server" MaxLength="50"
meta:resourcekey="txtName" Width="300px" EnableViewState="true">
</telerik:RadTextBox>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> --- This one works fine
Following Rad combobox is behaving like locked I can not select values from a dropdown. But next to this one is regular aspdropdown on the same page which works fine with view state as well as with dropdown list selection. Exactly same code I use to load both boxes. Which is also given
<telerik:RadComboBox ID="cboAccount" runat="server" Skin="Vista"
meta:resourcekey="cboAccount" Sort="Ascending" Width="300px" AppendDataBoundItems="True">
</telerik:RadComboBox>
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
With cboAccount
.DataSource = _piggyBankEligibleAccounts
.DataTextField = "Text"
.DataValueField = "id"
.DataBind()
End With
With DropDownList1
.DataSource = _piggyBankEligibleAccounts
.DataTextField = "Text"
.DataValueField = "id"
.DataBind()
End With
| function RowCreated(sender, eventArgs) { |
| var dataItem = eventArgs.get_gridDataItem(); |
| for (var i = 0; i < dataItem.get_element().cells.length; i++) { |
| //if (elementName == 'CompName') { |
| if (i == 1) { |
| dataItem.get_element().cells[i].onclick = function() { |
| this.selected = this.selected == true ? false : true; |
| //some function |
| }; |
| } |
| else if (i == 2) { |
| dataItem.get_element().cells[i].onclick = function() { |
| this.selected = this.selected == true ? false : true; |
| //some function |
| }; |
| } |
| else if (i == 3) { |
| dataItem.get_element().cells[i].onclick = function() { |
| this.selected = this.selected == true ? false : true; |
| //some function |
| }; |
| } |
| } |
| } |