Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
78 views
Hello, 

Is there a way to clear filter string after user clicked on search button.
Before Q3, If I am not mistaken, filter string was cleard automatically after serach.


protected void rsbProducts_ButtonCommand(object sender, SearchBoxButtonEventArgs e)
{
    if (e.CommandName == "clearfilter")
    {
        // Required to clear current filter text
    }
}

Thanks in advanced, 
Robin
Robin
Top achievements
Rank 2
 answered on 21 Oct 2013
5 answers
133 views
Hi friends,
I success to add controls to the panelbaritem, but cann't find them on button_click.

maybe the problem is with the add of the controls
the add controls event is after I select row on radgrid.


please help me,
thx.


<telerik:RadPane runat="server" ID="PnlData" dir="rtl" text-align="left">
                    <telerik:RadPanelBar ID="radpnlbardata" runat="server"  ExpandMode="FullExpandedItem" Width="100%"  dir="ltr" text-align="left"  Height="100%">
 
                        </telerik:RadPanelBar>
 
                   <div style="width:100%; text-align:center;">
                        <telerik:RadButton ID="btnUpdate" runat="server" Skin="Metro" Text="Update" Width="70px" align="center" visible="false"/>
                        <telerik:RadButton ID="btnadd" runat="server" Skin="Metro" Text="Add" Width="50px" align="center" visible="false"/>
 
                   </div>
               </telerik:RadPane>
dsFieldsDetails = myService.Get_Fields_Details(Request.Params("ObjID"))
 
Dim rdRoot As New Telerik.Web.UI.RadPanelItem
rdRoot.Text = "rbroot"
rdRoot.Expanded = True
rdRoot.PreventCollapse = False
rdRoot.Selected = True
 
For Each row As DataRow In dsFieldsDetails.Tables(0).Rows
   Select Case row(dsFieldsDetails.Tables(0).Columns("field_type_name"))
 
   Case "Int", "smallint", "bigint", "varchar", "nvarchar"
      Dim label1 As New Label
      Dim textbox1 As New RadTextBox
 
      label1.ID = "lbl" + row(dsFieldsDetails.Tables(0).Columns("table_field_name"))
      label1.Text = row(dsFieldsDetails.Tables(0).Columns("table_field_name")) + ":   "
      textbox1.ID = "txt" + row(dsFieldsDetails.Tables(0).Columns("table_field_name"))
      textbox1.Text = ""
 
      rdRoot.Controls.Add(label1)
      rdRoot.Controls.Add(textbox1)
 
   Case "bit"
      Dim checkbox1 As New CheckBox
      checkbox1.ID = "lbl" + row(dsFieldsDetails.Tables(0).Columns("table_field_name"))
      checkbox1.Text = row(dsFieldsDetails.Tables(0).Columns("table_field_name")) + ":   "
      rdRoot.Controls.Add(checkbox1)
 
   End Select
Next


Shinu
Top achievements
Rank 2
 answered on 21 Oct 2013
3 answers
759 views
I'm getting "Insert item is available only when grid is in insert mode." when I call GetInsertItem() for the PerformInsert command in the ItemCommand event.  Is there something obvious I'm missing?  Thanks.

<telerik:RadGrid ID="grid" runat="server"
                OnNeedDataSource="grid_NeedDataSource"
                OnItemCommand="grid_ItemCommand"               
                OnInsertCommand="grid_InsertCommand">               
                <MasterTableView CommandItemDisplay="Top" ClientDataKeyNames="id" DataKeyNames="id" AutoGenerateColumns="false" EditMode="EditForms">                  
                    <CommandItemTemplate>
                      <asp:LinkButton ID="add" runat="server" Text="Add new Record" CommandName="InitInsert"></asp:LinkButton>
                      <asp:LinkButton ID="btnPerformInsert" runat="server" Text="Add new Record" CommandName="PerformInsert" Visible="true"></asp:LinkButton>
                    </CommandItemTemplate>                   
                    <Columns>                                              
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-Width="10%"  />                                               
                        <telerik:GridButtonColumn CommandName="Delete" UniqueName="DeleteColumn" ButtonType="ImageButton" HeaderStyle-Width="10%" />...                       
                                   
                    </Columns>
                    <EditFormSettings EditFormType="Template">
                        <FormTemplate>                           
                                ....
                                    <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update" Visible='<%# !(Container.DataItem is Telerik.Web.UI.GridInsertionObject) %>' />
                                    <asp:Button ID="btnInsert" Text="Insert" runat="server" CommandName="PerformInsert" Visible='<%# Container.DataItem is Telerik.Web.UI.GridInsertionObject %>'  />
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" />
                                </div>
                            </div>
                        </FormTemplate>
                    </EditFormSettings>

protected void grid_ItemCommand(object sender, GridCommandEventArgs e)
       {          
           switch(e.CommandName)
           {   
               case RadGrid.PerformInsertCommandName:                   
    
               
GridEditFormInsertItem insertedItem = (GridEditFormInsertItem)e.Item.OwnerTableView.GetInsertItem();
Princy
Top achievements
Rank 2
 answered on 21 Oct 2013
1 answer
82 views
Hi,

Has the version of jQuery changed in ASP.NET AJAX Q3 2013 or does it remain as jQuery 1.9.1?

Thanks,

Donald
Shinu
Top achievements
Rank 2
 answered on 21 Oct 2013
1 answer
74 views
Hi,

I'm trying to bind a TreeList using a client side data source but i can't see any information on this in the documentation or forums?

http://www.telerik.com/help/aspnet-ajax/treelist-client-side-basics.html

Anyone tell me how i can do this please?

Thanks,
JC

John
Top achievements
Rank 1
 answered on 21 Oct 2013
0 answers
108 views
<Style TargetType="{x:Type telerik:RadMenuItem}">
    <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
    <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
    <Setter Property="Background" Value="{StaticResource ContextMenuBackground}"/>
    <Setter Property="Foreground" Value="{StaticResource ContextMenuForeground}"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type telerik:RadMenuItem}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition />
                    </Grid.RowDefinitions>
 
                    <Border x:Name="Border"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding Background}"
                        BorderThickness="2"
                        CornerRadius="5">
 
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"
                                              MinWidth="17"
                                              SharedSizeGroup="Icon" />
                                <ColumnDefinition Width="Auto" MinWidth="5"
                                              SharedSizeGroup="Name" />
                                <ColumnDefinition MinWidth="5" Width="Auto"
                                              SharedSizeGroup="Shortcut" />
 
                                <ColumnDefinition MinWidth="10" Width="Auto"
                                              SharedSizeGroup="Arrow" />
                            </Grid.ColumnDefinitions>
 
 
                            <ContentPresenter x:Name="Icon"
                                          Margin="4,0,6,0"
                                          VerticalAlignment="Center"
                                          ContentSource="Icon" />
this piece of code is used to override the menuitem style and set foreground property
<ContentPresenter x:Name="HeaderHost"
                                          Grid.Column="1"
                                          Margin="{TemplateBinding Padding}"
                                          ContentSource="Header"
                                          RecognizesAccessKey="True" >
 
                                <ContentPresenter.Resources>
                                        <Style TargetType="{x:Type TextBlock}">
                                            <Setter Property="TextTrimming" Value="CharacterEllipsis"/>
                                            <Setter Property="FontSize" Value="11"/>
                                            <Setter Property="FontFamily" Value="Arial Unicode MS"/>
                                            <Style.Triggers>
                                                <Trigger Property="controls:TextBlockService.IsTextTrimmed" Value="True">
                                                    <Setter Property="ToolTip" Value="{Binding Text, RelativeSource={RelativeSource Self}}"/>
                                                </Trigger>
                                            </Style.Triggers>
                                        </Style>
 
                                </ContentPresenter.Resources>
                                </ContentPresenter>
 
 
 
 
 
 
 
                            <TextBlock x:Name="ShortCuts" Grid.Column="3" Margin="{TemplateBinding Padding}" >
                            </TextBlock>
 
 
 
 
 
                            <Popup x:Name="SubMenuPopup"
                               AllowsTransparency="true"
                               Focusable="false" Grid.IsSharedSizeScope="True"
                               IsOpen="{Binding Path=IsSubmenuOpen,
                                                RelativeSource={RelativeSource TemplatedParent}}"
                               Placement="Right"
                               PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}"
                               VerticalOffset="-3">
                                <Grid x:Name="SubMenu">
                                    <Border x:Name="SubMenuBorder"
                                        Background="{TemplateBinding Background}"
                                        BorderBrush="Gray"
                                        BorderThickness="1"
                                        CornerRadius="5">
                                        <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
                                    </Border>
                                </Grid>
                            </Popup>
                        </Grid>
                    </Border>
this separator property is set, because of this property i am getting on extra row in the Rad Menu Item
<Rectangle x:Name="Separator" Grid.Row="1"
                                Height="1" Visibility="Collapsed" 
                                Fill="{DynamicResource GridView_GridLinesItemVertical}" />
 
 
 
 
 
 
                </Grid>
                <ControlTemplate.Triggers>
                    <Trigger Property="attachedBehaviors:MenuItemHasSeparatorBehavior.HasSeparator" Value="True">
                        <Setter TargetName="Separator" Property="Visibility" Value="Visible"/>
                    </Trigger>
 
                    <Trigger Property="Role" Value="TopLevelHeader">
                        <Setter Property="Margin" Value="2" />
                        <Setter Property="Padding" Value="6,3,6,3" />
                        <Setter TargetName="SubMenuPopup" Property="Placement" Value="Bottom" />
 
 
                    </Trigger>
 
                    <Trigger Property="Role" Value="TopLevelItem">
                        <Setter Property="Margin" Value="2" />
                        <Setter Property="Padding" Value="6,3,6,3" />
 
                    </Trigger>
 
                    <Trigger Property="Role" Value="SubmenuHeader">
                        <Setter Property="DockPanel.Dock" Value="Top" />
                        <Setter Property="Padding" Value="0,2,0,2" />
 
 
                    </Trigger>
 
                    <Trigger Property="Role" Value="SubmenuItem">
                        <Setter Property="DockPanel.Dock" Value="Top" />
                        <Setter Property="Padding" Value="0,2,0,2" />
 
                    </Trigger>
 
 
 
 
                    <Trigger Property="Icon" Value="{x:Null}">
                        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
                    </Trigger>
 
                    <Trigger Property="IsChecked" Value="true">
                        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" />
                    </Trigger>
 
                    <Trigger SourceName="SubMenuPopup" Property="AllowsTransparency" Value="true">
                        <Setter TargetName="SubMenu" Property="Margin" Value="2" />
                        <Setter TargetName="SubMenu" Property="SnapsToDevicePixels" Value="true" />
                        <Setter TargetName="SubMenuBorder" Property="BitmapEffect" Value="{DynamicResource PopupDropShadow}" />
                    </Trigger>
 
 
 
 
                    <Trigger Property="IsHighlighted" Value="true">
                        <Setter TargetName="Border" Property="Background" Value="{StaticResource BR_Menu_Highlight}" />
                        <Setter Property="Foreground" Value="{StaticResource BR_SE_White}" />
                        <Setter TargetName="ShortCuts" Property="Foreground" Value="{StaticResource BR_SE_White}" />
 
 
                    </Trigger>
                    <Trigger Property="IsEnabled" Value="false">
                        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        <Setter TargetName="ShortCuts" Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
RadContextMenu
<Style TargetType="{x:Type telerik:RadContextMenu}">
    <Setter Property="OverridesDefaultStyle" Value="True" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="Background" Value="{StaticResource ContextMenuBackground}"/>
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="FontFamily" Value="Arial Unicode MS"/>
 
    <Setter Property="Grid.IsSharedSizeScope" Value="True"></Setter>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type telerik:RadContextMenu}">
 
 
 
 
                <Border x:Name="Border"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{StaticResource ContextMenuBorderBrush}"
                        BorderThickness="1"
                        CornerRadius="5">
 
 
 
 
                    <StackPanel ClipToBounds="True"
                                IsItemsHost="True"
 
 
                        Orientation="Vertical" />
                </Border>
            </ControlTemplate>
 
        </Setter.Value>
    </Setter>
</Style>
Vikram
Top achievements
Rank 1
 asked on 20 Oct 2013
5 answers
291 views
Hi,

I am using RadGrid with my own control as edit control in DNN. I need ModuleConfiguration information in the edit control so that i can load correct data in the listboxes and comboboxes. These values vary by ModuleId. How can I pass ModuleConfiguration or ModuleId to edit control that i created for RadGrid. In the regular case I load the control and then i set the ModuleConfiguration, since the control extends PortalModuleBase. Can you please provide how i can achieve this? I need the solution quickly. I appreciate any help.

Thank you,
Ana
Sheetal
Top achievements
Rank 1
 answered on 20 Oct 2013
0 answers
124 views




 



Lampros
Top achievements
Rank 1
 asked on 19 Oct 2013
5 answers
218 views
Hi,

I am wondering whether or not it is possible to apply Telerik skins to regular ASP.NET controls (text box, label, drop down list etc). If it is in fact possible, can you please provide with snippet of how it can be done. 

Thanks!
Sepehr
Top achievements
Rank 1
 answered on 19 Oct 2013
2 answers
549 views
I set textmode as Multiline to RadTextBox and Rows is set as 10. If I set skin (silk) to RadTextBox the height does not changed, it shows as single line textbox. I have to manually set the height. If I remove the skin it works perfectly. How do I rectify this issue ?
Arun Kumar
Top achievements
Rank 2
 answered on 19 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?