Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
131 views

Hello,

This is my code:

 

<telerik:RadTileList ID="elmHomeTileList" CssClass="responsiveWidth" runat="server" Skin="Telerik" EnableDragAndDrop="true" OnTileClick="elmHomeTileList_TileClick" AutoPostBack="true"
        SelectionMode="None" ScrollingMode="Accelerated" TileRows="1">
        <Groups>
            <telerik:TileGroup>

  <telerik:RadContentTemplateTile ID="tileService" runat="server" Shape="Wide" CssClass="tile-services" OnClick="tileService_Click" Selected="false">
                    <ContentTemplate>
                        <div class="pull-left">
                            <%--<a href='javascript:void(0)' onclick="doSomeWork(1)">
                                <span class="glyphicon glyphicon-plus tile-plus noTileDrag" aria-hidden="true"></span>
                            </a>--%>
                            <button >Hello</button>
                           <asp:LinkButton ID="LinkButton1" runat="server" OnClick="Unnamed_Click" Text="Click Me" />
                           
                         <asp:Button ID="Button1" runat="server" OnClick="Unnamed_Click" Text="Click Me2" />
                            <a href="<%=ResolveUrl("~/Admin/AddService/")%>">
                                <span class="glyphicon glyphicon-plus tile-plus" aria-hidden="true"></span>
                            </a>
                        </div>

                        <img src="Images/Icons/Toolbars/alert.png" class="tile-image pull-left tile-image-plus" />
                        <div class="right-border"></div>

                        <div class="right-number">
                            43
                        </div>

                        <div class="right-text">
                            services
                        </div>
                    </ContentTemplate>                    
                </telerik:RadContentTemplateTile>

 </telerik:TileGroup>
        </Groups>
    </telerik:RadTileList>

 

This is my backend code super simple:

 

 protected void Unnamed_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Admin/AddService/");
        }

        protected void tileService_Click(object sender, EventArgs e)
        {

        }

        protected void elmHomeTileList_TileClick(object sender, TileListEventArgs e)
        {

        }

 

The problem here is when I click either LinkButton or Button it never hits the break point in Unnamed_Click. It only goes to tileService_Click and elmHomeTileList_TileClick. Is there anyway I could stop this control from doing this since I want that the tile click should go a URL but I also want that clicking a specific link button should go to that desired URL.

This is server side but I tried posting simple HTML anchor tag as well like

<telerik:RadContentTemplateTile ID="tileService" runat="server" Shape="Wide" CssClass="tile-services" NavigateUrl="/Admin/ListServices" Selected="false">
                    <ContentTemplate>
                        <div class="pull-left">
                            <%--<a href='javascript:void(0)' onclick="doSomeWork(1)">
                                <span class="glyphicon glyphicon-plus tile-plus noTileDrag" aria-hidden="true"></span>
                            </a>--%>

                            <a href="<%=ResolveUrl("~/Admin/AddService/")%>">
                                <span class="glyphicon glyphicon-plus tile-plus" aria-hidden="true"></span>
                            </a>
                        </div>

                        <img src="Images/Icons/Toolbars/alert.png" class="tile-image pull-left tile-image-plus" />
                        <div class="right-border"></div>

                        <div class="right-number">
                            43
                        </div>

                        <div class="right-text">
                            services
                        </div>
                    </ContentTemplate>

                </telerik:RadContentTemplateTile>

But nothing works. It always go to the URL set in NavigateUrl. The anchors don't work at all.

Is there a fix for this?

 

Thank you.

TC
Top achievements
Rank 1
 asked on 27 Feb 2017
0 answers
121 views

Hey,

im trying to have the same style to show the user that an input is invalid. Im using a RadTextBox, a RadNumericTextBox and a DateTimePicker with asp:CustomValidator each. For the two text boxes i can set

textbox.Invalid = true

but there is no such property in the DateTimePicker. I like the red border with the red exclamation mark in the text boxes and would like to use them for the DateTimePicker, too, but the only thing that works for me right now is to set an ErrorMessage for the Validator.

Do I fail to see how this works? Because there are forum threads asking for a way to not mark the field like I want to.

Greetings

Felix

Felix
Top achievements
Rank 1
 asked on 27 Feb 2017
1 answer
407 views

I have the following grid (as a sample)

<telerik:RadGrid runat="server" ID="RadGrid1" AllowSorting="true" AllowPaging="true" PageSize="15" AutoGenerateColumns="false" ShowDesignTimeSmartTagMessage="false" Width="9700px" AllowFilteringByColumn="true" GroupingSettings-CaseSensitive="false" >
   <MasterTableView GroupLoadMode="Client" DataKeyNames="Id" NoMasterRecordsText="No records." >
      <ColumnGroups>
         <telerik:GridColumnGroup HeaderText="[Group1]" Name="grp1" />
         <telerik:GridColumnGroup HeaderText="[Group2]" Name="grp2" />
      </ColumnGroups>
      <Columns>
         <telerik:GridBoundColumn UniqueName="Item1a" DataField="Item1a" HeaderText="[Item 1a]"  ColumnGroupName="grp1" AutoPostBackOnFilter="true" FilterListOptions="VaryByDataType" CurrentFilterFunction="Contains" FilterControlWidth="100px">
          <HeaderStyle HorizontalAlign="Left" Width="120px" Wrap="false" />
          <ItemStyle HorizontalAlign="Left" Width="120px" />
         </telerik:GridBoundColumn>
         <telerik:GridBoundColumn UniqueName="Item1b" DataField="Item1b" HeaderText="[Item 1b]"  ColumnGroupName="grp1" AutoPostBackOnFilter="true" FilterListOptions="VaryByDataType" CurrentFilterFunction="Contains" FilterControlWidth="100px">
          <HeaderStyle HorizontalAlign="Left" Width="120px" Wrap="false" />
          <ItemStyle HorizontalAlign="Left" Width="120px" />
         </telerik:GridBoundColumn>
         <telerik:GridBoundColumn UniqueName="Standalone" DataField="Standalone" HeaderText="[Stand Alone]"  AutoPostBackOnFilter="true" FilterListOptions="VaryByDataType" CurrentFilterFunction="Contains" FilterControlWidth="100px">
          <HeaderStyle HorizontalAlign="Left" Width="120px" Wrap="false" />
          <ItemStyle HorizontalAlign="Left" Width="120px" />
         </telerik:GridBoundColumn>
         <telerik:GridBoundColumn UniqueName="Item2a" DataField="Item2a" HeaderText="[Item 2a]"  ColumnGroupName="grp2" AutoPostBackOnFilter="true" FilterListOptions="VaryByDataType" CurrentFilterFunction="Contains" FilterControlWidth="100px">
          <HeaderStyle HorizontalAlign="Left" Width="120px" Wrap="false" />
          <ItemStyle HorizontalAlign="Left" Width="120px" />
         </telerik:GridBoundColumn>
         <telerik:GridBoundColumn UniqueName="Item2b" DataField="Item2b" HeaderText="[Item 2b]"  ColumnGroupName="grp2" AutoPostBackOnFilter="true" FilterListOptions="VaryByDataType" CurrentFilterFunction="Contains" FilterControlWidth="100px">
          <HeaderStyle HorizontalAlign="Left" Width="120px" Wrap="false" />
          <ItemStyle HorizontalAlign="Left" Width="120px" />
         </telerik:GridBoundColumn>
      </Columns>
   </MasterTableView>
</telerik:RadGrid>

 

I am trying to alter the text on both the ColumnGroup items and the GridHeader items.

I can change the ColumnGroup text like this (in ItemDataBound):

RadGrid1.MasterTableView.ColumnGroups.FindGroupByName("grp1").HeaderText = "First Group"

 

But when I try to rename the GridHeader (as I have done numerous times before), there is no change

Private Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs) Handles RadGrid1.ItemDataBound
   If (TypeOf e.Item Is GridHeaderItem) Then
      Dim header As GridHeaderItem = e.Item
      CType(header("Item1a").Controls(0), LinkButton).Text = "Group 1 - Item 1"
      CType(header("Item1b").Controls(0), LinkButton).Text = "Group 1 - Item 2"
      CType(header("Item2a").Controls(0), LinkButton).Text = "Group 2 - Item 1"
      CType(header("Item2b").Controls(0), LinkButton).Text = "Group 2 - Item 2"
   End if

 

What am I doing wrong?

Eyup
Telerik team
 answered on 27 Feb 2017
1 answer
449 views
I have a grid with a combo box edit template column. I have to save the Text and Value of the selected combo box item on BatchEditCommand. Can you please provide sample code to accomplish this?
Eyup
Telerik team
 answered on 27 Feb 2017
1 answer
242 views

Hi,

in my web application I data bind a list of simple POCO objects into the grid. In the ItemDataBound event handler I add some additional columns with generated values.

E.g.:

protected void radGridResult_ItemDataBound(object sender, GridItemEventArgs e)
{
  GridDataItem lGridDataItem = e.Item as GridDataItem;
 
  if ( lGridDataItem != null )
  {       
    lGridDataItem["Address"].Text = "Foobar";
  }
}

 

This works fine unless I try to group the "Address" column inside the web application. Then I get an exception that the "Address" property cannot be found inside the data object. 

Is there a way to solve this problem or is it better to create a new POCO data object containing all neccessary properties instead.

 

Best regards

Martin Horst

Eyup
Telerik team
 answered on 27 Feb 2017
0 answers
123 views

Hello I have two nested radlistbox with itemtemplates
the problem is when I select an item of sub Radlistbox how I can access the value of Parent item
Please Help Or if anybody has a better way please tell me
this my Asp.net code

 

<telerik:RadListBox ID="Chk_ProjectList" CssClass="Chk_Filters" runat="server" RenderMode="Classic" AutoPostBack="true"  OnItemCheck="Chk_ProjectList_ItemCheck"
                                        Width="100%" RepeatDirection="Horizontal" Font-Size="13px" 
                                        DataValueField="ProjectId" >
                                        <%--OnItemCheck="Chk_ProjectList_ItemCheck" AutoPostBack="true"  OnClientItemChecking="Chk_ProjectList_OnClientItemChecking"--%>

                                        <ItemTemplate>


                                            <table style="width: 100%; border: none;">
                                                <tr style="width: 100%;" runat="server" id="tds">
                                                    
                                                    <td style="width: 18%; display: inline;">
                                                        <%--<input class="rlbCheck" type="checkbox"/>--%>
                                                        <div class="PrjClassTitle">
                                                            

                                                            <%# DataBinder.Eval(Container.DataItem, "ProjectName") %>   ( <%# DataBinder.Eval(Container.DataItem, "Count") %> )
                                                
                                                        </div>
                                                    </td>



                                                </tr>
                                                <tr style="width: 100%;">
                                                    <td id="Td1" style="width: 18%; display: inline;" runat="server">
                                                        <div runat="server" id="ActionTypeStatus" class="GPart">
                                                            <%--style="display: none"--%>
                                                            <%--<div class="divFilterTitle">وضعیت واگن </div>--%> 
                                                            <telerik:RadListBox ID="Chk_ActionTypeStatusList" runat="server" RenderMode="Lightweight" AutoPostBack="true" 
                                                                Width="100%" RepeatDirection="Horizontal" RepeatColumns="1" Font-Size="13px"
                                                                DataValueField="ActionTypeId"><%--OnSelectedIndexChanged="Chk_ActionTypeStatusList_SelectedIndexChanged" OnClientSelectedIndexChanging="Chk_ActionTypeStatusList_SelectedIndexChanging" --%>

                                                                <ItemTemplate>



                                                                    <table style="width: 100%;">
                                                                        <tr style="width: 100%;">

                                                                            <td style="width: 18%; display: inline;">
                                                                                
                                                                                <%# DataBinder.Eval(Container.DataItem, "ActionTypeName") %> ( <%# DataBinder.Eval(Container.DataItem, "Count") %> )
                                                
                                                                            </td>

                                                                        </tr>
                                                                    </table>

                                                                </ItemTemplate>
                                                                <EmptyMessageTemplate>
                                                                   NO RECORDES
                                                                </EmptyMessageTemplate>

                                                            </telerik:RadListBox>


                                                            <%--<div class="GPartLn"></div>--%>
                                                        </div>
                                                    </td>
                                                </tr>


                                            </table>


                                        </ItemTemplate>



                                        <EmptyMessageTemplate>
                                            NO RECORDES
                                        </EmptyMessageTemplate>
                                    </telerik:RadListBox>

Maryam
Top achievements
Rank 1
 asked on 27 Feb 2017
0 answers
178 views

For some reason, on both iOS Safari and Android Chrome, when I or a user scrolls vertically in a listbox, it is "selecting" the item under their finger when they lift it off the screen and have finished scrolling.

I would normally expect a user to be able to scroll vertically in the list and then "tap" an item to select it.

I've seen older threads claiming this was fixed in ~2013 builds, but I'm on a 2016 build and I'm still experiencing the issue.

Also on a side note, scrolling down in listboxes on Android Chrome also seems to occasionally trigger chrome's "pull-to-refresh" functionality, which I'm trying to avoid.

Alex
Top achievements
Rank 1
 asked on 25 Feb 2017
0 answers
188 views

The following code works and updates the literal control perfectly.  When I add the ajax manager, it doesn't update the control at all . Its still Showing Chart...

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ddlFromDay">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="litTargetSales" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
     <telerik:RadFormDecorator RenderMode="Lightweight" ID="FormDecorator1" runat="server" DecoratedControls="Buttons"></telerik:RadFormDecorator>
 
      <fieldset>
                            <telerik:RadPageLayout ID="rplTargetAcheived" runat="server" GridType="Fluid">
                                <Rows>
                                    <telerik:LayoutRow>
                                        <Columns>
                                            <telerik:LayoutColumn Span="6" CssClass="tdmakeright">
                                                <telerik:RadLabel ID="lblFromDay" runat="server" Text="From Day" Skin="MetroTouch" RenderMode="Lightweight"></telerik:RadLabel>
 
                                                <telerik:RadComboBox ID="ddlFromDay" runat="server" Filter="StartsWith" Skin="MetroTouch" RenderMode="Lightweight" Width="59px" AutoPostBack="true" OnSelectedIndexChanged="ddlFromDay_SelectedIndexChanged"></telerik:RadComboBox>
 
                                                <telerik:RadLabel ID="lblToDay" runat="server" Text="To Day" Skin="MetroTouch" RenderMode="Lightweight"></telerik:RadLabel>
 
                                                <telerik:RadComboBox ID="ddlToDay" runat="server" Filter="StartsWith" Skin="MetroTouch" RenderMode="Lightweight" Width="59px" AutoPostBack="true" OnSelectedIndexChanged="ddlToDay_SelectedIndexChanged"></telerik:RadComboBox>
                                            </telerik:LayoutColumn>
                                            <telerik:LayoutColumn Span="6" CssClass="tdmakeleft">
                                                <telerik:RadLabel ID="lblof" runat="server" Text="of" Skin="MetroTouch" RenderMode="Lightweight"></telerik:RadLabel>
                                                <telerik:RadComboBox ID="ddlMonth" runat="server" Filter="StartsWith" Skin="MetroTouch" RenderMode="Lightweight" Width="100px" AutoPostBack="true" OnSelectedIndexChanged="ddlMonth_SelectedIndexChanged"></telerik:RadComboBox>
                                                <telerik:RadComboBox ID="ddlYear" runat="server" Filter="StartsWith" Skin="MetroTouch" RenderMode="Lightweight" Width="100px" AutoPostBack="true" OnSelectedIndexChanged="ddlYear_SelectedIndexChanged"></telerik:RadComboBox>
                                            </telerik:LayoutColumn>
                                        </Columns>
                                    </telerik:LayoutRow>
                                </Rows>
                                <Rows>
                                    <telerik:LayoutRow>
                                        <Columns>
                                            <telerik:LayoutColumn Span="12" CssClass="tdmakeright">
                                                <asp:Literal ID="litTargetSales" runat="server"></asp:Literal>
                                            </telerik:LayoutColumn>
                                        </Columns>
                                    </telerik:LayoutRow>
                                </Rows>
                            </telerik:RadPageLayout>
                        </fieldset>
nithinraj
Top achievements
Rank 1
 asked on 25 Feb 2017
0 answers
96 views

Hi,  I have a site running on an unsupported version of windows.  I is using older RadControls (i.e. RadAjax.Net2.dll version 1.7.1.0) and functions well, but I need to move it to a supported version of windows server.  Of course any older VS project or installation media or documentation is missing.  I've moved the root directory to the new server and configured IIS as best I can.  I've created a new web project in VS2015The RadControls are not functioning.

Can anyone point me to documentation/resources to troubleshoot the issue.

 

Thanks

 

Art
Top achievements
Rank 1
 asked on 24 Feb 2017
0 answers
157 views

I have a RadAsyncUpload button on my form. When it displays the right border of the Select button is cut off. What am I doing wrong? You can see the table borders so I know I have plenty of room.

 

<td>
                                                                <telerik:RadAsyncUpload RenderMode="Lightweight" ID="productImportFile" runat="server" Skin="WebBlue" MaxFileInputsCount="1" Width="221px">
                                                                    <FileFilters>
                                                                        <telerik:FileFilter Description="Text(txt)" Extensions="txt" />
                                                                    </FileFilters>
                                                                </telerik:RadAsyncUpload>
                                                            </td>

 

 

David
Top achievements
Rank 1
 asked on 24 Feb 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?