Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
143 views
hi at  all

i have a problem with rad combobox events on radgrid .

i have two radcombobox in a column template on a  radgrid,
when a change the selected item in the firts radcombobox
the elements of the second radcombobox must be change.
I did it, but only works when the grid is in editmode,
but not when the grid created a new item , what can i do what's wrong in my code.
(i'am usig radcontrols 2008 q1,vs2005 and vb)

Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated 
    If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then 
        Dim list As RadComboBox = CType(CType(e.Item, GridEditableItem)("TemplateColumn").Controls(1), RadComboBox) 
        list.AutoPostBack = True 
        AddHandler list.SelectedIndexChanged, AddressOf Me.list_SelectedIndexChanged          
 
    End If 
End Sub 
Private Sub list_SelectedIndexChanged(ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs) 
    
    Dim editedItem As GridEditableItem = CType(CType(sender, RadComboBox).NamingContainer, GridEditableItem) 
  
    Dim ddList As RadComboBox = CType(editedItem("NroCelular").Controls(1), RadComboBox) 
    
    Dim sql As String = "SELECT [NroCelular] FROM [Celulares] WHERE idUsuario=@idUsuario ORDER BY [NroCelular] " 
    Dim parameters As New Collection 
    Dim parameter1 As New OleDbParameter 
    parameter1.ParameterName = "@idUsuario" 
    parameter1.OleDbType = OleDbType.Integer 
    parameter1.Value = CType(editedItem("TemplateColumn").Controls(1), RadComboBox).SelectedValue 
    parameters.Add(parameter1) 
    ddList.Items.Clear() 
    Dim table As DataTable = dbManager.getDataTable(sql, parameters) 
    Dim row As DataRow 
    For Each row In table.Rows 
        Dim item As New RadComboBoxItem(row(0), row(0)) 
        ddList.Items.Add(item) 
    Next 
End Sub 
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound 
    If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then 
        Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem) 
        Dim editMan As GridEditManager = editedItem.EditManager 
        Dim editor As GridTemplateColumnEditor = CType(editMan.GetColumnEditor("NroCelular"), GridTemplateColumnEditor) 
        Dim ddlOrderIDcombo As RadComboBox = CType(editedItem("TemplateColumn").Controls(1), RadComboBox) 
        Dim sql As String = "SELECT [NroCelular] FROM [Celulares] WHERE idUsuario=@idUsuario ORDER BY [NroCelular] " 
        Dim parameters As New Collection 
        Dim parameter1 As New OleDbParameter 
        parameter1.ParameterName = "@idUsuario" 
        parameter1.OleDbType = OleDbType.Integer 
        parameter1.Value = CType(editedItem("TemplateColumn").Controls(1), RadComboBox).SelectedValue 
        parameters.Add(parameter1) 
        Dim table As DataTable = dbManager.getDataTable(sql, parameters) 
        Dim ddList As RadComboBox = CType(editedItem("NroCelular").Controls(1), RadComboBox) 
        ddList.DataSource = table 
        ddList.Items.Clear() 
        Dim row As DataRow 
        For Each row In table.Rows 
            Dim item As New RadComboBoxItem(row(0), row(0)) 
            ddList.Items.Add(item) 
        Next 
    End If 
End Sub 
this is my code from server side

<telerik:GridTemplateColumn DataField="NombreCompleto" FilterImageToolTip="Filtrar" 
    HeaderText="Usuario" SortExpression="NombreCompleto" UniqueName="TemplateColumn"> 
    <ItemTemplate> 
        <asp:Label ID="Label3" runat="server" Text='<%# Eval("NombreCompleto") %>'></asp:Label> 
    </ItemTemplate> 
    <EditItemTemplate> 
        <telerik:RadComboBox ID="cmbUsuario" runat="server" DataSourceID="dsUsuarios" DataTextField="NombreCompleto" 
            DataValueField="idUsuario" 
            SelectedValue='<%# Bind("idUsuario") %>' Skin="WebBlue" Width="200px"   > 
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
        </telerik:RadComboBox> 
    </EditItemTemplate> 
</telerik:GridTemplateColumn> 
<telerik:GridTemplateColumn DataField="NroCelular" FilterImageToolTip="Filtrar" HeaderText="Nro Celular" 
    SortExpression="NroCelular" UniqueName="NroCelular"> 
    <ItemTemplate> 
        <asp:Label ID="Label2" runat="server" Text='<%# Eval("NroCelular") %>'></asp:Label> 
    </ItemTemplate> 
    <EditItemTemplate> 
        <telerik:RadComboBox ID="cmbNroCelular" runat="server" Skin="WebBlue" Width="200px"    > 
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
             
        </telerik:RadComboBox> 
    </EditItemTemplate> 
</telerik:GridTemplateColumn> 

this is my code from the client side




Juan
Top achievements
Rank 1
 answered on 07 Oct 2008
1 answer
115 views
First of all, I have a RadAjaxManager on my page for use with a RadAjaxPanel.  These are present so I can make changes to the page after a callback to the server without having to reload the whole page.

I recently added a RadWindowManager so I could make a custom confirmation popup window come up when a user clicks the submit button.  If the user clicks OK then I call __doPostBack('<%=this.btnSubmit.ClientID%>','');

In the post back I have the server load some new variables into the session...  This all works just fine.

However, after the request is complete, if the user comes back to submit another form the same data remains in the session from the previous visit to the page.

If I remove the popup window and the RadWindowManager all works just fine.

What is going on here?

Svetlina Anati
Telerik team
 answered on 07 Oct 2008
2 answers
107 views
I am looking for a Software Automation program that works well testing Telerik controls. Recently, I have tried many free programs and QTP, but no program seems to work consistently.

Any Suggestions?
Mike
Top achievements
Rank 1
 answered on 07 Oct 2008
2 answers
150 views
I am having a hard time finding a deeply nested control.

I have a RadPanelBar
Inside the RadPanelBar I have A RadGrid
The RadGrid is using a FormTemplate for Editing Purposes
Inside the FormTemplate I have a RadEditor and a TextBox.

Can anyone tell me how I can Find those two controls for my Update Command?

Thanks in advance
Chase
Chase Florell
Top achievements
Rank 1
 answered on 07 Oct 2008
1 answer
132 views
Hi,

I'd like to describe my problem below:

1. Use Firefox
2. Open modal window (RadWindow) using url of page containing RadEditor control.
3. Set scroll="no" to the page's body

Now, right-click on the editor - context menu should appear. The problem is because it should be displayed in front of radwindow (just like it is in IE). Instead it makes the inner page's scrollbars appear and is partially hidden under its parent window. I tried to set the highest z-index property and position to absolute with no avail

Regards,
Rycho
Rycho
Top achievements
Rank 1
 answered on 07 Oct 2008
1 answer
134 views
How would you remove the little tip? like it is when its "Center" but on bottom right...

thanks

Svetlina Anati
Telerik team
 answered on 07 Oct 2008
4 answers
150 views
Hi,

With RadEditor:
1) How to add custom buttons (with custom button images) using tools file xml?
2) Background color in design mode gets black
3) What should be the folder structure for applying custom skin?

Thanks,
Vaibhav

Todd Anglin
Top achievements
Rank 2
 answered on 07 Oct 2008
2 answers
153 views
how do i retrieve value from itemtemplate in the radpanelbar? could anyone tell me? do i still say  strname = me.textbox1.text  or something else like find control first??thanks.
appdev
Top achievements
Rank 1
 answered on 07 Oct 2008
3 answers
237 views
Hi.

I have a modal pupup. Inside that, i have another button, that opens up a new modal poup window with a RadEditor. If i click in the textfield inside the radeditor, closes the popup, and in the first modal popup opens another window with a textbox, it is not possible for me to set the mose courser inside the field. It is not displayed, and the text typed is not displayed either.

To explain the obove:
  • Page
    • Popup (opens first)
      • Popup with Rade editor (opens second)
      • Popup with textbox (opens third).

It only happens if i use IE7, and not in FireFox.

Todd Anglin
Top achievements
Rank 2
 answered on 07 Oct 2008
2 answers
186 views

I am getting a resource key missing error from the new release of ASP.Net controls

Error
----------------------------------
Error:  Cannot find a string resource with key 'ClearClass' in App_GlobalResources/RadEditor.Main.resx. Please, make sure that your custom localization has all needed resource strings, or copy the original localization resources from your installation folder to App_GlobalResources. 

 Exception:  System.InvalidOperationException: Cannot find a string resource with key 'ClearClass' in App_GlobalResources/RadEditor.Main.resx. Please, make sure that your custom localization has all needed resource strings, or copy the original localization resources from your installation folder to App_GlobalResources. at Telerik.Web.LocalizationStrings.GetString(String key) at Telerik.Web.UI.Editor.MainStrings.get_ClearClass() 
Stack Trace:  at Telerik.Web.LocalizationStrings.GetString(String key) at Telerik.Web.UI.Editor.MainStrings.get_ClearClass() 


Build
---------------------------------------------
RadControls_for_ASP.NET_AJAX_2008_2_1001_dev_hotfix.zip

Krishna Rudraiah
Top achievements
Rank 1
 answered on 07 Oct 2008
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?