Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
182 views
I have a grid with grouping enabled and also integrates a context menu to access editing and deleting of items.  However, when the records are grouped, the index being returned is incorrect as it takes into account the grouping header rows.  After a lot of research, I notice that all the examples in the forums use a different javascript method for the context menu than what is given in the Q1 2009 ASP.NET AJAX examples.  The biggest difference is that the row index is retrieved using eventargs.get_itemIndexHierarchial();  So, I tried to implement this method to no avail.  When implemented, that line of code actually errors and kicks the user out of the method.

Function RowContextMenu(sender, e)    
{ 
      var index = e.get_itemIndexHierarchical(); 
      document.getElementById("hdnGridClickedRowIndex").value = index; 
                                 
      var menu = <%= rmuContextMenu.ClientID %>;                   
                 
      menu.Show(e);    
                    
      e.cancelBubble = true;    
      e.returnValue = false;    
   
      if (e.stopPropagation)    
      {    
            e.stopPropagation();    
            e.preventDefault();    
      }    
      this.SelectRow(this.Rows[index].Control, true);    
} 

I'm getting a bit frustrated by this and would love anyone's help.

Thanks
Sebastian
Telerik team
 answered on 22 Jul 2009
1 answer
217 views
Hey all,

I am trying to make a single pie chart, my SQL table with the values for the chart will be only one row, with many columns that hold the data.  However, when i add all the columns, it makes a whole bunch of pie charts with the value being 100%.  How do i make this all one pie? 
Vladimir Milev
Telerik team
 answered on 22 Jul 2009
1 answer
79 views
I'm trieng to get diffrent colors on diffrent groups.

.rsHorizontalHeaderTable th   
    {   
        color: Pink !important       
    }  
Set's the color for all.. :-(

<div class="rsInnerFix" style="overflow:hidden;">  
                            <table class="rsHorizontalHeaderTable" cellpadding="0" cellspacing="0" border="0" style="height:25px;width:100%;">  
                                <tr>  
                                    <th>G 1</th><th>G 2</th><th>G 3</th>  
                                </tr>  
                            </table>  
                        </div>  
Is it possible to get "G 1" Red, "G 2" Blue and "G 3" Green.

I tried to change in the "OnResourceHeaderCreated" but without any luck.

The only way (not jet tested) that I have is to use jQuery to itterate over th in the table with class rsHorizontalHeaderTable...

Benny
Top achievements
Rank 1
 answered on 22 Jul 2009
7 answers
222 views
Hi,

I am building my treeview in codebehind, with serverside callback. Some nodes contains ButtonLink with CommandName and CommandArgument filled (to allow richer node interaction).

Is there a way to create a "ItemCommand" event to handle the click on those ButtonLink ?

Thanks.
Dédé
Top achievements
Rank 1
 answered on 22 Jul 2009
1 answer
181 views
Hi, Telerik. I have a little problem. I'm trying to create a radgrid at runtime take definition of grid from a DB.
I haven't problem to show data, I'm able to create pop edit form but I'm not able to retrive modified data.
These is my code:

- this is ASCX code that define grid control

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="anagrafiche.ascx.vb" Inherits="GestioneAnagrafiche_anagrafiche" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<link href="../CSS/RadAnagrafiche.css" rel="stylesheet" type="text/css" /> 
 
<script type="text/javascript" src="../Griglie/Script/TelerikTools.js"></script> 
 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
<script type="text/javascript">  
    function RowDblClick(sender, eventArgs) {  
        sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());  
    }  
</script> 
</telerik:RadCodeBlock> 
 
 
<telerik:RadAjaxLoadingPanel EnableEmbeddedSkins="False" Skin="3iSkin" ID="RadAjaxLoadingPanel1" runat="server" /> 
 
<telerik:RadGrid ID="RadGridAnagrafiche" EnableEmbeddedSkins="False" Skin="3iSkin" runat="server"   
    AllowAutomaticDeletes="False" AllowAutomaticUpdates="False" AllowAutomaticInserts="True"   
    AutoGenerateColumns="False" GridLines="None" EnableViewState="true">  
    <HeaderContextMenu EnableEmbeddedSkins="False" Skin="3iSkin" /> 
    <FilterMenu EnableEmbeddedSkins="False" Skin="3iSkin" /> 
    <PagerStyle Mode="NextPrevAndNumeric" /> 
 
    <MasterTableView Width="100%" HorizontalAlign="NotSet" AutoGenerateColumns="False" EditMode="PopUp" ShowFooter="true">  
        <Columns> 
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"   
                EditText="Modifica riga" EditImageUrl="../Griglie/Immagini/edit.gif"   
                UpdateText="Salva cambiamenti" UpdateImageUrl="../Griglie/Immagini/save.gif"   
                CancelText="Annulla Modifiche" CancelImageUrl="../Griglie/Immagini/cancel.gif" > 
                <ItemStyle CssClass="MyImageButton" Width="15px" /> 
            </telerik:GridEditCommandColumn> 
        </Columns> 
        <EditFormSettings ColumnNumber="1" CaptionFormatString="Modifica Record">  
            <FormTableItemStyle Wrap="False" /> 
            <FormCaptionStyle CssClass="EditFormHeader" /> 
            <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White" Width="100%" /> 
            <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" /> 
            <FormTableAlternatingItemStyle Wrap="False" /> 
            <EditColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1" 
                InsertText="Nuovo Record"  InsertImageUrl="../Griglie/Immagini/piu.gif"   
                UpdateText="Aggiorna Record" UpdateImageUrl="../Griglie/Immagini/save.gif"   
                CancelText="Annulla Modifiche" CancelImageUrl="../Griglie/Immagini/cancel.gif" /> 
            <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow" /> 
        </EditFormSettings> 
 
    </MasterTableView> 
    <ClientSettings> 
        <ClientEvents OnRowDblClick="RowDblClick" /> 
    </ClientSettings> 
</telerik:RadGrid> 
 

- This is the code behind that generate grid colums

Imports System  
Imports System.Collections  
Imports System.ComponentModel  
Imports System.Data  
Imports System.Data.OleDb  
Imports System.Web  
Imports System.Web.SessionState  
Imports System.Web.UI  
Imports System.Web.UI.WebControls  
Imports System.Web.UI.HtmlControls  
 
Imports Telerik.Web.UI  
Imports System.Drawing  
Imports CalcolaScontoRiga  
Imports ITemplateEditColumn  
 
Partial Class GestioneAnagrafiche_anagrafiche  
    Inherits System.Web.UI.UserControl  
 
    Public Event AggiornataGriglia()  
 
    Private taAnaAcl As New dsRestrizioniTableAdapters.taTabGriglieAnaACL  
    Private taAnaGri As New GriglieTableAdapters.taTabGriglieAna  
    Private taAnaCol As New GriglieTableAdapters.taTabGriglieAnaColonne  
 
    Private GridSettings As New ParamGriglie.ParamGriglie  
    Private MyUtil As New General.General  
    Private Utility As New genericFunction  
 
    Private colTemplate As GridTemplateColumn  
    Private colBound As GridBoundColumn  
    Private colButton As GridButtonColumn  
    Private colDateTime As GridDateTimeColumn  
    Private colEdit As GridEditCommandColumn  
 
    Private DefaultColumnWidth As Integer = 50  
 
    Private NomeTabella As String 
    Private SqlRecuperoDati As String 
    Private SqlUpdateDati As String 
    Private ChiaveGriglia As String = "" 
 
    Dim dtAnaACL As dsRestrizioni.TabGriglieAnaACLDataTable  
    Dim dtAnaGri As Griglie.TabGriglieAnaDataTable  
    Dim dtAnaCol As Griglie.TabGriglieAnaColonneDataTable  
 
    Public Sub ReloadCarrello()  
        RaiseEvent AggiornataGriglia()  
    End Sub 
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
 
 
        Dim idACL, grInsert, grEdit, grDelete, grEsporta As Integer 
        Dim CampoDb, TestoHeader As String 
        Dim Visibile, Editabile, Larghezza, Filtro, TipoDato, Ordine, IsKey As Integer 
 
        Dim ds As New Data.DataSet  
 
        If Not Utility.CheckSession(HttpContext.Current) Then Me.Response.Redirect("~/default.aspx")  
 
        Me.MyUtil.ConnectionString = GridSettings.DataConn  
        Me.MyUtil.DataBase = GridSettings.dbTypeData  
 
        dtAnaACL = New dsRestrizioni.TabGriglieAnaACLDataTable  
        dtAnaGri = New Griglie.TabGriglieAnaDataTable  
        dtAnaCol = New Griglie.TabGriglieAnaColonneDataTable  
 
        'In base al parametro TAB capisco quale tabella modificare  
        NomeTabella = Request.QueryString("TAB")  
 
        RadGridAnagrafiche.Columns.Clear()  
 
        colEdit = New GridEditCommandColumn  
        colEdit.ButtonType = GridButtonColumnType.ImageButton  
        colEdit.UniqueName = "EditCommandColumn" 
        colEdit.EditText = "Modifica riga" 
        colEdit.EditImageUrl = "../Griglie/Immagini/edit.gif" 
        colEdit.UpdateText = "Salva cambiamenti" 
        colEdit.UpdateImageUrl = "../Griglie/Immagini/save.gif" 
        colEdit.CancelText = "Annulla Modifiche" 
        colEdit.CancelImageUrl = "../Griglie/Immagini/cancel.gif" 
        colEdit.ItemStyle.CssClass = "MyImageButton" 
        colEdit.ItemStyle.Width = Unit.Pixel(15)  
 
        RadGridAnagrafiche.MasterTableView.Columns.Add(colEdit)  
 
        If (Not String.IsNullOrEmpty(NomeTabella)) Then 
 
            'Controllo se l'utente ha i permessi per Visualizzare/Inserire/Modificare i record  
            'Recupero i parametri della griglia  
            dtAnaACL = taAnaAcl.Get_GriglieAnaACL(NomeTabella, Me.Session("CodDip"))  
 
            If (dtAnaACL.Rows.Count = 1) Then 
 
                'Recupero i permessi associati a questa tabella  
                idACL = dtAnaACL.Rows(0).Item("id")  
                grInsert = dtAnaACL.Rows(0).Item("grInsert")  
                grEdit = dtAnaACL.Rows(0).Item("grEdit")  
                grDelete = dtAnaACL.Rows(0).Item("grDelete")  
                grEsporta = dtAnaACL.Rows(0).Item("grEsporta")  
 
                'Recupero i dati della griglia  
                dtAnaGri = taAnaGri.Get_TabGriglieAna(NomeTabella)  
                SqlRecuperoDati = dtAnaGri.Rows(0).Item("SQL")  
 
                'Recupero le colonne da visualizzare nella griglia  
                dtAnaCol = taAnaCol.Get_TabColGriglieAna(idACL)  
                If (dtAnaCol.Rows.Count > 0) Then 
 
                    For i = 0 To dtAnaCol.Rows.Count - 1  
 
                        CampoDb = dtAnaCol.Rows(i).Item("Campodb")  
                        TestoHeader = dtAnaCol.Rows(i).Item("Testoheader")  
                        IsKey = dtAnaCol.Rows(i).Item("isKey")  
                        Visibile = dtAnaCol.Rows(i).Item("Visible")  
                        Editabile = dtAnaCol.Rows(i).Item("Editable")  
                        Larghezza = dtAnaCol.Rows(i).Item("Widthcol")  
                        Filtro = dtAnaCol.Rows(i).Item("Filtro")  
                        TipoDato = dtAnaCol.Rows(i).Item("TipoDato")  
                        Ordine = dtAnaCol.Rows(i).Item("Ordine")  
 
                        If (IsKey = 1) And (i = 0) Then 
                            ChiaveGriglia = CampoDb.ToString  
                        ElseIf (IsKey = 1) And (i > 0) Then 
                            ChiaveGriglia += "," + CampoDb.ToString  
                        End If 
 
                        'A questo punto, aggiungo le colonne alla griglia  
                        RadGridAnagrafiche.AllowSorting = True 
 
                        Select Case TipoDato  
                            Case 1 'campo data  
                                If Editabile = 0 Then 
                                    colDateTime = New GridDateTimeColumn  
                                    colDateTime.ReadOnly = True 
                                    colDateTime.MaxLength = 10  
                                    colDateTime.DataType = System.Type.GetType("System.DateTime")  
                                    colDateTime.DataFormatString = "{0:dd/MM/yyyy}" 
                                    colDateTime.HeaderStyle.HorizontalAlign = HorizontalAlign.Center  
                                    colDateTime.UniqueName = CampoDb  
                                    colDateTime.HeaderText = TestoHeader  
                                    'ordine  
                                    colDateTime.OrderIndex = Ordine + 1  
                                    'dati  
                                    colDateTime.DataField = CampoDb  
                                    'ordinamento  
                                    colDateTime.SortExpression = CampoDb  
                                    'raggruppamento  
                                    colDateTime.Groupable = False 
                                    'filtro  
                                    If Filtro = 1 Then 
                                        colDateTime.AllowFiltering = True 
                                    Else 
                                        colDateTime.AllowFiltering = False 
                                    End If 
 
                                    'larghezza colonna  
                                    If Larghezza > 0 Then 
                                        colDateTime.HeaderStyle.Width = Unit.Pixel(Larghezza)  
                                        colDateTime.ItemStyle.Width = Unit.Pixel(Larghezza)  
                                        colDateTime.FilterControlWidth = Unit.Pixel(Larghezza - 15)  
                                    Else 
                                        colDateTime.HeaderStyle.Width = Unit.Pixel(DefaultColumnWidth)  
                                        colDateTime.ItemStyle.Width = Unit.Pixel(DefaultColumnWidth)  
                                        colDateTime.FilterControlWidth = Unit.Pixel(DefaultColumnWidth - 15)  
                                    End If 
 
                                    If (Visibile = 0) Then colDateTime.Visible = False 
 
                                    RadGridAnagrafiche.MasterTableView.Columns.Add(colDateTime)  
 
                                Else 
                                    colTemplate = New Telerik.Web.UI.GridTemplateColumn  
                                    colTemplate.ReadOnly = False 
                                    colTemplate.UniqueName = CampoDb  
                                    colTemplate.HeaderText = TestoHeader  
                                    colTemplate.OrderIndex = Ordine + 1  
                                    colTemplate.SortExpression = CampoDb  
                                    colTemplate.DataType = System.Type.GetType("System.DateTime")  
                                    colTemplate.HeaderStyle.HorizontalAlign = HorizontalAlign.Center  
                                    colTemplate.ItemStyle.HorizontalAlign = HorizontalAlign.Center  
 
                                    colTemplate.ItemTemplate = New ITemplateEditColumn(CampoDb, IType._Label, "dd/MM/yyyy")  
                                    colTemplate.EditItemTemplate = New ITemplateEditColumn(CampoDb, IType._RadDatePicker, "dd/MM/yyyy")  
 
                                    RadGridAnagrafiche.MasterTableView.Columns.Add(colTemplate)  
 
                                End If 
 
                            Case Else 'campo stringa  
                                If Editabile = 0 Then 
 
                                    colBound = New GridBoundColumn  
                                    colBound.UniqueName = CampoDb  
                                    colBound.HeaderText = TestoHeader  
                                    colBound.ReadOnly = True 
                                    colBound.OrderIndex = Ordine + 1  
                                    colBound.DataField = CampoDb  
                                    colBound.SortExpression = CampoDb  
                                    If Larghezza > 0 Then 
                                        colBound.HeaderStyle.Width = Unit.Pixel(Larghezza)  
                                        colBound.ItemStyle.Width = Unit.Pixel(Larghezza)  
                                    Else 
                                        colBound.HeaderStyle.Width = Unit.Pixel(DefaultColumnWidth)  
                                        colBound.ItemStyle.Width = Unit.Pixel(DefaultColumnWidth)  
                                    End If 
 
                                    If (Visibile = 0) Then colBound.Visible = False 
                                    RadGridAnagrafiche.MasterTableView.Columns.Add(colBound)  
 
                                Else 
                                    colTemplate = New Telerik.Web.UI.GridTemplateColumn  
                                    colTemplate.UniqueName = CampoDb  
                                    colTemplate.HeaderText = TestoHeader  
                                    colTemplate.ReadOnly = False 
                                    colTemplate.OrderIndex = Ordine + 1  
                                    colTemplate.DataField = CampoDb  
                                    colTemplate.SortExpression = CampoDb  
                                    colTemplate.HeaderStyle.HorizontalAlign = HorizontalAlign.Center  
                                    colTemplate.ItemStyle.HorizontalAlign = HorizontalAlign.Center  
 
                                    colTemplate.ItemTemplate = New ITemplateEditColumn(CampoDb, IType._Label)  
                                    colTemplate.EditItemTemplate = New ITemplateEditColumn(CampoDb, IType._TextBox)  
 
                                    RadGridAnagrafiche.MasterTableView.Columns.Add(colTemplate)  
                                End If 
 
                        End Select 
                    Next 
                End If 
 
 
 
            End If 
        End If 
 
        Try 
            RadGridAnagrafiche.MasterTableView.DataKeyNames = New String() {ChiaveGriglia}  
 
            ds.Tables.Add(MyUtil.getDataTable(CommandType.Text, SqlRecuperoDati, "Contenuto"))  
            RadGridAnagrafiche.DataSource = ds.Tables("Contenuto")  
        Catch ex As Exception  
 
        End Try 
 
    End Sub 
 
    Protected Sub RadGridAnagrafiche_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGridAnagrafiche.UpdateCommand  
 
        Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)  
        Dim id As String = editedItem.GetDataKeyValue(ChiaveGriglia).ToString()  
 
        Dim returnValue As Hashtable = New Hashtable  
        e.Item.OwnerTableView.ExtractValuesFromItem(returnValue, editedItem)  
 
        Dim RigaOrdine As New Data.DataTable  
        Dim myRow As Integer = CType(e.Item.DataSetIndex, Double)  
 
        Dim CampoDb As String 
        Dim IsKey As Integer 
        Dim Editabile As Integer 
        Dim TipoDato As Integer 
 
        Dim EditControllo As String 
        Dim StrWhere As String 
 
        SqlUpdateDati = "UPDATE " + NomeTabella.ToString + " SET DATAMODIFICA=Getdate(), UTENTEMODIFICA=" 
 
        For i = 0 To dtAnaCol.Rows.Count - 1  
 
            CampoDb = dtAnaCol.Rows(i).Item("Campodb")  
            IsKey = dtAnaCol.Rows(i).Item("isKey")  
            Editabile = dtAnaCol.Rows(i).Item("Editable")  
            TipoDato = dtAnaCol.Rows(i).Item("TipoDato")  
 
            If IsKey = 1 Then 
                StrWhere = " WHERE " + CampoDb.ToString + "='" + id.ToString + "'" 
            Else 
 
                Select Case TipoDato  
 
                    Case 0 'campo string  
                        EditControllo = "MyTxt" + CampoDb.ToString  
                       
                        SqlUpdateDati += ", " + CampoDb.ToString + "='" + returnvalue + "' " 
 
                    Case 1 'campo data  
                        EditControllo = "MyRTP" + CampoDb.ToString  
 
 
                        SqlUpdateDati += ", " + CampoDb.ToString + "='" + returnvalue + "' " 
 
                End Select 
            End If 
        Next 
 
    End Sub 
 
End Class 
 in particular in this part of code we obtain the folowing error when evaluate this instruction:

e.Item.OwnerTableView.ExtractValuesFromItem(returnValue, editedItem)  

Editor cannot be initialized for column: {our_field_name}

- In the end this is class for definition of template fields:
Imports Microsoft.VisualBasic  
Imports Telerik.Web.UI  
Imports System.Data  
Imports System.Web.UI  
 
Public Class ITemplateEditColumn  
    Implements IBindableTemplate  
 
    Private colName As String 
    Private colFormat As String 
    Private colTipo As Integer 
 
    Protected rtp As RadDatePicker  
    Protected txt As TextBox  
    Protected lbl As Label  
 
 
    Public Enum IType As Integer 
        _TextBox = 0  
        _RadDatePicker = 1  
        _Label = 99  
    End Enum 
 
 
    Public Sub New(ByVal cName As String, ByVal cTipo As IType, Optional ByVal cFormato As String = "")  
        colName = cName  
        colTipo = cTipo  
        colFormat = cFormato  
    End Sub 
 
    Public Function ExtractValues(ByVal container As Control) As System.Collections.Specialized.IOrderedDictionary Implements IBindableTemplate.ExtractValues  
        Dim od As OrderedDictionary = New OrderedDictionary  
        Select Case colTipo  
 
            Case 0 '_Txtbox  
                od.Add(colName, CType(container.FindControl("MyTxt" + colName), TextBox).Text)  
 
            Case 1 '_RadDatePicker  
                od.Add(colName, CType(container.FindControl("MyRTP" + colName), RadDatePicker).SelectedDate)  
 
        End Select 
        Return od  
    End Function 
 
    Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn  
        Select Case colTipo  
            Case 0 '_Txtbox  
                txt = New TextBox  
 
                txt.ID = "MyTxt" + colName.ToString  
 
                AddHandler txt.DataBinding, AddressOf TextBoxBinding  
                container.Controls.Add(txt)  
 
            Case 1 '_RadDatePicker  
                rtp = New RadDatePicker  
 
                rtp.ID = "MyRTP" + colName.ToString  
                rtp.EnableEmbeddedSkins = False 
                rtp.Skin = "3iSkin" 
                rtp.Width = Unit.Pixel(100)  
                rtp.DateInput.ID = "txtData" 
                rtp.DateInput.DateFormat = colFormat  
                rtp.DateInput.EnableEmbeddedSkins = False 
                rtp.DateInput.Skin = "3iSkin" 
 
                AddHandler rtp.DataBinding, AddressOf RadDatePickerBinding  
                container.Controls.Add(rtp)  
 
            Case 99 '_Label  
                Dim lbl As New Label  
 
                lbl.ID = "MyLbl" + colName.ToString  
 
                AddHandler lbl.DataBinding, AddressOf LabelBinding  
                container.Controls.Add(lbl)  
 
        End Select 
 
    End Sub 
 
    Private Sub LabelBinding(ByVal sender As Object, ByVal e As EventArgs)  
        Dim lbl As Label  
        lbl = CType(sender, Label)  
        Dim iContainer As Object 
        Dim drv As DataRowView  
 
        iContainer = lbl.NamingContainer  
        drv = iContainer.DataItem  
 
        If Not (IsDBNull(drv.Item(colName))) Then 
            If (colFormat.Length > 0) Then 
                lbl.Text = Format(drv.Item(colName), colFormat)  
            Else 
                lbl.Text = drv.Item(colName).ToString  
            End If 
        End If 
 
    End Sub 
 
    Private Sub TextBoxBinding(ByVal sender As Object, ByVal e As EventArgs)  
        Dim txt As TextBox  
        txt = CType(sender, TextBox)  
        Dim iContainer As Object 
        Dim drv As DataRowView  
 
        iContainer = txt.NamingContainer  
        drv = iContainer.DataItem  
 
        If Not (IsDBNull(drv.Item(colName))) Then 
            If (colFormat.Length > 0) Then 
                txt.Text = Format(drv.Item(colName), colFormat)  
            Else 
                txt.Text = drv.Item(colName).ToString  
            End If 
        End If 
 
    End Sub 
 
    Private Sub RadDatePickerBinding(ByVal sender As Object, ByVal e As EventArgs)  
        Dim rtp As RadDatePicker  
        rtp = CType(sender, RadDatePicker)  
        Dim iContainer As Object 
        Dim drv As DataRowView  
 
        iContainer = rtp.NamingContainer  
        drv = iContainer.DataItem  
 
        If Not (IsDBNull(drv.Item(colName))) Then 
            If (colFormat.Length > 0) Then 
                rtp.SelectedDate = Format(DateTime.Parse(drv.Item(colName)), colFormat)  
            Else 
                rtp.SelectedDate = drv.Item(colName).ToString  
            End If 
        End If 
 
    End Sub 
 
End Class 

I wait for a response.

Thank you

Gianluigi
Sebastian
Telerik team
 answered on 22 Jul 2009
5 answers
235 views
I have 3 combo boxes on a page, combo1, combo2 & combo3

the contents of combo2 are filtered by the selected value in combo1
the contents of combo3 are filtered by the selected value in combo2

I need to obtain the currently selected value in combo1 as an additional filter value for combo box 3 and was given an example involving a context filter.  This example is stuck in an endless loop.  heres the code for the combo

<telerik:RadComboBox ID="RadComboBoxCategories" Runat="server" Width="100%" OnClientItemsRequested="ItemsLoaded" OnClientItemsRequesting="ClientItemsRequesting" 
                        onitemsrequested="RadComboBoxCategories_ItemsRequested" Skin="Default" EnableLoadOnDemand="true">  
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
            </telerik:RadComboBox> 





<

 

telerik:RadComboBox ID="RadComboBoxType" Runat="server" OnClientSelectedIndexChanging="LoadGenres"

 

 

onitemsrequested="RadComboBoxType_ItemsRequested" Skin="Default"

 

 

Width="100%" EnableLoadOnDemand="true" AutoPostBack="False"

 

 

onselectedindexchanged="RadComboBoxType_SelectedIndexChanged">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</telerik:RadComboBox>

 



heres the javascript function


function ClientItemsRequesting(sender, eventArgs) {  
                var context = eventArgs.get_context();  
                var typeCombo = $find("<%= RadComboBoxType.ClientID %>");  
                context["FilterString"] = typeCombo.get_text();  
            } 
  and the c#


protected void RadComboBoxCategories_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)  
        {  
            string temp = e.Context["FilterString"].ToString();  
            LoadCategories(e.Text, temp);  
        } 
  the Itemsrequested event is being fired in an endless loop !

can you help ?  The LoadCategories method needs the value currently selected in the RadComboBoxType as part of the filter
Simon
Telerik team
 answered on 22 Jul 2009
1 answer
78 views
If I have project which is using RadControls for .Net 2.0 before, what is the migration steps to use the controls for .Net 3.5?
- are all API functions identical between those two sets of controls?

Another question is what are the features differences between those two set of controls besides my list below?

- Net 3.5 Client-side Data Binding

- Entity Framework CRUD Operations

- LinqToSql CRUD Operations

- LinqToSql Manual CRUD Operations



Sebastian
Telerik team
 answered on 22 Jul 2009
1 answer
110 views
Hello,

I would like to control with a slider a kind of chain. I would like to place a number of div-elements from left to right. Each div contain a picuture and a link and text. With the slider I want to be able to slide the different divs along the chain. Lets assumme the chain will contain 6 divs then i want to be able to see 3 of them on one time. I want to see div1, div2, div3. If i slide to the right i would like to see div2, div3, div4 and so one. Deepending on the zoom level I also want to be able to see more or less then 3 div-elements. 
I need a div-element because i want to change the background color of the different div-element according to events.

Does anyone have an idea how I can develop such a control?

I appreciate every help.

Cheers

Chris
Tsvetie
Telerik team
 answered on 22 Jul 2009
1 answer
456 views
Specified argument was out of the range of valid values. Parameter name: index


 Dim myCheckbox As CheckBox = CType(dgi.Cells(0).Controls(1), CheckBox)


How to find any controls value in Radgrid ?
How to ?






Shinu
Top achievements
Rank 2
 answered on 22 Jul 2009
1 answer
111 views
Hi,

My upload control is located inside of an AjaxPanel, so I use the ConditionalPostback method.

When the user selects a file, I want it to immediately upload - how do I do this?

I presume I must use the OnClientFileSelected call, but I dunno where to go from here.

Thanks!
Morten
Atanas Korchev
Telerik team
 answered on 22 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?