Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
154 views
So I have a print image as part of my radgrid.  What I want to do is hide the image button of there is nothing existing for the linkbutton becuase I hide duplicates of the link button.  So where the linkbutton is not there I want to also hide the printer image.

<telerik:RadGrid ID="myRadGridFin" runat="server" Width="100%" BorderWidth="1px" CellPadding="6" GridLines="None" BorderColor="#404040" Skin="Web20">
                                   <MasterTableView AutoGenerateColumns="false" DataKeyNames="intRecId" Name="MasterGrid" BorderColor="#404040" Font-Size="9" Font-Names="Veranda,arial,sans-serif"
                                       HeaderStyle-HorizontalAlign="Center" GridLines="Both" BorderWidth="1px"><AlternatingItemStyle BackColor="#B0C4DE"  HorizontalAlign="Center" /><ItemStyle HorizontalAlign="Center" />
                                       <HeaderStyle ForeColor="White" Font-Bold="true" BorderColor="#404040" BorderWidth="1px" />
                                           <Columns>
                                               <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" ConfirmText="Are you sure you want to delete item from turn-in" />
                                               <telerik:GridTemplateColumn>
                                                   <ItemTemplate>
                                                       <asp:Image ID="imgPrint" runat="server" ImageUrl="~/Images/Printer.png" style="cursor:pointer" />
                                                   </ItemTemplate>
                                               </telerik:GridTemplateColumn>
                                               <telerik:GridTemplateColumn HeaderText="DDN">
                                                   <ItemTemplate>
                                                       <asp:LinkButton ID="lnkAdd" runat="server" Text='<%# bind("strDDN") %>' ToolTip="Click to Add Equipment to Doc Number" CommandName="Add" CommandArgument='<%#Bind ("strDDN") %>'></asp:LinkButton>
                                                   </ItemTemplate>
                                               </telerik:GridTemplateColumn>
                                               <telerik:GridTemplateColumn HeaderText="CATEGORY">
                                                   <ItemTemplate>
                                                       <asp:Label ID="lblCategory" runat="server" Text='<%# Bind("strCategory") %>'></asp:Label>
                                                       <asp:Label ID="lblCatId" runat="server" Text='<%#bind ("intCategoryId") %>' Visible="false"></asp:Label>
                                                   </ItemTemplate>
                                               </telerik:GridTemplateColumn>
                                               <telerik:GridBoundColumn DataField="strSN" HeaderText="SN" />
                                               <telerik:GridBoundColumn DataField="Equip" HeaderText="EQUIPMENT" />
                                               <telerik:GridBoundColumn DataField="Location" HeaderText="LOCATION" />
                                           </Columns>
                                   </MasterTableView>
                               </telerik:RadGrid>



Protected Sub myRadGridFin_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles myRadGridFin.ItemDataBound
       If (TypeOf e.Item Is GridDataItem) Then
           Dim img As Image = e.Item.FindControl("imgPrint")
           Dim lnk As LinkButton = e.Item.FindControl("lnkAdd")
           If lnk.Text = " " Then
               img.Enabled = False
               img.Visible = False
           End If
       End If
   End Sub


I also tried using it as an e.item.cell(?).text but this did not work either becuase it sees it as a linkbutton column I believe.
Kevin
Top achievements
Rank 1
 answered on 30 Mar 2012
3 answers
431 views
Hello,
I have a RadGrid inside a Webpart.  Its a non-visual webpart.
I am binding the grid to a Datasource of List<T>.
Every column is being returned from the datasource so I turned off AutoGenerateColumns to remove the extra columns and control what is painted on the screen.

Now the grid always displays "No records to display"...

The radgrid is created in the CreateChildControls override event:
radGridViewSearch = new RadGrid();
           radGridViewSearch.AutoGenerateColumns = false;
           radGridViewSearch.AllowPaging = true;
           radGridViewSearch.PageSize = 25;
           radGridViewSearch.NeedDataSource += new GridNeedDataSourceEventHandler(radGridViewSearch_NeedDataSource);
           this.Controls.Add(radGridViewSearch);


I am adding only one column to see if I can remove the possible reasons for the error:
GridBoundColumn colFacilityID = new GridBoundColumn();
           colFacilityID.DataField = "Facility";
           colFacilityID.HeaderText = "Facility";
           radGridViewSearch.Columns.Add(colFacilityID);


And the NeedDataSource event is used:
void radGridViewSearch_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {           
            lionRepository = new LionBCSRepository();
            radGridViewSearch.DataSource = lionRepository.BuildMatterDataSet(txtMatterNameSearch.Text.Trim(), txtContractNameSearch.Text.Trim(), txtPhysicianNameSearch.Text.Trim());
        }


I can see that 40+ records are returned, but its not binding them - is this some strange page life cycle issue?


Please help
Marin
Telerik team
 answered on 30 Mar 2012
1 answer
499 views
<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="RadControlsWebApp3._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        press enter key when the textbox has focus with empty string.
        <telerik:RadTextBox runat="server" ID="TextBox1" >
        </telerik:RadTextBox>
        <telerik:RadButton runat="server" ID="Button1" Text="do not click" UseSubmitBehavior="true"></telerik:RadButton>
 
        <asp:Label runat="server" ID="label1"></asp:Label>
    </div>
    <asp:RequiredFieldValidator ID="RequiredFieldValidatorTextBox1" runat="server"
        Display="None" SetFocusOnError="true" ErrorMessage="please type anything."
        ControlToValidate="TextBox1"
        ValidationGroup="test1"></asp:RequiredFieldValidator>
    <asp:ValidationSummary ID="ValidationSummarySave" runat="server" ShowSummary="false"
        ShowMessageBox="true" ValidationGroup="test1" />
    </form>
</body>
</html>
Hello.

I have a problem with RadButton UseSubmitBehavior property.

I put the RadTextbox and RequiredValidator control.
and set the UseSubmitBehavior ="true" on the Radbutton.

when radtextbox is empty and i press enter key, the radbutton is not submitted like automatically click

i'm using latest telerik hotfix version  ( 2012.1.320.40) and I had no problem since previous telerik version (2011.915)

please let me know how to solve this problem.
i'm attaching sample code.

Slav
Telerik team
 answered on 30 Mar 2012
3 answers
203 views
Hello,

The following under mentioned css doesn't work in IE8 for radgrid headerstyle-css.
background: -moz-linear-gradient(center top , #4C5766 0%, #313841 99%) repeat scroll 0 0 transparent !important;

I tried this in case of firefox, and it worked,
    .RadGrid_Default .rgHeader, .RadGrid_Default .rgHeader
    {
          background: -moz-linear-gradient(center top , #4C5766 0%, #313841 99%) repeat scroll 0 0 transparent !important;
    border: 1px solid #313841 !important;
    height:35px;
    }

but, for IE it shows white header with border on all sides for headers, but the background css doesn't workout,
any help on this will be highly appreciated, its urgent please help!

Thanx in advance!
Peeyush
Top achievements
Rank 1
 answered on 30 Mar 2012
4 answers
125 views
Hi all,

I'm hoping someone can help with a problem I'm having concerning tabstrip, pageviews and ajax updates.

I have a MultiPage in place with several tabs, and each tab relates to a PageView that in turn contains UserControls.
I have a RadAjaxManager on the main page containing these tabs, and I'm also using a RadAjaxManagerProxy control on each of the UserControls.
I need to communicate between two of these pageviews and usercontrols but I'm having a problem with a particular piece of functionality.
To make it easier to understand I have a "Garment" tab/UserControl that allows customisation of a garment.  As a result of changes to the garment, I'd like to update a second tab/pageview ("Branding").  I currently have this working when an "Update" button is clicked on the garment tab that updates an ajaxed datalist on the branding tab (by calling a public subroutine).  It seems to work great.
This is based on using an @ Reference tag on the Garment usercontrol, casting an object to this control and then calling the subroutine. 

However, there is a situation where if a certain garment is selected, I'd like to be able to show/hide a placeholder on the Branding tab when a radcombobox selectedindexchanged event is fired.  I have a public sub on the Branding usercontrol that DOES get called (tested using ajaxpanel.alert), but the placeholders and other controls contained within it do not update.  This is doing my head in! :-)

Can anyone suggest why the datalist in the Branding usercontrol can be updated based on an event on the Garment usercontrol, and that a subroutine IS being called for the placeholder update, but the PH doesn't update?

I hope that makes sense and appreciate any insights you may have.

Cheers
Rich
Maria Ilieva
Telerik team
 answered on 30 Mar 2012
1 answer
117 views
I am trying to setup Google Author Attribution that requires me to have a link from my blog profile that is on a DotNetNuke site using RadEditor to my Google+ profile. And the link has to include a rel="me" parameter. But for some reason I cannot get the RadEditor to save the rel="me" parameter. When I put it in using HTML view and save it then it isn't there when I go back. I know how to edit the Editor settings in DNN but I don't know what I might change that would allow me to save the parameter. 
Rumen
Telerik team
 answered on 30 Mar 2012
2 answers
66 views
Hi All,

I have 2 RagGrids under a RadAjaxPanel. I need to update the 2nd RadGrid as per the selection in the first. I can't achieve this.

Note: I have used the above controls inside a content panel hold by a Master page.

Masterpage.master
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="Telerik" %>
<body>
  <form id="form1" runat="server">
  <Telerik:RadScriptManager ID="radScriptManager1" runat="server">
  </Telerik:RadScriptManager>
..
..

Default.aspx

    <radA:AjaxLoadingPanel ID="lp" runat="server" ...>
        <asp:Image ID="Image1" runat="server" ImageUrl="~/RadControls/Ajax/Skins/Default/loading.gif"
            BorderWidth="0px" AlternateText="Loading"></asp:Image>
    </radA:AjaxLoadingPanel>
    <radA:RadAjaxPanel ID="ajaxPanelSearch" runat="Server" ... />
     <div>
    
        <radG:RadGrid ID="RGrid1" runat="server" ... .... ... >
        .....
        .....
        </radG:RadGrid>

        <radG:RadGrid ID="RGrid2" runat="server" ... .... ... >
        .....
        .....
        </radG:RadGrid>

    </div>
    </radA:RadAjaxPanel>


Can anyone help on solving this.?

Thanks.
Chilambarasan
Top achievements
Rank 1
 answered on 30 Mar 2012
8 answers
340 views
Hello

I need to export a RadEditor to a RTF, but I need to do it silently on the server and not popup a saveas window to the user. How can I achieve this please ?

Regards
Mihai
Rumen
Telerik team
 answered on 30 Mar 2012
2 answers
281 views
HI,

recently we have upgraded RadControls

for ASP.NET AJAX Q1 2010 to ASP.NET AJAX Q1 2012.

 


i am trying

to open Tooltip on a button click in RadToolBar in javascript. the Tooltip is showing relative to the element. the problem is when page is posted back and i try to open the tooltip it is not showing relative to element (RadToolBar) even though i am setting the targetcontrol on client side.

need some help to resolve this issue.

please find the code below

Contentpage javascript:

 

function

 

 

OnToolbarClientButtonClicking(sender, args) {

 

 

 

var button = args.get_item();

 

 

 

var sCommandName = button.get_commandName();

 

 

 

//alert(button.get_commandName());

 

 

 

 

 

 

 

 

if (sCommandName == 'add') {

 

 

 

var hidManage = '<%=hidManageId.ClientID %>'

 

 

 

 

 

ShowToolTip(document.getElementById(hidManage).value);

args.set_cancel(

 

true);

 

}

 

 

 

 

}


User Control:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SearchUploadContainer.ascx.cs"
    Inherits="AppWeb.ControlLibrary.SearchUploadContainer" %>
<%@ Register Assembly="WebControlLib" Namespace="WebControlLib" TagPrefix="ccl" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<link rel="stylesheet" type="text/css" href="../StyleSheet.css" />
<ccl:WTToolTip runat="server" ID="wtToolTip" IsClientID="true" TargetControlID="ManageToolbar" AutoCloseDelay="0"
    ShowEvent="FromCode" HideEvent="FromCode" RelativeTo="Element" Position="MiddleRight"
    EnableTheming="true" Modal="true" Width="230px" Height="400px" OnClientShow="SetFocus" >
    <div class="contentBlock" style="width: 220px">
        <telerik:RadScriptBlock ID="rsb" runat="server">
function ShowToolTip(manage, appttype, dtDate, slotId) {
                   
                    var tooltip = $find("<%=wtToolTip.ClientID%>");
                    var txt = $find("<%=txtContainer.ClientID%>");
                   

                    tooltip.set_targetControlID('');
                    tooltip.set_targetControlID(manage);

                  

                    if (appttype != null && appttype != undefined) {
                        document.getElementById("<%=hdnApptType.ClientID%>").value = appttype;
                    }

                    if (dtDate != null && dtDate != undefined) {
                        document.getElementById("<%=hdnDate.ClientID%>").value = dtDate;
                    }

                    if (slotId != null && slotId != undefined) {
                        document.getElementById("<%=hdnSlotSchedule_id.ClientID%>").value = slotId;
                    }

                    EnableDisableControls();
                   
                    //setTimeout(function () {
                        tooltip.show();
                    //}, 1000);

                    //tooltip.show();
                    SetFocus();

                }
</telerik:RadScriptBlock>
        <h2 class="contentBlockTop" style="text-align: left; width: 210px;">
            <ccl:WTLabel ID="lblContentTopText" runat="server" Width="210px"></ccl:WTLabel>
            <asp:HiddenField ID="hidManageId" runat="server" />
            <asp:HiddenField ID="hdnApptType" runat="server" />
            <asp:HiddenField ID="hdnDate" runat="server" />
            <asp:HiddenField ID="hdnSlotSchedule_id" runat="server" />
        </h2>
</ccl:WTToolTip>

Jay
Top achievements
Rank 1
 answered on 30 Mar 2012
1 answer
144 views
Hello all,

am using Rad Scheduler control in VS 2010 to display meetings on each day in monthly view. But there seems to be a problem with width settings as the meetings scheduled only on current date(i.e today) is shown in correct form. Please find the attached screenshot of the page. Meeting is correctly showing on 29th (today), but there are meetings on other days (eg: 28th, 30th) and it's not getting displayed in the expected format.

Requesting help to fix the issue.

Ivana
Telerik team
 answered on 30 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?