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

We've just noticed a problem with the DropDownList in the Chrome Browser on Android devices (might effect other version).

When the web page is zoomed the position of the Drop Down moves out of alignment. The greater the zoom level the more it is out of alignment.

I've attached 2 screen shots:

  • Small_OK - standard zoom where everything is fine.
  • Zoom_Wrong - a zoomed view where the position of the drop down has moved down the screen. (Below the Asset Type drop down)

We are using the latest version of ASP.NET Ajax controls: 2015.3.1111

Let me know if you would like any further information.

Thanks,

Rob

Viktor Tachev
Telerik team
 answered on 24 Dec 2015
2 answers
266 views

I have a RadRating element for each row in a RadGrid, and need to get the associated Id for the row where the RadRating is being Rated (but with Javascript), however, the get_parent() method is returning the grid reference and not the row.

How can I get the GridDataItem of the row of the RadRating?

The following code works sometimes but not all the time. What am I doing wrong?

 

<script type="text/javascript">
    (function(global,undefined) {
 
        function OnClientRating(controlRating,args) {
            var row = controlRating.get_parent();
            var userId = row.getDataKeyValue("UserId");
        }
 
        global.OnClientRating = OnClientRating;
 
    })(window);
</script>
 
<rad:RadGrid runat="server" ID="gridUsers" Skin="Hay"
            EnableAJAX="False"
            AutoGenerateColumns="False"
            GridLines="Both"
            Width="100%"
            AllowSorting="True"
            OnItemDataBound="Grid_ItemDataBound">
    <MasterTableView DataKeyNames="UserId" ClientDataKeyNames="UserId">
        <Columns>
            <rad:GridTemplateColumn HeaderText="Name" HeaderStyle-Width="180px" ItemStyle-Width="180px">
                <ItemTemplate>
                    <%# Eval("FullName")%>
                </ItemTemplate>
            </rad:GridTemplateColumn>
            <rad:GridTemplateColumn HeaderText="Rating" HeaderStyle-Width="100px" ItemStyle-Width="100px">
                <ItemTemplate>
                    <rad:RadRating ID="ratAppraiserRating" runat="server" ItemCount="5" Value='<%# Eval("AverageRating")%>'
                        SelectionMode="Continuous" Precision="Item" Orientation="Horizontal" OnClientRating="OnClientRating"
                        OnRate="RatRating_Rate" AutoPostBack="true" />
                </ItemTemplate>
            </rad:GridTemplateColumn>
            </Columns>
    </MasterTableView>
    <ClientSettings>
        <Scrolling UseStaticHeaders="false" ScrollHeight="240px"  AllowScroll="true"  />
        <Selecting AllowRowSelect="false" />
        <ClientEvents OnRowDblClick="selectRow" />
    </ClientSettings>
</rad:RadGrid>

Viktor Tachev
Telerik team
 answered on 24 Dec 2015
4 answers
1.3K+ views
I am trying to do validation on my multiPages which are part of my radtabStrip on each click of the radtab.  I am trying to the get the selected index of each tab so that I know which one I am on to do the validation.

I must say I give the new site and F, what a frustrating new site.

<telerik:RadTabStrip ID="radESGRTab" runat="server" Orientation="HorizontalTop" MultiPageID="radPageMulti" ClickSelectedTab="true" Skin="Web20" Font-Bold="true" Font-Size="Large" Width="800px" OnClientMouseOver="tabEmployer" OnClientTabSelected="CheckValidation">
              <Tabs>
                  <telerik:RadTab PageViewID="rdPageInfo" Text="Soldier Info" runat="server" SelectedIndex="1"></telerik:RadTab>
                  <telerik:RadTab PageViewID="rdPageEmploy" Text="Employer Info" runat="server" SelectedIndex="2"></telerik:RadTab>
                  <telerik:RadTab PageViewID="rdpageSurvey" Text="Survey Info" SelectedIndex="3"></telerik:RadTab>
                  <telerik:RadTab PageViewID="rdPageAwards" Text="Employer Awards" SelectedIndex="4"></telerik:RadTab>
              </Tabs>
          </telerik:RadTabStrip>



function CheckValidation() {
           var tab1 = $find('<%=radESGRTab.ClientID %>').selectedIndex();
            
           if (tab1 == 1) {
               var combo = $find('<%= ddlSoldCounty.ClientID %>');
               var item = combo.get_selectedItem().get_value();
               alert(combo.get_selectedItem().get_value());
               if (item == 1) {
                   alert('You must pick a county from Drop Down List');
               }
           }
       }
   </script>
Ivan Danchev
Telerik team
 answered on 24 Dec 2015
1 answer
1.1K+ views

Hi

I want to refresh/rebind all child grids (child2 gridtableview) on edit/insert case of chid1 (gridtableview), child1 and chid2 are on same level in Detail tables of RadGrid.

I am using update command function to insert/edit records in chid1.

After completing insert/edit case of child1 gridview rebind automatically while the other child2 on same level contain old data, i want to refresh/rebind the child2 grid as well.

Here is code structure for understanding... 

 

<telerik:RadGrid ID="PlEmployee" runat="server" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True"

OnUpdateCommand="PlEmployee_UpdateCommand"

<DetailTables> 

    <telerik:GridTableView runat="server" Name="Child1">

     <telerik:GridTableView runat="server" Name="Child2">  

 </DetailTables>

 </telerik:RadGrid>

 

Regards,

Zain

Vasil
Telerik team
 answered on 24 Dec 2015
3 answers
185 views

Hi team,

 I am having listview, I want to add treeview inside listview.

And the listview should be combobox same like in this demo

Treeview in Combobox

 

Please help me how to do this.

aspx page

 

<telerik:RadListView ID="rlvUsers" runat="server"
                              ItemPlaceholderID="EmployeesContainer" DataKeyNames="userid" OnItemDataBound="rlvUsers_ItemDataBound">
                              <LayoutTemplate>
                                  <fieldset>
                                      <legend>New Employees - Manage Profiles</legend>
                                      <asp:PlaceHolder ID="EmployeesContainer" runat="server"></asp:PlaceHolder>
                                  </fieldset>
                              </LayoutTemplate>
                              <ItemTemplate>
                                  <fieldset>
                                      <legend class="gray"><%#Eval("fullName")%></legend>
                                      <table style="line-height: 30px; padding: 60px; width: 100%">
                                          <tr>
                                              <td style="width: 120px">
                                                  <asp:Label ID="Label1" runat="server" CssClass="ax-text-gray" Text="Employee Code"></asp:Label>
                                              </td>
                                              <td>
                                                  <asp:Label ID="Label2" runat="server" CssClass="ax-input-noborder" Text='<%#Eval("empid")%>'></asp:Label>
                                              </td>
                                              <td style="width: 50px"></td>
                                              <td style="width: 120px">
                                                  <asp:Label ID="Label7" runat="server" CssClass="ax-text-gray" Text="Select Parent"></asp:Label>
                                              </td>
                                              <td>
                                                  <telerik:RadComboBox ID="cbParent" runat="server" Width="400px" >
                                                      <ItemTemplate>
                                                          <telerik:RadTreeView ID="rTreeParent" runat="server" DataFieldID="userid" DataFieldParentID="parent_id"
                                                              DataTextField="fullName" DataValueField="userid"  >
                                                          </telerik:RadTreeView>
                                                      </ItemTemplate>
                                                  </telerik:RadComboBox>
                                              </td>
                                              <td rowspan="3">
                                                  <asp:Button ID="btnAssignProfiles" CssClass="btn btn-circle btn-sky" runat="server" Text="Assign" />
                                              </td>
                                          </tr>                                         
                                      </table>
                                      <br />
                                      <br />
                                  </fieldset>
                              </ItemTemplate>
  
                          </telerik:RadListView>

code behind

 

protected void rlvUsers_ItemDataBound(object sender, RadListViewItemEventArgs e)
     {
         if (e.Item.ItemType == RadListViewItemType.DataItem || e.Item.ItemType == RadListViewItemType.AlternatingItem)
         {
             RadListViewItem item = e.Item as RadListViewItem;
             RadComboBox cbParent = (RadComboBox)item.FindControl("cbParent");
             cbParent.DataSource = getActiveUsers();
             cbParent.DataBind();
         }
     }

 

Now it is loading in combo box. But I wan this in tree inside combobox

 

Thanks

Alex

 

Eyup
Telerik team
 answered on 24 Dec 2015
1 answer
249 views

How to get value from javascript in server side using RadConfirm.

I have the following code but I am not getting any value in server side:

here my HTML code:

function ConfirmCancel() {
var confirmvalue = false;
if (!confirmvalue) {
radconfirm('CANCELLING A REQUEST IS DEFINE AS : When an employee who received original request approval never performed one day of service in the Sixth Period Coverage Program. This action might trigger the recoupment of the original payments', confirmCallBackFn); return false;
}
}
function confirmCallBackFn(arg) {
var control = $find("<%= inpHide.ClientID%>");
if (arg) {
confirmValue = true;
document.getElementById(control).value = "1";
}
else {
document.getElementById(control).value = "0";
}
}

 

<input id="inpHide" type="hidden" runat="server" />

<telerik:GridTemplateColumn HeaderText="Link to Form/Cancel Request" UniqueName="ButtonColumn" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="200px" >
<ItemTemplate>                                  <
<asp:ImageButton ID="CancelReqBtn" ImageUrl="~/Image/Cancel_button6.png" runat="server" CommandName="Cancel" ImageAlign="Right" BackColor="Transparent" ToolTip="cancel the request" Width="50px" Height="20px" Visible="false" OnClientClick="return ConfirmCancel();" />

</ItemTemplate>
</telerik:GridTemplateColumn>

 

And here is my code behind:

if (e.CommandName == "Cancel")
{
int result = int.Parse(inpHide.Value);
if (result == 0)
{
}
 But for some reason when I put breakpoint on command name it is not executing.

Please help me to solve this issue.

thanks so much

Vasil
Telerik team
 answered on 24 Dec 2015
3 answers
195 views

Hi,

Checkboxes and radiobuttons in Microsoft Edge browser with Lightweight render mode doesn't work at all!

You can see this in your demo:

http://demos.telerik.com/aspnet-ajax/formdecorator/examples/overview/defaultcs.aspx

When using classic render mode it works!

Regards
Andreas
Ianko
Telerik team
 answered on 24 Dec 2015
8 answers
421 views
I have a page that when the user clicks a link to a pdf file it opens in a radWindow for print or view, etc.

The problem is that the pdf radWindow ALWAYS opens very small, as small as it can. I can resize it, but I want it to open using the dimensions I provided below.

Here is my code:

MainPage:
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
            <script type="text/javascript"
 
                function ShowInvoice(file) { 
                    window.radopen("InvoiceWindow.aspx?file=" + file, "InvoiceWin"); 
                    return false; 
                } 
 
 
            </script> 
 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"
    <Windows> 
                        <telerik:RadWindow Skin="Sunset"  ID="InvoiceWin" runat="server" Title="Monthly Invoice" Height="800" 
                        Width="850" Left="10px" ReloadOnShow="true" Modal="true"  ShowContentDuringLoad="false" Animation="None" /> 
                </Windows> 
    </telerik:RadWindowManager> 
        </telerik:RadCodeBlock>  

InvoiceWindow.aspx:
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title>Dealership Invoice Viewer</title> 
    <script type="text/javascript"
        function GetRadWindow() { 
            var oWindow = null
            if (window.radWindow) oWindow = window.radWindow; 
 
            else if (window.frameElement.radWindow) 
                oWindow = window.frameElement.radWindow; 
 
            return oWindow; 
        } 
         
        function CloseRadWin() { 
            //get a reference to the RadWindow 
            var oWnd = GetRadWindow(); 
            //close the RadWindow 
            oWnd.close();  
        } 
     
    </script> 
</head> 
<body> 
    <form id="form1" runat="server"
    <iframe style="width:820px; height:680px;" id="iframe1" runat="server"></iframe><br /> 
    <href="#" onclick='return CloseRadWin();'><img src="images/close_win.gif" border="0" style="vertical-align: middle" /> Close Invoice</a> 
    </form> 
</body> 
</html> 
Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
            iframe1.Attributes("src") = Request("file"
 
    End Sub 

Any idea why the invoice window always opens to small?

Ianko
Telerik team
 answered on 24 Dec 2015
3 answers
287 views
Hi
I've a Radgrid.Main.resx customized for my localization (Italy).
when i update at the new version of telerik i lose the modifies of my resx.
can i recover the changes or i must rewrite all resx ?

Thanks in advance
Viktor Tachev
Telerik team
 answered on 24 Dec 2015
1 answer
120 views

Hi,

 I have an aspx page where i declared a radwindow (Contenttemplate). In that radwindow i have some text which needs to be copied to clipboard.

I tried with traditional way of copying to clipboard by using the exec("copy"). it works in IE. but it doesn't in Google Chrome (Version 47.0.2526.106)

In other page, i used radbutton for the action of copying, since it was not working i have changed it to asp button.Now its working there for IE and Chrome. that page has no controls which would collapse in the script runtime. But here the radwindow is doing some weird things of stopping that js code.

 

When in debugging, it is executing but not evaluating anything. ?

 

any work around for this?

Konstantin Dikov
Telerik team
 answered on 24 Dec 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?