Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
105 views
Is there is a way (other than building static images for each specific one) to create a non-editable label on individual nodes?

So that following the pattern,

Item 1
    Property 1:  property1 value
    Property 2:  property2 value

Where the 'property1 value' is the actual text of the node, and "Property 1:" is the node 'label'.  Such that when the user elects to edit that property, they're only editing the text of "property1 value", not the label.
Marbry
Top achievements
Rank 1
 answered on 20 Jul 2011
2 answers
357 views
Hi,

I'm trying to create a SQL-style WHERE ColumnName IN('a', 'b', 'c') filter for one of my RadGrid columns.

In my RadGrid I have a GridBoundColumn using a FilterTemplate which has a RadComboBox with a number of CheckBoxes inside it.

<telerik:GridBoundColumn HeaderText="Type" DataField="Type" UniqueName="Type" AutoPostBackOnFilter="true">
    <FilterTemplate>
        <telerik:RadComboBox 
            ID="cmbType"
            runat="server"
            DataSource="<%# TypeFilterItems %>"
            DataValueField="TypeId"
            DataTextField="Title"
            EmptyMessage="All"                
            AllowCustomText="true"
            Width="130px"
            OnClientDropDownClosing="FilterOnType">
            <ItemTemplate>
 
                <div class="combo-item-template">
                    <div class="clear">
                        <asp:CheckBox runat="server" ID="chkType" Checked="true" onclick="TypeCheckBoxClick(this)" style="float:left;" />
                        <p class="floatLeft"><%# Eval("Title") %></p>
                    </div>
                </div>
 
            </ItemTemplate>
 
        </telerik:RadComboBox>
 
        <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
            <script type="text/javascript">
                function FilterOnType(sender, args) {
                    var tableView = $find("<%# Container.OwnerTableView.ClientID %>");
                    tableView.filter("Type", text, "Custom");
                }
 
                function TypeCheckBoxClick(chk) {
                    var combo = $find('<%# Container.FindControl("cmbType").ClientID %>');
 
                    // Get the collection of all items
                    var items = combo.get_items();
 
                    text = ""; values = "";
 
                    // Enumerate all items
                    for (var i = 0; i < items.get_count(); i++) {
                        var item = items.getItem(i);
 
                        // Get the checkbox element of the current item
                        var chk1 = $get(combo.get_id() + "_i" + i + "_chkType");
                        if (chk1.checked) {
                            text += item.get_text() + ",";
                            values += item.get_value() + ",";
                        }
                    }
 
                    // Remove the last comma from the string
                    text = text.replace(/,$/, "");
                    values = values.replace(/,$/, "");
                    combo.set_text(text);
                }
            </script>
        </telerik:RadScriptBlock>
    </FilterTemplate>
</telerik:GridBoundColumn>

This part is all working fine.  What I want to do is tell the RadGrid to filter and show only the options the user has ticked in the RadComboBox's CheckBoxes.

e.g.: If the user open the ComboBoxList filter and selects A, B and D, I'd like the grid to filter and show only results in that column which are A, B or D.  Is this possible with native RadGrid filtering?  And if not, any ideas on the best was to achieve it?

Cheers,

Adam
Brian
Top achievements
Rank 1
 answered on 20 Jul 2011
1 answer
114 views
i have a rad context menu like this.(on a radGrid)

 

 

<telerik:RadContextMenu ID="OptionsRadContextMenu" runat="server" Skin="WebBlue"

 

 

 

CssClass="leftText">

 

 

 

<Targets>

 

 

 

<telerik:ContextMenuControlTarget ControlID="PopupMenuImage" />

 

 

 

</Targets>

 

 

 

<Items>

 

 

 

<telerik:RadMenuItem Text="Copy" ImageUrl="../App_Themes/GOLD Main/ToolBar/save_16x16.gif" />

 

 

 

<telerik:RadMenuItem Text="Post Results" ImageUrl="../App_Themes/GOLD Main/ToolBar/edit_16x16.gif" />

 

 

 

<telerik:RadMenuItem Text="Item Inspection Report">

 

 

 

<Items>

 

 

 

<telerik:RadMenuItem Text="Details" ImageUrl="../App_Themes/GOLD Main/ToolBar/print_16x16.gif" />

 

 

 

<telerik:RadMenuItem Text="Summary" ImageUrl="../App_Themes/GOLD Main/ToolBar/print_16x16.gif" />

 

 

 

</Items>

 

 

 

</telerik:RadMenuItem>

 

 

 

</Items>

 

 

 

</telerik:RadContextMenu>

on Databind i declare my pop up menu and bind to the first two.

 

RadMenu

 

 

RadPopupMenu = (RadMenu)e.Item.Cells[0].FindControl("OptionsRadContextMenu");

 

RadPopupMenu.Items[0].NavigateUrl =

 

String.Format("javascript:OpenCopyItem({0},{1},{2},{3},{4})", woid, detailid, wonumber, locationid, wolinenumber);

 

RadPopupMenu.Items[1].NavigateUrl =

 

String.Format("javascript:OpenPostResults({0},{1})", woid, detailid, wonumber, locationid);

 

 

 

my question is how can i get to the "sub-menus" or the item that has other items? once i try to reference past [1] to say "RadPopupMenu.Items[2]" - i get an error. any help is appreciated.
thanks again
rik


rik butcher
Top achievements
Rank 1
 answered on 20 Jul 2011
1 answer
287 views
I put customised image on the left side of the panel bar,but the default image on the radpanelbar on right side is still visible. How I can hide that Default expand Icon So that only customised image should visible on left side?
Kate
Telerik team
 answered on 20 Jul 2011
1 answer
97 views

I put customised image on the left side of the panel bar,but the default image on the radpanelbar on right side is still visible. How I can hide that Default expand Icon So that only customised image should visible on left side?

 

Kate
Telerik team
 answered on 20 Jul 2011
3 answers
172 views
I have upgraded to the Q2 Release that came out yesterday - however I don't see RadNotification included in it.  
Does this still have to be downloaded as a trial?
Samantha
Top achievements
Rank 1
 answered on 20 Jul 2011
4 answers
442 views
I am trying to show the radalert dialog box using the AjaxPanel.ResponseScript.add function.  Whats interesting is that it does work if I write static text in the radalert function, but I want the error message to display back to the user.

 
<VB.NET>
-------------------

 

 

Catch ex As Exception

 

 

 

    Me.RadAjaxPanel1.ResponseScripts.Add("radalert('" & ex.Message & "')")  '' < Doesn't work>

 

 

 

    Me.RadAjaxPanel1.ResponseScripts.Add("radalert('A error occurred. ')")  '' < Works >

 

 

 

End Try

 


I want the radalert to dynamically display the text of the error message  in the dialog box.  I dont want to have static text.  What am I doing wrong?
Dan
Top achievements
Rank 1
 answered on 20 Jul 2011
1 answer
95 views
Hi,

I generate create a EditorToolGroup in code behind like this:

Public Shared Sub AddEditorToolbarGroup(ByRef ed As RadEditor)
      Dim tg As New EditorToolGroup
      tg.Tag = "EmoticonsGroup"
      AddIconsDropDown(tg, EtnicGroup.Afro)
      AddIconsDropDown(tg, EtnicGroup.Hindi)
      AddIconsDropDown(tg, EtnicGroup.Java)
      AddIconsDropDown(tg, EtnicGroup.Indian)
      AddIconsDropDown(tg, EtnicGroup.China)
      AddIconsDropDown(tg, EtnicGroup.Bakra)
      ed.Tools.Add(tg)
  End Sub
  Private Shared Sub AddIconsDropDown(ByRef etg As EditorToolGroup, ByVal etnicity As String)
      Dim smileys As Dictionary(Of String, String) = EtnicSmileys(etnicity)
      'Dim sp As EditorSplitButton = New EditorSplitButton("Emoticons_" + etnicity)
      'sp.Text = "Emoticons_" + etnicity
      'sp.ImageUrl = "Smiley/Smiley_Afro_Happy.gif"
      'For Each smiley As KeyValuePair(Of String, String) In smileys
      '    Dim img As String = String.Format("<img src='Smiley/{0}.gif' height='22' widht='22' onmouseover='this.width=40;this.height=40;' onmouseout='this.width=22;this.height=22;'>", smiley.Value)
      '    Dim url As String = String.Format("Smiley/{0}.gif", smiley.Value)
      '    'sp1.Items.Add("<img src='icons/1.gif'>", "icons/1.gif");
      '    sp.Items.Add(New EditorDropDownItem() With {.Name = img, .Value = url})
      'Next
      'etg.Tools.Add(sp)
      Dim edd As EditorDropDown = New EditorDropDown() With {.Name = "Emoticons_" + etnicity, _
                                                             .Text = "Emoticons_" + etnicity, _
                                                             .Width = Unit.Pixel(22), _
                                                             .ImageUrl = String.Format("./Smiley/Smiley_{0}_Happy.gif", etnicity), _
                                                             .ItemsPerRow = 6, _
                                                             .ShowIcon = True, _
                                                             .ShowText = False _
                                                            }
      For Each smiley As KeyValuePair(Of String, String) In smileys
          Dim img As String = String.Format("<img src='Smiley/{0}.gif' height='22' widht='22' onmouseover='this.width=40;this.height=40;' onmouseout='this.width=22;this.height=22;'>", smiley.Value)
          Dim url As String = String.Format("Smiley/{0}.gif", smiley.Value)
          'sp1.Items.Add("<img src='icons/1.gif'>", "icons/1.gif");
          edd.Items.Add(New EditorDropDownItem() With {.Name = img, .Value = url})
      Next
      etg.Tools.Add(edd)
  End Sub

The dropdowns are filled as expcted, but the dropdown should display my ImgUrl Icon, not te .Text property...
I prefer to use the EditorSplitButton, but it has the same problem: no icon image! I'm sure the path to the icon is correct, since the items are filled properly... What am I doing wrong here?

TIA,
Alex
Rumen
Telerik team
 answered on 20 Jul 2011
3 answers
164 views
Hello guys,
I just tried to upgrade a solution to the Q2 release. Previously, the projects were Telerik Web Applications that were using the 2011.1.621.35 release. Attempting to upgrade through the Telerik menu item upgrade wizard loads the proper dialogs, backs up the projects properly, but fails with the following error after it has removed the references to the Telerik dlls in the project. The error is:

Error executing custom action
Telerik.Web.UI.VSX.Actions.UpdateReferencesAction: Object reference not set to an instance of an object.

The dlls are not automatically added and the upgrade process stops. Also tried the Convert to Telerik Web Application option as well after the upgrade wizard had removed the telerik dlls from the project. This error occurs immediately on the first project it tries to upgrade in the solution.
Andrey
Telerik team
 answered on 20 Jul 2011
6 answers
342 views
Hi Telerik's team,

I would like to change the RadGrid context language according to the selected culture as recommended by Microsoft. For example, the "Add new record" button, "Refresh", "Go to page", "Change", "Go", "Page size" ...
How can we achieve this ?
I'm using DotNetNuke and this works with a few easy changes in RadEditor, I hope it works the same in RadGrid :)

Thank you

S.F.
Erik
Top achievements
Rank 2
 answered on 20 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?