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

I have set a grid to go into edit mode when a row is double clicked:
<ClientEvents OnRowDblClick="RowDblClick" />
 
 
function RowDblClick(sender, eventArgs) {
        $find("<%= RadGrid1.MasterTableView.ClientID %>").editItem(eventArgs.get_itemIndexHierarchical());
  }


I want to hide the GridEditCommandColumn until a row is double clicked and put into edit mode. At this point the Save and Cancel items will be shown.
Basically I don't want to see the Edit Icon column, double click is the only way to get into edit mode.

Could you please provide some guidance on how to achieve this?

Thanks.


Maria Ilieva
Telerik team
 answered on 21 Jan 2015
2 answers
298 views
Hi,

I've recently come across what I believe are called font icons.
I've had some success using these icons by specifying SpriteCssClass on my RadToolBarButton's.

However, as soon as I specify a Skin for the toolbar, the icons do not render.
See the attached screenshots of the toolbar with and without a skin specified.

Here's my toolbar declaration (only the first 2 buttons included):

<telerik:RadToolBar ID="RadToolBar1" runat="server" RenderMode="Lightweight" Skin="Office2007" Orientation="Horizontal" EnableImageSprites="True" EnableEmbeddedSkins="True" EnableRoundedCorners="true">
    <CollapseAnimation Duration="200" Type="OutQuint" />
    <Items>
        <telerik:RadToolBarButton runat="server" Tooltip="Zoom In" SpriteCssClass="icon-TBi__Zoomin toolBarIconStyle">
        </telerik:RadToolBarButton>
        <telerik:RadToolBarButton runat="server" Tooltip="Zoom Out" SpriteCssClass="icon-TBi__Zoomout toolBarIconStyle">
        </telerik:RadToolBarButton>
    </Items>
</telerik:RadToolBar>

Any suggestions as to how to make this work.

Thanks in advance.

Jim






Ivan Zhekov
Telerik team
 answered on 21 Jan 2015
3 answers
272 views

I have a RadComboBox and I fill it on demand as the user types. No problems.
Now, if the ComboBox has an existing value on page load, and the user deletes it (via "x" or backspace),
the client-side .get_value() and the server-side.SelectedValue() still show the old value.

This is a problem because I check the value before saving, etc. In essence, the user deletes the value (text = "") but it still saves because the checks (client or server) show the value as still being there.

This was working for some time but has broken recently in our Prod version (2013.3.1324 - Q3 2013 SP2 ) and our Test/QA version (latest 2014.3.1209 - Q3 2014 SP1).

Client-side code below:

<telerik:RadComboBox ID="ddlPName" runat="server" CssClass="cert" Width="269px" Height="150px"
 CollapseAnimation-Duration="0" CollapseDelay="0" CloseDropDownOnBlur="true" Skin="Vista"
 EmptyMessage="Type Name" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
 EnableVirtualScrolling="true" OnItemsRequested="ddlPName_ItemsRequested" DropDownWidth="269"
 MarkFirstMatch="false" OnClientSelectedIndexChanged="NameSelectedIndexChanged"
 OnClientDropDownOpened="onClientDropDownOpened" OnClientDropDownClosed="ddlPName_OnClientDropDownClosed"
 OnClientItemsRequestFailed="OnComboCallbackError" OnClientItemsRequesting="onItemsRequesting"
 OnClientTextChange="OnDDLTextChange">

</telerik:RadComboBox>function OnDDLTextChangeICD9(sender, args) {
 if (sender.get_value() == "") {
  sender.set_text("");
 }
}


Thanks for any ideas,
Robert




Nencho
Telerik team
 answered on 21 Jan 2015
1 answer
79 views
OK I was working with the radgrid export functionality and when I press the export button it does a postback and it updates the page with all the rows, and then nothing.

See the attached images. as soon as I click the pdf or csv export buttons on the grid or the separate buttons it re-renders the page with all the records but does not open the PDF or the CSV.

I think I am missing something simple, for I have used export a lot and not had this issue. I am using the most current code base. here is my button code, its really straight forward.

       Protected Sub ExportPDF_Click(sender As Object, e As EventArgs) Handles ExportPDF.Click

            RadGrid1.PageSize = RadGrid1.MasterTableView.VirtualItemCount
            RadGrid1.ExportSettings.IgnorePaging = True
            RadGrid1.ExportSettings.OpenInNewWindow = True
            RadGrid1.MasterTableView.ExportToPdf()
        End Sub



What is going on?


Daniel
Telerik team
 answered on 21 Jan 2015
1 answer
89 views
Hey there,

I have a grid with a default filters - a TextBox and a button next to it to choose filter type ("Contains", "GreaterThan", "LessThan" and so on). Now when I press on it with the mouse - the dropdown list slides down from the point where my mouse is, but if I tab on that button and press "Enter" or "Space" - this dropdown slides from the screen possition "0, 0" (very left top of the screen). Is there a way to change default coords  so that the dropdown would slide down from the button instead of top left of the screen?
(attached an image with example how it looks)

Thanks for any thoughts on how to fix that.

BR,
Modestas.
Eyup
Telerik team
 answered on 21 Jan 2015
1 answer
110 views

RadMenu does not work in ios8.
Dimitar
Telerik team
 answered on 21 Jan 2015
1 answer
208 views


I bind records using RadGrid, and each row it has a link
button. If I click the link, it will open the moalpopup (it is dynamic
one based on some condition). When I close the popup using close button,
it should continue with the link button event.

Code Behind:

protected void grid_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item.ItemType == GridItemType.AlternatingItem || e.Item.ItemType == GridItemType.Item)
{
LinkButton link = ((LinkButton)gridDataItem.FindControl("link"));
ModalPopupExtender popup = (ModalPopupExtender)e.Item.FindControl("popup");
Image imageClose = (Image)e.Item.FindControl("imageClose");
popup.TargetControlID = link.ID;
link.Attributes.Add("onclick", "return false;"); // to avoid postback and stay in page and show popup
imageClose.Attributes.Add("onclick", "proceed('" + link.ClientID + "')");
}
}

Javascript:

function proceed(id)
{
window.document.getElementById(id).removeAttribute("onclick"); // Link button - to remove "onclick" attribute
window.document.getElementById(id).click(); // trigger click event
}

I tried with the above code, the attribute not removed and not continue with link button event.

Jesuraja
Top achievements
Rank 1
 answered on 21 Jan 2015
6 answers
127 views
RadCloudUpload for Amazon and Azure client side. The Documentation says that ", the selected files are directly transferred to the cloud storage. No files are kept on the hard drive of the server" . Does this means the files will be transferred from the clients PC to the cloud directly? . or does the data needs to be uploaded via server ?.
Ross
Top achievements
Rank 1
 answered on 20 Jan 2015
1 answer
83 views
I was trying to use the ColumnCreating event in radgrid, and it appears I cannot reference Telerik.Web. Is that included in the files of "UI for WinForms"?
Marin Bratanov
Telerik team
 answered on 20 Jan 2015
2 answers
329 views
I have been looking at the TabStrip - Add/Remove Tabs demo and trying to modify to work with RadMenu and a Radspliter. I have condensed all the code into 1 single simple file. Any help would be great. When i click the RadMenu to add a new it adds a new tab but the corresponding pageview doesnt display. Then if i click over to the third tab, and back to the second tab, the second tab now shows the contents from the third tab. 

Thanks, any advise or help would be great!!

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Register Src="WebUserControl.ascx" TagPrefix="uc1" TagName="NewMessage" %>
<!DOCTYPE html>
 
<script runat="server">
 
    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  {
        DataTable dt = new DataTable();
        dt.Columns.Add("EmployeeID");
        dt.Columns.Add("LastName");
        dt.Columns.Add("FirstName");
        dt.Columns.Add("Title");
        dt.Columns.Add("ReportsTo");
 
        dt.Rows.Add(new object[] { 1, "Davalio", "Nancy", "Sales Representative", 2 });
        dt.Rows.Add(new object[] { 2, "Fuller", "Andrew", "Vice President, Sales", null });
        dt.Rows.Add(new object[] { 3, "Leverling", "Janet", "Sales Representative", 2 });
        dt.Rows.Add(new object[] { 4, "Peacock", "Margaret", "Sales Representative", 2 });
        (sender as RadGrid).DataSource = dt;
    }
 
    protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e) {
        if (e.Item.Text == "Add Tab")
        {
            AddPageView(true, ID.ToString());
            AddTab("New Message");
        }
    }
 
    private void AddTab(string title)
    {
        RadTab tab = new RadTab() { Text = title };
        RadTabStrip1.Tabs.Insert((RadTabStrip1.Tabs.Count - 1), tab);
        RadTabStrip1.DataBind();
        RadTabStrip1.SelectedIndex = tab.Index;
    }
 
    private void AddPageView(bool isNew, string pvId)
    {
        RadPageView pageView = new RadPageView();
        pageView.ID = "NewMessage" + pvId;
   
        RadMultiPage1.PageViews.Add(pageView);
        RadMultiPage1.SelectedIndex = pageView.Index;
    }
 
    protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
    {
        if (e.PageView.ID.Contains("NewMessage"))
        {
            RadButton b = new RadButton();
            b.Text = "NEW TAB!!";
            e.PageView.Controls.Add(b);
        }
    }
     
</script>
 
<head runat="server">
    <title></title>
    <style>
        html,
        body,
        form {
            height: 100%;
            margin: 0px;
            padding: 0px;
        }
         
        .header {
            height: 20px;
            background: blue;
            color: white;
        }
 
       .menu {
            height: 40px;
            background: black;
            color: white;
        }
 
        .footer {
            height: 20px;
            background: blue;
            color: white;
        }
 
    </style>
</head>
<body>
    <form id="form1" runat="server">
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableTheming="True">
      </telerik:RadScriptManager>
     
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function onClientTabSelecting(sender, args) {
                var tab = args.get_tab();
                if (tab.get_pageView()) {
                    tab.set_postBack(false);
                }
            }
        </script>
    </telerik:RadCodeBlock>
 
 
   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
 
        <div class="header">Footer</div>
        <div class="menu">
             <telerik:RadMenu ID="RadMenu1" runat="server" EnableScreenBoundaryDetection="false" ClickToOpen="false"
                  onitemclick="RadMenu1_ItemClick" EnableOverlay="true" EnableRoundedCorners="true" EnableShadows="true" Flow="Horizontal">
                        <Items>
                            <telerik:RadMenuItem runat="server" Text="Menu" GroupSettings-ExpandDirection="Down" OffsetX="5">
                                <Items>
                                    <telerik:RadMenuItem runat="server" Text="Add Tab"/>
                                </Items>
                            </telerik:RadMenuItem>
                         
                        </Items>
             </telerik:RadMenu>
        </div>
    
       <telerik:RadSplitter runat="server" id="InnerSplitter" Orientation="Vertical" VisibleDuringInit="false" Height="800px" Width="100%" Skin="Vista" >
 
              <telerik:RadPane ID="LeftMenuPane" runat="server" Scrolling="None" Height="100%" Width="27%" ShowContentDuringLoad="false" >
              
              <telerik:RadTabStrip ID="RadTabStrip2" ShowBaseLine="True" runat="server" MultiPageID="RadMultiPage2" Skin="Office2007" SelectedIndex="0" OnClientTabSelecting="onClientTabSelecting">
                  <Tabs>
                      <telerik:RadTab runat="server" Text="Tab1" PageViewID="PageView6" Font-Bold="true" >
                      </telerik:RadTab>
                  </Tabs>
              </telerik:RadTabStrip>
 
               <telerik:RadMultiPage ID="RadMultiPage2" runat="server" SelectedIndex="0"  Width="100%">
 
                 <telerik:RadPageView ID="RadPageView6" runat="server" width="100%" Height="760px"  >  
                        <%-- >>RADGRID--%>
                        <telerik:RadGrid ID="RadGrid1" Height="100%" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"
                            AllowSorting="true">
                            <MasterTableView Width="100%" TableLayout="Fixed" AutoGenerateColumns="false">
                                <Columns>
                                    <telerik:GridBoundColumn DataField="EmployeeID" HeaderText="EmployeeID"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="LastName" HeaderText="LastName"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="FirstName"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="ReportsTo" HeaderText="ReportsTo"></telerik:GridBoundColumn>
                                </Columns>
                            </MasterTableView>
                            <ClientSettings>
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                            </ClientSettings>
                        </telerik:RadGrid>
                        <%-- <<RADGRID--%>
                 </telerik:RadPageView>
 
               </telerik:RadMultiPage>
              </telerik:RadPane>
 
       <telerik:RadSplitBar runat="server" id="RadSplitBar4" Height="700px" />
            <telerik:RadPane ID="RightMenuPane" runat="server" Scrolling="None" Height="100%" ShowContentDuringLoad="true" >      
 
<telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1">
 <Tabs>
   <telerik:RadTab runat="server" Text="Root RadTab1" PageViewID="PageView1">
   </telerik:RadTab>
   <telerik:RadTab runat="server" Text="Root RadTab3" PageViewID="PageView3">
   </telerik:RadTab>
 </Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage id="RadMultiPage1" runat="server" SelectedIndex="0" Width="400">
  <telerik:RadPageView id="PageView1" runat="server">
       TAB
  </telerik:RadPageView>
  <telerik:RadPageView id="PageView3" runat="server" ContentUrl="http://www.telerik.com">
  </telerik:RadPageView>
</telerik:RadMultiPage>
    
           </telerik:RadPane>
 
       </telerik:RadSplitter>
 
        <div class="menu">Footer</div>
    </form>
</body>
</html>

Ivan Danchev
Telerik team
 answered on 20 Jan 2015
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?