Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
108 views
I followed the documentation on using the radtooltip with a standard asp validation summary and standard asp button as per on page:

http://demos.telerik.com/aspnet-ajax/tooltip/examples/clientsideapi/defaultcs.aspx

And successfully got this working, but when I tried to use a radbutton instead of a standard asp button I get a microsoft JScript runtime error: Object Expected

Below is my code:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="nomastervaltest.aspx.vb"
    Inherits="nomastervaltest" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <script type="text/javascript">
     //<![CDATA[
            function HideTooltip() {
                var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
                if (tooltip) tooltip.hide();
            }

            function ShowTooltip() {
                window.setTimeout(function () {
                    var tooltip = $find("RadToolTip1");
                    //API: show the tooltip
                    tooltip.show();
                }, 10);
            }

            function CheckIfShow(sender, args) {
                var summaryElem = document.getElementById("ValidationSummary1");

                //check if summary is visible
                if (summaryElem.style.display == "none") {
                    //API: if there are no errors, do not show the tooltip
                    args.set_cancel(true);
                }
            }

        
     //]]>
        </script>
       
        <asp:TextBox ID="txtCompany" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="rfvCompany" runat="server" ControlToValidate="txtCompany"
            Text="!" ErrorMessage="The company name is obligatory!">
        </asp:RequiredFieldValidator>
        <telerik:RadButton ID="btnSubmit" Text="Submit" runat="server" OnClientClicking="ShowTooltip()">
        </telerik:RadButton>
        <telerik:RadToolTip runat="server" ID="RadToolTip1" Position="TopRight" HideEvent="ManualClose"
            ShowEvent="FromCode" Width="300px" RelativeTo="Element" EnableShadow="true" OnClientBeforeShow="CheckIfShow"
            TargetControlID="btnSubmit">
           <asp:ValidationSummary ID="ValidationSummary1" runat="server"/>
        </telerik:RadToolTip>
         
    </div>
    </form>
</body>
</html>


Many thanks for your help...
Fraser
Marin Bratanov
Telerik team
 answered on 16 Nov 2011
3 answers
69 views
Hi all,

I have a RadGrid that displays "Files" and a details grid that displays "File Records". I've got this working by setting the GridTableView in the DetailTables to use a DataSource, like so:

<div class="row">
Uploaded between
<telerik:RadDatePicker ID="rdpFrom" runat="server" DateInput-AutoPostBack="true"></telerik:RadDatePicker> and
<telerik:RadDatePicker ID="rdpTo" runat="server" DateInput-AutoPostBack="true"></telerik:RadDatePicker>
</div>
 
<telerik:RadGrid ID="rgMemberUploads" runat="server" DataSourceID="odsMemberUploads" AllowPaging="true" PageSize="10" >
    <MasterTableView AutoGenerateColumns="false" DataSourceID="odsMemberUploads" DataKeyNames="ID">
        <DetailTables>
            <telerik:GridTableView AutoGenerateColumns="false" NoMasterRecordsText="No master record" NoDetailRecordsText="No invalid records" DataSourceID="odsMemberFileRecords" DataKeyNames="ID"  HierarchyLoadMode="ServerOnDemand">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="FileID" MasterKeyField="ID" />
                </ParentTableRelation>
                <Columns>
                    <telerik:GridBoundColumn DataField="RecordIndex" ReadOnly="true" HeaderText="Row"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ErrorMessage" ReadOnly="true" HeaderText="Error Message"></telerik:GridBoundColumn>
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
 
        <Columns>
            <telerik:GridDateTimeColumn DataField="UploadedFile.UploadedDate" ReadOnly="true" HeaderText="Uploaded On"></telerik:GridDateTimeColumn>
            <telerik:GridTemplateColumn HeaderText="Uploaded By">
                <ItemTemplate>
                    <%# Eval("UploadedFile.UploadedByNT")?? Eval("UploadedFile.UploadedByName") %>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="UploadedFile.Filename" ReadOnly="true" HeaderText="File"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="UploadedFile.Status" ReadOnly="true" HeaderText="Status"></telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Error Details">
                <ItemTemplate>
                    <span class="errorMessage">
                        <%# Eval("UploadedFile.ErrorMessage") %>
                    </span>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridDateTimeColumn DataField="UploadedFile.CompletedDate" ReadOnly="true" HeaderText="Completed On"></telerik:GridDateTimeColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
 
<asp:ObjectDataSource ID="odsMemberUploads" runat="server"
    OldValuesParameterFormatString="original_{0}" SelectMethod="Search"
    TypeName="File">
    <SelectParameters>
        <asp:ControlParameter ControlID="rdpFrom" Name="uploadedFrom"
            PropertyName="SelectedDate" Type="DateTime" />
        <asp:ControlParameter ControlID="rdpTo" Name="uploadedTo"
            PropertyName="SelectedDate" Type="DateTime" />
    </SelectParameters>
</asp:ObjectDataSource>
 
<asp:ObjectDataSource ID="odsMemberFileRecords" runat="server"
    OldValuesParameterFormatString="original_{0}" SelectMethod="SearchRecords"
    TypeName="File">
    <SelectParameters>
        <asp:Parameter Name="FileID" DbType="Guid" />
    </SelectParameters>
</asp:ObjectDataSource>

The only issue that I have is that main "File" datasource (odsMemberUploads) returns an object that has a property with contains the the records. So ideally I would like the DataSource of the GridTableView to be the RecordsProperty. So I tried doing: 

            <telerik:GridTableView DataSource='<%#Eval("UploadedFile.Records")%>'>

But that didn't work.

I tried to use the NeedDataSource and DetailTableDataBind but the DataItem of the ParentItem is empty.

Is there anyway to do what I would like?

Appreciate your words of wisdom.

Kind regards
Sidharth
Daniel
Telerik team
 answered on 16 Nov 2011
7 answers
515 views
We were using the Ajax Control Toolkit AutoComplete Extender, but it no longer displays properly with the .NET 3.5 release (May 2009), and it no longer has any cross-browser support.  So, we need an alternative that works exactly like the original did.  I looked at the info in the thread at:

http://www.telerik.com/community/forums/aspnet-ajax/combobox/combobox-inside-grid-with-load-on-demand.aspx

but the solution does not work like the original extender.  In fact it appears that it is not possible to get the ComboBox to work in this manor.  The primary purpose of the control is textual input, with the option to select suggestions from the dropdown to populate the text box (just like Bing and Google).  I tried to get the combo box to work in this manor, but the control constantly reverts control to the dropdown which makes it impossible to change the text in the text box.  Is it possible to get the ComboBox to work exactly like the old Ajax Control Toolkit AutoComplete Extender did?

If not, is there an extender like this for the Input control?
Cat Cheshire
Top achievements
Rank 1
 answered on 16 Nov 2011
0 answers
69 views
Hii,

I an using mvc3 application.
In this I am using telerik upload control

@(Html.Telerik().Upload()
        .Name("attachments")
        .Multiple((bool) ViewData["multiple"])
        .Async(async => async
            .Save("Save", "Home")
            .Remove("Remove", "Home")
            .AutoUpload((bool) ViewData["autoUpload"])
            
        )
        
)


I want that it upload three files with 20 mb filesize each.

when I had try for one file then it is giving this error.

Error! Remove operation failed. Unexpected response - see console."

Please any one its solutions.
hemlata
Top achievements
Rank 1
 asked on 16 Nov 2011
5 answers
206 views

Hi,
We using Telerik control RAD control for ASP.NET v2010.3.1109.40. We are facing a critical issue with the RADCHART control. When we enable the scroll bar, few of the graphs are not even visible. But when scroll bar is disabled, all the bar graphs comes up fine. Please have alook at the code snippet below and screen shots for better understanding.Your prompt help would be appreciated.
Thanks,
Code Snippet :

<telerik:RadChart ID="TaxYearsChart" runat="server" Width="350px"
SeriesOrientation="Horizontal" Legend-Appearance-Visible="false" AutoLayout="true"
ChartTitle-TextBlock-Text="Year by Tax Type">
<ClientSettings EnableZoom="false" ScrollMode="XOnly" XScale="2" /> <!--If we add this line the scroll bar comes but few bar graphs line just blow off.-->
<Appearance FillStyle-MainColor="White">
<Border Color="DarkGray" Visible="true" />
</Appearance>
<PlotArea EmptySeriesMessage-TextBlock-Text="No Audit Cycles to Display" EmptySeriesMessage-TextBlock-Appearance-TextProperties-Color="White">
<YAxis AxisMode="Extended" AutoScale="false" Step="5" MinValue="0">
</YAxis>
<Appearance FillStyle-MainColor="#BBCFE7" FillStyle-FillType="Solid" Dimensions-AutoSize="true">
</Appearance>
</PlotArea>
<Appearance FillStyle-MainColor="White">
</Appearance>
</telerik:RadChart>

Evgenia
Telerik team
 answered on 16 Nov 2011
2 answers
108 views
Hello,
                    iam using the following code,
 

 

<telerik:RadGrid AllowSorting="True" ID="grdTrackRedemptions" AllowPaging="True"  

 

runat="server" Skin="Office2007" AllowMultiRowEdit="false" GridLines="None" AutoGenerateColumns="False"  

 

ShowDesignTimeSmartTagMessage="False" Width="800px" AllowMultiRowSelection="true"  

 

PageSize="50" OnNeedDataSource="grdTrackRedemptions_NeedDataSource" OnPageIndexChanged="grdTrackRedemptions_PageIndexChanged"  

 

OnSortCommand="grdTrackRedemptions_SortCommand" OnItemDataBound="grdTrackRedemptions_ItemDataBound">  

 

<MasterTableView TableLayout="Auto" DataKeyNames="couponid,Id" CommandItemDisplay="Top"  

 

ClientDataKeyNames="couponid,Id"> <Columns>

 

<telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" HeaderText="Redeemed">  

 

<ItemTemplate>

 

<asp:CheckBox ID="chk_redeemption" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True"  

 

runat="server"></asp:CheckBox>  

 

</ItemTemplate

 

</telerik:GridTemplateColumn>  

 

<telerik:GridBoundColumn DataField="couponid" HeaderText="Cid" Display="False" SortExpression="couponid"  

 

UniqueName="couponid">  

 

<HeaderStyle Width="0px" />  

 

</telerik:GridBoundColumn></Columns>  

</telerik:GridBoundColumn>  

</Columns>
</
MasterTableView>  

</telerik:RadGrid>

Each click on the check box, i need to get the value of row ( ie, couponid) ?
Post backing occours when clicking on the check box ( ToggleRowSelection fires) 

 

protected void ToggleRowSelection(object sender, EventArgs e) 

{
           in this function how to get the grid's selected row value. 

 

  Thanks,

Bijo
Top achievements
Rank 1
 answered on 16 Nov 2011
3 answers
80 views
I am trying to use the skin objects for DNN. Specifically RadPanelBar, I want to display root level pages using a horizontal menu at the top of the page (currently using DNNMenu), and a vertical list on the side of the page to display child pages using RadPanelBar. Everything seems to work ok except when a page in the panel bar is clicked, it does not receive the .rpSelected class. I want to apply a style to the item that the user clicked to indicate the page in the panelbar the user is currently viewing.

 I have added the panelbar to my skin using the following statement:
<dnn:RadPanelbar runat="server" id"dnnPanelbar_sli" ShowOnlyCurrent="RootItem" Skin="sli" EnableEmbeddedSkins="false"  EnableEmbeddedBaseStylesheet="false" /> 

Any feedback would be appreciated.
Genady Sergeev
Telerik team
 answered on 16 Nov 2011
2 answers
93 views
Hi,

Does anyone know if there is anyway that you can change the transparency or even set the back color when using the tooltip with modality. I'm trying to completely blank the rest of my page don't want any transparency.

Many thanks,
Fraser
Fraser
Top achievements
Rank 1
 answered on 16 Nov 2011
5 answers
198 views
Hi,
I have a big problem on my gridview.... I load my gridview with a dataset in the OnNeedDataSource event. All seems ok.. But, when i filter one of the columns, i lose then my selection when i try to edit a record or when i change the page of my grid... It seems the every postback event makes lose every filter parameters.

Any idea ?
Riccardo
Top achievements
Rank 1
 answered on 16 Nov 2011
3 answers
61 views
Hello everybody,

I have a problem with setting the DropDownWidth property from server-side.

I use RadComboBox as a FilterTemplate on my RadGrid.

this is what I launch when I click RadComboBox:

protected void list_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
        {
            Current_rcb_Width = 0;
            if (((RadComboBox)o).DataTextField == "nazwa_")
                ((RadComboBox)o).DataSource = GetDataTable("SELECT DISTINCT " + ((RadComboBox)o).DataTextField + jezyk + " as nazwa_ FROM katalog_produktow WHERE " + ((RadComboBox)o).DataTextField + jezyk + " LIKE '" + e.Text + "%' order by " + ((RadComboBox)o).DataTextField + jezyk);
            else
                ((RadComboBox)o).DataSource = GetDataTable("SELECT DISTINCT " + ((RadComboBox)o).DataTextField + " FROM katalog_produktow WHERE " + ((RadComboBox)o).DataTextField + " LIKE '" + e.Text + "%' order by " + ((RadComboBox)o).DataTextField);
 
 
            var cbox = ((RadComboBox)o);
            int MaxWidth = 0;
 
            foreach (DataRow row in (((RadComboBox)o).DataSource as DataTable).Rows)
            {
                int Width = TextWidth(row[((RadComboBox)o).DataTextField].ToString());
                if (Width > MaxWidth)
                {
                    MaxWidth = Width;
                }
            }
            cbox.DropDownWidth = new Unit(MaxWidth);
            ((RadComboBox)o).DataBind();
        }

and I checked that the code properly changed the DropDownWidth property but the size of the DropDown is still the same.
I believe I've put the code in wrong place. 

I tried using the code from:
http://www.telerik.com/community/code-library/aspnet-ajax/combobox/dynamic-dropdown-width.aspx

but it didn't work. It ran 2 times (don't know why).

During 1st time It doesn't find any Items in RadComboBox so it's setting the DropDownWidth as 155px (initial value from code).
During 2nd time it found all elements and calculated the proper width. It did set the property but on page it was still visible as 155px.

Here's my ComboBox code:

<telerik:RadComboBox ID="rcbnazwa" runat="server" ShowToggleImage="false" EnableLoadOnDemand="true" OnItemsRequested="list_ItemsRequested" OnDataBound="RadComboBox1_DataBound"
                                MarkFirstMatch="true" Skin="Office2007" OnSelectedIndexChanged="rcbContinents_SelectedIndexChanged" DataTextField="nazwa_" Font-Size="X-Small"
                                DataValueField="nazwa_" OnPreRender="rcbContinents_PreRender" AutoPostBack="true" Width="100%">
                            </telerik:RadComboBox>


Dimitar Terziev
Telerik team
 answered on 16 Nov 2011
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?