Hi
I have a simple grid with no edit mode. See Pic at this URL
http://screencast.com/t/X1XtwRegixy
I want the user to be able to switch "Chart" without going into an edit mode.
I therefore created a user control made from a a radcombo which populates the combo and has an event attached to it which calls a method that updates the charttype in the database.
I have an additional property in my usercontrol which is the Primarykey (seriesID) required create the obj and run the update.
The control populates correctly (I even added the primarykey into the item.text to show it is there - see pic above)
When The selected index is changed the event fires (pasisng all of the argument including old and new values) inside the user control, but all of the properties in the usercontrol now are empty ie the primaryKey (seriesID) required to run call my update method.
Any idea what I am doing wrong?
Thanks
johnathan
I have a simple grid with no edit mode. See Pic at this URL
http://screencast.com/t/X1XtwRegixy
I want the user to be able to switch "Chart" without going into an edit mode.
I therefore created a user control made from a a radcombo which populates the combo and has an event attached to it which calls a method that updates the charttype in the database.
I have an additional property in my usercontrol which is the Primarykey (seriesID) required create the obj and run the update.
<telerik:GridTemplateColumn HeaderText="Chart" UniqueName="ColChart"> <ItemTemplate> <uc3:kpidropdownchart ID="kpiDropDownChart1" runat="server" seriesid='<%#Bind("SeriesID") %>' selectedChart='<%#Bind("ChartType") %>'/> </ItemTemplate> </telerik:GridTemplateColumn>The control populates correctly (I even added the primarykey into the item.text to show it is there - see pic above)
When The selected index is changed the event fires (pasisng all of the argument including old and new values) inside the user control, but all of the properties in the usercontrol now are empty ie the primaryKey (seriesID) required to run call my update method.
Any idea what I am doing wrong?
Imports Telerik.Web.UI Public Class kpiDropDownChart Inherits System.Web.UI.UserControl Private _seriesid As Integer Private _selectedChart As String Private _chartid As Integer Public Property SeriesID() As Integer Get Return (_seriesid) End Get Set(ByVal value As Integer) _seriesid = value End Set End Property Public Property selectedChart() As String Get Return (_selectedChart) End Get Set(ByVal value As String) _selectedChart = value End Set End Property Protected Sub ddAddFieldChart_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles ddAddFieldChart.PreRender Dim chartTypeTable As DataTable = kpicommonListFns.GetTimeChartList Dim row As DataRow For Each row In chartTypeTable.Rows Dim CItem As RadComboBoxItem = New RadComboBoxItem CItem.Text = row("Description") & _seriesid CItem.Value = row("chartRef") CItem.ImageUrl = "~/images/chartImages/" & row("IconName") ddAddFieldChart.Items.Add(CItem) Next ddAddFieldChart.SelectedValue = _selectedChart End Sub Private Sub ddAddFieldChart_SelectedIndexChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles ddAddFieldChart.SelectedIndexChanged '###### when this even fires _seriesid = nothing #################### Dim thisSeries As kpiChartSeries = New kpiChartSeries(_seriesid) thisSeries.SetChartType(ddAddFieldChart.SelectedValue) End SubEnd ClassThanks
johnathan