Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
149 views

Hello,

I have a RadSearchBox and a HiddenField. When user selects an item, my HiddenField gets its value from item's ID. But I would like both client and server side HiddenField's value become empty when text in RadSearchBox does not correspond to the HiddenField's value.

So I tried using RadAjaxManager:

01.<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">
02.      <AjaxSettings>
03.          <telerik:AjaxSetting AjaxControlID="RadSearchBoxIns" EventName="DataSourceSelect">
04.              <UpdatedControls>
05. 
06.                  <telerik:AjaxUpdatedControl ControlID="HiddenFieldIns" />
07.                  <telerik:AjaxUpdatedControl ControlID="CustomValidatorRadSearchBoxIns" />
08.              </UpdatedControls>
09. 
10.          </telerik:AjaxSetting>
11.           <telerik:AjaxSetting AjaxControlID="RadSearchBoxIns" EventName="Search">
12.              <UpdatedControls>   
13.                   <telerik:AjaxUpdatedControl ControlID="HiddenFieldIns" />               
14.                  <telerik:AjaxUpdatedControl ControlID="CustomValidatorRadSearchBoxIns" />
15.              </UpdatedControls>
16. 
17.          </telerik:AjaxSetting>
18.      </AjaxSettings>
19.  </telerik:RadAjaxManager>

 

In both server events (  OnSearch and OnDataSourceSelect ) I set HiddenFieldIns value to the right ID or empty, respectively, but HiddenFieldIns remains the last selected value, even if user starts typing something else. In debug mode, I can see OnDataSourceSelect is hit and so, HiddenFieldIns's value is, apparently, set to an empty string. Anyway, DOM structure is not changed and when during validation this HiddenFieldIns's value is read again, it's back to its last selected value.

Could you help me to find a way to obtain the desired result?

 

Thank you in advance.

 

 

 

 

Peter Milchev
Telerik team
 answered on 08 Jan 2018
0 answers
48 views
when pressed enter in current tab's any textbox , tab goes to close.
Anil
Top achievements
Rank 1
 asked on 06 Jan 2018
2 answers
72 views

I have a page with a RadEditor and a RadWindow. When I set the editor RenderMode to Mobile or Auto the RadWindow shows up kinda screwy. Attached is what the window looks like. here are my RadEditor and RadWindow declarations:

<telerik:RadWindow ID="rwUploadAttachment" runat="server" NavigateUrl="UploadAttachment.aspx"
    OnClientClose="rwUploadAttachment_ClientClose" OffsetElementID='<%# lbtnUploadAttachment.ClientID %>'
    OpenerElementID='<%# lbtnUploadAttachment.ClientID %>' Behaviors="Resize, Close, Move"
    Modal="True" ReloadOnShow="True" Height="325px" VisibleStatusbar="False" Width="550px"
    Animation="Fade" />
<telerik:RadEditor ID="reBody" runat="server" ToolsFile="~/RadEditorToolsFile.xml" NewLineMode="Br" AutoResizeHeight="true"
    EditModes="Design" Width="100%" Skin="Metro" RenderMode="Mobile">
    <SpellCheckSettings DictionaryPath="/_layouts/SpellCheckDictionaries/" AllowAddCustom="false" />
    <Languages>
        <telerik:SpellCheckerLanguage Code="en-US" Title="English" />
        <telerik:SpellCheckerLanguage Code="es-ES" Title="Spanish" />
        <telerik:SpellCheckerLanguage Code="fr-FR" Title="French" />
        <telerik:SpellCheckerLanguage Code="de-DE" Title="German" />
    </Languages>
    <Content />
    <CssFiles>
        <telerik:EditorCssFile Value="EditContentArea.css" />
    </CssFiles>
</telerik:RadEditor>
Nikita
Top achievements
Rank 2
Iron
 answered on 05 Jan 2018
3 answers
229 views

Hi - We have a Link Button on an aspx page and clicking on the 'OnClientClick' event, we call a javascript function that would open a popup window developed using RadWindow. The business requirement is to have this popup occupy a part of the screen so that the users can fill it up using the background screen for a few references - so the users should be able to scroll thru and resize this popup window. We display an existing aspx page within this popup window.

Issue: In Chrome, when the pop-up window opens, scroll bars are visible and functional. However, on resizing the screen even a tiny bit, the scroll bars disappear. This makes it a lot harder for users to horizontally and vertically scroll thru the popup page to fill in details. This issue doesn't show up in IE 11 or Firefox. Any idea why Chrome behaves differently and are there any fixes?

Code:

1) Link Button

                        <asp:LinkButton ID="MyBtn" runat="server"  OnClientClick="openWin(); return false;" >
                               <asp:Image ID="imgMyImage" runat="server" ImageUrl="~/images/someimage.png" Width="24px" Height="24px" />
                       </asp:LinkButton>

2) openWin() javascript function:

    function openWin() {
        var oWnd = $find("<%=RadWindow1.ClientID%>");
        oWnd.show();
        });

3) Radwindow html code:

<telerik:RadWindowManager RenderMode="Lightweight" ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
        ReloadOnShow="true" runat="server" EnableShadow="true">
        <Windows>
<telerik:RadWindow RenderMode="Lightweight" ID="RadWindow1" ClientIDMode="Static" runat="server" Behaviors="Resize, Move, Close"
                    OnClientClose="OnClientClose"   NavigateUrl="~/MyPage.aspx"   MinHeight="500px" MinWidth="1000px" Title="Memo" style="z-index:10005;"  />
      </Windows>
</telerik:RadWindowManager>

 

Solutions Tried but didn't work:

a) Removed RadWindowManager and Windows and used used the RadWindow

b) Experimented with stylesheet settings to set overflow-x and y parameters for RadWindow.

c) Experimented with Autosize related attributes for RadWindow.

 

Browser versions:

Chrome: 52.0.2743.82

Firefox: 47.0.1

IE 11:11.0.9600.18376

 

Please help.

Burak
Top achievements
Rank 1
 answered on 05 Jan 2018
0 answers
41 views

Can anyone please help me to tell me on a series click, HOW can I get the name of the series that I'm clicking?  I read the support but it takes me to the Kendo support document.  I see Kendo document has these varaible that I can get on java script:

 

e.series Object
The series options.

e.seriesIndex Number
The series index.

e.text String
The name of the series.

 

So the one I'm interested is the "name"  I need to be able to go "do different things" depend on what area of the pie chart user presses.  I tried to do the client side code but it always return "nothing" or "unknown".

 

            function NameGet(args) {
                
                alert(args..text);  -- or I do args.series.name 
            }

 

 

so what is the appropriate e.xxx to get the name of the series?  Under the <teleri:PieSeries>  I have NameField="Description"  So I'm trying to get the NameField from the client side when they click on the pie chart.

 

Thank you!

 

 

Frank
Top achievements
Rank 1
 asked on 04 Jan 2018
0 answers
120 views

Hi Telerik Team,

 

Our clients want to add some scripts in the editor area and they know the risk they are facing. Whenever they input "<" ">" in the html mode, it will change to ""&lt;&gt;". I tried disabled all the content filters but I still see the change happening. I tried on your company demo site and disabled all kinds of combinations, it's the same result. 

Demo site I tried: https://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx

Can you help me out, please? Thanks in advance!

 

Lan

lan luo
Top achievements
Rank 1
Iron
 asked on 04 Jan 2018
1 answer
247 views

We are using the RadGrid's "Excel Like Filtering" for all of our grids (Web UI version 2017.2.711.40)

How can we change the width of the pop-up window so that the checkbox list can display longer items?

(See attached picture ...... this is a snapshot of your demo at https://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/excel-like-filtering/defaultcs.aspx after clicking on the "ContactTitle" column's filter icon)

We need the whole pop-up menu, and it's filter checklist box, width to be about twice as wide as the default so that items like "Assistant Sales..." won't be abbreviated.  (As you can see on the picture, because of the width of the list box, there are two "Assistant Sales..." items displayed.  If we could make the window wider, then those two items would be displayed fully and you would see "Assistant Sales Agent" and "Assistant Sales Representative" instead).  A lot of our items are abbreviated with the default width.

Thanks

Courtney

Marin Bratanov
Telerik team
 answered on 04 Jan 2018
3 answers
239 views

How do you get the column index the 'target' was moved TO?

e.Target.OrderIndex is NOT correct for where it was moved TO

Marin Bratanov
Telerik team
 answered on 04 Jan 2018
1 answer
52 views

Is there some issue when multiple RadHTMLChart are in Pagelayout?

 

If I put 2 Charts in a regular html table, they both show up fine.  But when I put them in different LayoutColumn within the same Pagelayout, only 1 chart would show up, the other won't.  The ONLY time it would show up is if I put both chart into the SAME LayoutColmn, but that's not what I want.

Thank you!

Frank
Top achievements
Rank 1
 answered on 04 Jan 2018
0 answers
106 views

I have 2 ASPX pages that use the same simple Telerik RadGrid.  Here is my ASP code for these RadGrids:

<div id="GridViewArea" style="border-style: solid; border-width:0px; margin-top: 10px; width: 600px;">
                <telerik:RadGrid ID="RadGrid1" runat="server"
                    OnItemCreated="RadGrid1_ItemCreated"
                    OnInsertCommand="RadGrid1_InsertCommand"
                    OnItemInserted="RadGrid1_ItemInserted"
                    OnItemDataBound="RadGrid1_ItemDataBound"
                    AllowAutomaticInserts="false"
                    AllowAutomaticUpdates="false"
                    OnUpdateCommand="RadGrid1_UpdateCommand"
                    AutoGenerateColumns="false">
                    <MasterTableView
                        AutoGenerateColumns="false"
                        CommandItemDisplay="Top"
                        NoMasterRecordsText="No Rides have been recorded for this rider."
                        DataKeyNames="RideID"
                        Font-Size="Medium">
                        <Columns>
                            <telerik:GridBoundColumn HeaderText="RiderID" DataField="RiderID" ReadOnly="true" Visible="false"></telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn UniqueName="DateTemplateColumn" HeaderText="Ride Date">
                                <ItemTemplate>
                                    <asp:Label ID="DateEditItemTemplate" runat="server"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "RideDate","{0:MM/dd/yyyy}") %>'>
                                    </asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadDatePicker ID="dpRideDate" UniqueName="dpRideDate" DateInput-DateFormat="MM/dd/yyyy" MinDate="1999/1/1" runat="server" DbSelectedDate='<%# Bind("RideDate") %>'>
                                    </telerik:RadDatePicker>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn UniqueName="DeputyTemplateColumn" HeaderText=" Deputy">
                                <ItemTemplate>
                                    <asp:Label ID="DeputyEditItemTemplate" runat="server"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "Deputy") %>'>
                                    </asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:DropDownList ID="ddlDeputy" runat="server" UniqueName="ddlDeputy" DataTextField="Name" DataValueField="EID" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn UniqueName="SectorColumn" HeaderText="Sector">
                                <ItemTemplate>
                                    <asp:Label ID="SectorEditItemTemplate" runat="server"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "SectorDescription") %>'>
                                    </asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:DropDownList ID="ddlSector" runat="server" UniqueName="ddlSector" DataTextField="SectorDescription" DataValueField="SectorValue" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
 
                    </MasterTableView>
                </telerik:RadGrid>
            </div>

 

Note the RadGrid is within an asp:UpdatePanel

I have 2 DropDown Lists used to add a new record to the grid and I bind these DropDown Lists in the RadGrid1_ItemDataBound Method here is that code:

 

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                using (var db = new RideTracker2018Entities())
                {
                    var sectors = (from c in db.LU_Sectors
                                   select new { c.SectorDescription, c.SectorValue }).ToList();
                    GridEditableItem item = e.Item as GridEditableItem;
                    // access/modify the edit item template settings here
                    DropDownList list = item.FindControl("ddlSector") as DropDownList;
                    list.DataTextField = "SectorDescription";
                    list.DataValueField = "SectorValue";
                    list.DataSource = sectors;
                    list.DataBind();
 
                    var deputies = (from c in db.VW_DeputyInfo
                                    select new { c.Name, c.EID }).ToList();
                    GridEditableItem item2 = e.Item as GridEditableItem;
                    DropDownList list2 = item2.FindControl("ddlDeputy") as DropDownList;
                    list2.DataTextField = "Name";
                    list2.DataValueField = "EID";
                    list2.DataSource = deputies;
                    list2.DataBind();
                }
 
            }
        }

 

The grid renders and works as planned on one page but on the second page the DDDLs will not bind.  On the second page the code to bind the lists does not run because it fails to pass the if (e.Item is GridEditableItem && e.Item.IsInEditMode).

Can anyone explain why these identical RadGrids are not working the same?

Perry
Top achievements
Rank 1
 asked on 04 Jan 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?