Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
130 views
I want to reduce the width of the tooltip box border and also tweak it so that the text is properly centered - in all the samples and in my code the text seems to have some left padding but no right padding - and the outer box is horribly fat.

Any way yet to adjust this or is this another Qx development?

Anything that can be done with a jquery fudge?

I'm really trying to get this working so I can get rid of my old DevExpress charts!

Regards

Jon
Jon
Top achievements
Rank 1
 answered on 15 Apr 2013
4 answers
187 views
We designed our Login page and used radCaptcha along with Generate New Image (EnableRefreshImage Option) and Vision Impaired (CaptchaImage.EnableCaptchaAudio Option).  These option links are working fine in IE and FireFox but not in Chrome.  In Chrome these are rendered like static text.  I am attaching image of Login page.  Following is the code I am using in Login page. 

This is the ASPX code
<telerik:RadCaptcha ID="CaptchaCode" runat="server" ValidationGroup="SubmitGroup"
      CaptchaTextBoxLabel=" Type the code from the image"  CaptchaImage-TextChars="Numbers" BorderColor="Black"
      BorderWidth="0" ErrorMessage="" CaptchaImage-Height="40" CaptchaImage-Width="155"
      width="150"  CssClass="font_captcha" ForeColor="Black"  Display ="Dynamic" TabIndex =3 >
</telerik:RadCaptcha>                     
T
his is the Server side code.
Private Sub Pages_Login_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache)
        AddHandler Me.loginButton.Click, New System.EventHandler(AddressOf loginButton_Click)
 
        If Not Page.IsPostBack Then
            CaptchaCode.EnableRefreshImage = True
            CaptchaCode.CaptchaLinkButtonText = "Generate New Image"
            CaptchaCode.CaptchaImage.EnableCaptchaAudio = True
            CaptchaCode.CaptchaAudioLinkButtonText = "Vision Impaired"
            CaptchaCode.CaptchaImage.UseAudioFiles = False
            CaptchaCode.CaptchaImage.AudioFilesPath = HttpContext.Current.Server.MapPath("~/App_Data/RadCaptcha")
 
            Page.DataBind()
        End If
        txtUserID.Focus()
    End Sub

This is CSS Code.
.font_captcha
{
    text-align:left;
    color: white;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 9px;
    font-weight: normal;
}
.rcRefreshImage
{
    margin-left: 165px;
    margin-top :-40px;
    font-size: 10px;
    float: left;
    color: White;
    display: block;
    line-height:1.5em;
    background-image: url('../Images/Captcha_reload.png');
    background-repeat: no-repeat;
    height: 20px;
    padding-left: 30px;
    margin-top:-40px;
    width: 120px;
            
}  
.rcCaptchaAudioLink
{
    margin-left: 165px;
    margin-top :-17px;
    font-size: 10px;
    float: left;
    color: White;
    display: block;
    line-height: 1.5em;
    background-image: url('../Images/Captcha_audio.png');
    background-repeat: no-repeat;
    height: 19px;
    padding-left: 30px;
    margin-top:-20px;
    width: 120px;
}
If this is not clear, I can attach a sample project.
Please let me know whether I am doing any thing wrong or really radCaptcha is having compatibility issues with Chrome browser. 
Bhanu Prakash
Top achievements
Rank 1
 answered on 15 Apr 2013
2 answers
149 views
Dear support , 
I have grid view with , and i need to access the upload file control in insertCommand and editCommand event. 
i got cant convert System.Web.UI to Telerik.Web.UI.UploadControl when i try to get the control
here is my grid and the event 

server Code.. 

protected void MasterRadGrid_InsertCommand(object source, GridCommandEventArgs e)
       {
           try
           {
               Telerik.Web.UI.UploadedFile attachment = e.Item.FindControl("txtUpdateTaskCompletion2") as Telerik.Web.UI.UploadedFile;

.aspx code
<telerik:RadGrid CssClass="GridAlign" ID="MasterRadGrid" runat="server" ShowStatusBar="true"
                        AutoGenerateColumns="False" PageSize="3" AllowSorting="True" AllowMultiRowSelection="False"
                        AllowPaging="True" GridLines="None" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
                        AllowAutomaticUpdates="True" OnInsertCommand="MasterRadGrid_InsertCommand" OnDetailTableDataBind="MasterRadGrid_DetailTableDataBind"
                        OnNeedDataSource="MasterRadGrid_NeedDataSource" OnUpdateCommand="MasterRadGrid_UpdateCommand"
                        Skin="Metro" OnDeleteCommand="MasterRadGrid_DeleteCommand">
                        <PagerStyle Mode="NumericPages"></PagerStyle>
                        <MasterTableView DataKeyNames="CommentID" AllowMultiColumnSorting="True" Width="100%"
                            CommandItemDisplay="Top" Name="MainComment">
                            <CommandItemStyle CssClass="GridAlign" />
                            <NoRecordsTemplate>
                                No Records to Display
                            </NoRecordsTemplate>
                            <HeaderStyle CssClass="InnerHeaderStyle" />
 
<EditFormSettings EditFormType="Template">
                                <FormTemplate>
                                    <div id="content">
                                        <table>
                                            
                                            <tr>
                                                <td style="width: 20%; padding-right: 10px">
                                                    <asp:Label ID="lblAttachments" runat="server" Text="<%$Resources:TMS.UI,TM_AddNewTask_lblTaskAttachmentTitle%>" />
                                                </td>
                                                <td colspan="3" style="width: 65%">
                                                    <telerik:RadUpload ControlObjectsVisibility="RemoveButtons,AddButton" ID="rpTaskAttachments" runat="server"
                                                        Localization-Add="<%$Resources:TMS.UI,TM_AddNewTask_btnAddAttachment%>"
                                                        Localization-Remove="<%$Resources:TMS.UI,TM_AddNewTask_btnRemoveAttachment%>"
                                                        Localization-Select="<%$Resources:TMS.UI,TM_AddNewTask_btnSelectAttachment%>"
                                                        OnClientAdded="AddNewFields" Width="500px">
                                                    </telerik:RadUpload>
                                                </td>
                                            </tr>
                                        </table>


if you need the full code for the grid or the code behind please tell .. 

Thanks





Mohammad
Top achievements
Rank 1
 answered on 15 Apr 2013
1 answer
349 views
Good Evening, I have a RadGrid has multiple rows and I would like to Add a button and on the button click event I would like the radgrid to move to the next row in the grid and have it selected. Does someone have an example of that? Thanks
Shinu
Top achievements
Rank 2
 answered on 15 Apr 2013
1 answer
150 views
Hi.
I want to display the gauge as one of the column in the RADgrid.

Instead of showing the performance in number, i want to display the guage.
And i want to get the value from datasource.

<telerik:RadLinearGauge runat="server" ID="RadLinearGauge1" Scale-Vertical="false"
                                          Scale-MajorTicks-Visible="false" Scale-Labels-Visible="false" Width="120px" Height="20px">
                                          <Pointer Shape="BarIndicator" Value="60">
                                              <Track Opacity="0.4" />
                                          </Pointer>
                                          <Scale Min="0" Max="100">
                                          </Scale>
                                      </telerik:RadLinearGauge>


Is that possible...?
If yes, pls help me by giving the solution.

thanks
--Alex
Shinu
Top achievements
Rank 2
 answered on 15 Apr 2013
2 answers
1.0K+ views
I'm new to using the RadAsyncUploader & I'm hoping there's some sample code to help jumpstart my work.  I need to upload a CSV & place it in a RadGrid. If possible, I'd like to use my own Icon (called Up.png) for the Select button, and not show the input Text box, and not show the Remove option, since it should place the file contents straight into the grid & then delete the file.  I didn't see anything in the Code Library showing how to upload a CSV & place it in a grid, but it seems like someone must have done this before me.  Any guidance is appreciated.
Scott
Top achievements
Rank 1
 answered on 14 Apr 2013
4 answers
139 views
Hi,

can anyone please enlighten me how to use jQuery on Master/Contentpages.

I have my scriptmanager on the Masterpage:
    <asp :ScriptManager ID ="RadScriptManager1" runat ="server">
        <Scripts >
            <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 >
    </asp :ScriptManager >

How can I use jQuery on the Content page now?
Can anyone give me an example please?

Thanks in adavance for your help

best regards, Thomas
Thomas
Top achievements
Rank 1
Veteran
 answered on 14 Apr 2013
1 answer
156 views
Hello forum,
we have three RadHtmlCharts on one page and we would like to export them to excel, all at once.
So our plan is to make a new RadGrid in code-behind, add those three charts to this grid and export that grid.
So i wrote this piece of Code:
private void ExportChartsToExcel() {
    RadGrid chartWrapperGrid = new RadGrid();
    chartWrapperGrid.ID = "ChartWrapperGrid";
    chartWrapperGrid.AutoGenerateColumns = false;
 
    GridBoundColumn boundColumn1 = new GridBoundColumn();
    boundColumn1.DataField = "Chart1";
    boundColumn1.HeaderText = "Chart 1";
    chartWrapperGrid.MasterTableView.Columns.Add(boundColumn1);
    GridBoundColumn boundColumn2 = new GridBoundColumn();
    boundColumn2.DataField = "Chart2";
    boundColumn2.HeaderText = "Chart 2";
    chartWrapperGrid.MasterTableView.Columns.Add(boundColumn2);
    GridBoundColumn boundColumn3 = new GridBoundColumn();
    boundColumn3.DataField = "Chart3";
    boundColumn3.HeaderText = "Chart 3";
    chartWrapperGrid.MasterTableView.Columns.Add(boundColumn3);
 
    DataTable chartTable = new DataTable();
    chartTable.Columns.Add("Chart1");
    chartTable.Columns.Add("Chart2");
    chartTable.Columns.Add("Chart3");
    RadHtmlChart[] chartArray = new RadHtmlChart[] { Chart1, Chart2, Chart3 };
    chartTable.Rows.Add(chartArray);
    chartWrapperGrid.DataSource = chartTable;
 
    this.form1.Controls.Add(chartWrapperGrid);
    chartWrapperGrid.ExportSettings.OpenInNewWindow = true;
    chartWrapperGrid.ExportSettings.ExportOnlyData = true;
    chartWrapperGrid.ExportSettings.IgnorePaging = true;
    chartWrapperGrid.MasterTableView.ExportToExcel();
}

The download starts as wanted but the in the grid are only the titles with "Telerik.Web.UI.RadHtmlChart" under it.
Why are the Chart not shown?


What am i doing wrong?
Danail Vasilev
Telerik team
 answered on 14 Apr 2013
0 answers
104 views
I want to change a MultiView Active View when a ItemCommand is fired, the next snippet is executed buy the 
view is not changing
Protected Sub RadGrid1_ItemCommand(sender As Object, e As GridCommandEventArgs)
        If (e.CommandName = "review") Then
            mvFunciones.SetActiveView(vEdit)
         
        End If
    End Sub


<
asp:UpdatePanel runat="server">
        <ContentTemplate>
            <asp:MultiView ID="mvFunciones" runat="server">
                <asp:View ID="vList" runat="server">
                    <div class="container">
                         <div class="row">
                            <div class="span12">
                                <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                                    <script type="text/javascript">
                                        var timer = null;
 
                                        function KeyUp() {
                                            if (timer != null) {
                                                clearTimeout(timer);
                                            }
                                            timer = setTimeout(LoadTable, 500);
                                        }
 
                                        function LoadTable() {
                                            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("FilterGrid");
                                        }
                                    </script>
                                </telerik:RadCodeBlock>
 
                                <%--<telerik:RadScriptManager runat="server" ID="RadScriptManagerLista" />--%>
                                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                                    <AjaxSettings>
                                        <telerik:AjaxSetting AjaxControlID="RadGrid1">
                                            <UpdatedControls>
                                                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                                                <%-- LoadingPanelID="RadAjaxLoadingPanel1"--%>
                                            </UpdatedControls>
                                        </telerik:AjaxSetting>
                                        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                                            <UpdatedControls>
                                                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                                                <%--LoadingPanelID="RadAjaxLoadingPanel1"--%>
                                            </UpdatedControls>
                                        </telerik:AjaxSetting>
                                         
                                        
 
                                         
                                    </AjaxSettings>
                                </telerik:RadAjaxManager>
 
 
                                <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="25">
                                    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
                                        style="border: 0px;" />
 
 
                                </telerik:RadAjaxLoadingPanel>
                                <asp:TextBox ID="TextBox1" onkeyup="KeyUp();" runat="server"></asp:TextBox>
                                <telerik:RadGrid ID="RadGrid1" Width="100%" AllowPaging="True" PageSize="10" runat="server"
                                    AllowSorting="true" GridLines="None" AllowFilteringByColumn="true" CssClass="table table-striped" AutoGenerateColumns="False"
                                    AlternatingItemStyle-CssClass="linea1" OnNeedDataSource="RadGrid1_NeedDataSource" selecte
                                    OnItemCommand="RadGrid1_ItemCommand">
                                    <MasterTableView Width="100%">
 
                                        <Columns>
 
                                            <telerik:GridButtonColumn
                                                UniqueName="clave" HeaderText="Clave" CommandName="review" DataType="System.Int32"
                                                DataTextField='idfuncion'>
                                            </telerik:GridButtonColumn>
                                        </Columns>
                                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                                        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column" Created="True"></ExpandCollapseColumn>
                                        <EditFormSettings>
                                            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                                        </EditFormSettings>
                                        <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                    </MasterTableView>
                                    <PagerStyle Mode="NextPrevAndNumeric" CssClass="pagination"></PagerStyle>
                                    <FilterMenu EnableTheming="True">
                                        <CollapseAnimation Duration="200" Type="OutQuint"></CollapseAnimation>
                                    </FilterMenu>
                                </telerik:RadGrid>
                            </div>
                        </div>
                    </div>
 
 
                </asp:View>
                <asp:View ID="vEdit" runat="server">
                  
 
             <asp:TextBox ID="hello" runat="server"  Text="IT WORKED"/>
 
 
                </asp:View>
 
            </asp:MultiView>
        </ContentTemplate>
        <Triggers>
 
            <asp:AsyncPostBackTrigger ControlID="RadGrid1" EventName="ItemCommand" />
 
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>


Alberto
Top achievements
Rank 1
 asked on 14 Apr 2013
2 answers
123 views
Hello,

I have an Edit button located on my MasterPage and a RadGrid located in my Default.aspx page. I am trying to get the Session ID of the row selected in the Default.aspx page and pull in those values into my Edit page.
When I select a row in Default.aspx and then click Edit, the page refreshes and the row is deselected.
What am I doing wrong here?

Here is my code behind for the MasterPage Edit button:
protected void lEditItem_Click(object sender, EventArgs e)
{
    GetSelected();
    if (Session["CriteriaID"] != null)
    {
        Session["AccessMode"] = "";
        Response.Redirect("~/EditCriteria.aspx");
    }
}
 
private void GetSelected()
{
    RadGrid control = (RadGrid)PageContent.FindControl("criteriaList");
    foreach (GridDataItem item in control.MasterTableView.Items)
    {
        if (item.Selected)
        {
            String temp = item.GetDataKeyValue("ID").ToString();
            Session["CriteriaID"] = new Guid(item.GetDataKeyValue("ID").ToString());
 
        }
    }
}

The code for the RadGrid in Default.aspx is
<asp:Content ID="Content2" ContentPlaceHolderID="PageContent" runat="server">
    <div class="PageBlock">
            <div class="SecHeader">Criteria List</div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CriteriaCS %>"
         
                SelectCommand="SELECT [AssetOwner], [CriteriaName], [CriteriaDescription], [CriteriaType], [ID] FROM [Study]">
    </asp:SqlDataSource>
    <telerik:RadGrid ID="criteriaList" runat="server" CellSpacing="0" DataSourceID="SqlDataSource1"
        GridLines="None" AllowSorting="True" AutoGenerateColumns="False">
        <ClientSettings EnablePostBackOnRowClick="True">
            <Selecting AllowRowSelect="True" />
            <ClientEvents OnRowSelected="RowSelected"></ClientEvents>
        </ClientSettings>
        <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="ID">
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True"
                FilterControlAltText="Filter ExpandColumn column" Created="True">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="AssetOwner" FilterControlAltText="Filter AssetOwner column"
                    HeaderText="AssetOwner" SortExpression="AssetOwner" UniqueName="AssetOwner">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CriteriaName" FilterControlAltText="Filter CriteriaName column"
                    HeaderText="CriteriaName" SortExpression="CriteriaName" UniqueName="CriteriaName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CriteriaDescription" FilterControlAltText="Filter CriteriaDescription column"
                    HeaderText="CriteriaDescription" SortExpression="CriteriaDescription" UniqueName="CriteriaDescription">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CriteriaType" FilterControlAltText="Filter CriteriaType column"
                    HeaderText="CriteriaType" SortExpression="CriteriaType" UniqueName="CriteriaType">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ID" DataType="System.Guid"
                    FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True"
                    SortExpression="ID" UniqueName="ID" Visible="False">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
            <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
        </MasterTableView>
        <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
    </telerik:RadGrid>
    </div>
</asp:Content>



Thanks!!!
Pradeep
Top achievements
Rank 1
 answered on 13 Apr 2013
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?