Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
84 views
Hi.
I have a page (in a master page) with a ToolTip manager where the tooltips ar working as intended.
On this page there is also a user control with its own ToolTip manager handling the tooltips of the 10 smaller user controls placed in this container user control.
However the tooltips on this level appears as browser default, just as if there was no TT manager.

I suppose it should be possible that a user control can have its own TT manager ?
BTW, the user control with the TT manager is placed in an update panel (together with other stuff).

I have read the threads suggested in other posts but have not found the cause for this.

Thnx in advance.
Per-Olof Olsson
Top achievements
Rank 1
 answered on 10 Sep 2014
1 answer
151 views
We are using the RadDialogopener for image searches on the site. Having good luck with a customized ImageManager.ascx and code like the following. Added a number of display:none css classes to various portions of the replaced ascx to hide functionality we don't need.
    
imageManagerParameters = New FileManagerDialogParameters()
imageManagerParameters.ViewPaths = New String() {"~/userimages/fphimages"}
imageManagerParameters.UploadPaths = New String() {"~/userimages/fphimages"}
imageManagerParameters.MaxUploadFileSize = 800000
izmageManagerParameters.AllowMultipleSelection = False
 
Dim imageManager = New DialogDefinition(GetType(ImageManagerDialog), imageManagerParameters)
imageManager.ClientCallbackFunction = "fphScript.imageManagerHandler"
imageManager.Width = Unit.Pixel(780)
imageManager.Height = Unit.Pixel(500)
imageManager.Parameters("ExternalDialogsPath") = "~/EditorDialogsFPH/"

dialogOpener.DialogDefinitions.Add("ImageManager", imageManager)

However, we would also like to customize the RadFileExplorer portion of the dialog. Would like to customize image sizes larger than 32x32.  Would like to filter image searches in the thumbnail grid.  I've found a number of examples where a RadFileExplorer was included in the page source, and after finding the control on the page, they were able to modify its properties using code like...

Dim rfe = FindRadFileExplorer(Me.Page)
If Not rfe Is Nothing Then
     rfe.DisplayUpFolderItem = False
     rfe.EnableFilterTextBox = True
     rfe.EnableFilteringOnEnterPressed = True
End If

But since we are using RadDialogOpener outside of a RadEditor, and we have no RadFileExplorer in our markup as seen below. And so can't find the RadFileExplorer on the page as in code above.

<telerik:RadDialogOpener runat="server" ID="luImageDialogOpener"></telerik:RadDialogOpener>

How can I access the RadFileOpener used by this dialog in order to set properties like "EnableFilterTextBox"?    
Ianko
Telerik team
 answered on 10 Sep 2014
2 answers
117 views
Hi,
           I have a rad grid which has three columns ie, one link button and two labels. Link button should be enabled based on some logic. So i did this in
OnItemDataBound of the RadGrid and it was working fine when the page loads first time. But when i do any sorting by clicking on one of the columns
the link enabling and disabling logic doesnt reflect in UI. Ie, the first column not getting binded after OnItemDataBound.


.aspx.cs:
protected void radgrid1_OnNeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            FillGrid();

        }

 protected void radgrid1_OnItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
                LinkButton btnView = (LinkButton)item.FindControl("btnView");
                DataRowView v = (DataRowView)e.Item.DataItem;
                string Quotation_no = v.DataView[e.Item.ItemIndex]["Quotation_no"].ToString();
                string str= btnView.Enabled.ToString();
                
                if (Quotation_no.Trim().Equals("1"))
                {                   
                        btnView.Enabled = false;
                        btnView.Text = Quotation_no + "gg";             
                }
                else
                {               
                     btnView.Enabled = true;
                     btnView.Text = Quotation_no + "mm";
                }

            }
        }

.aspx:
        <telerik:RadGrid runat="server" ID="radgrid1" AutoGenerateColumns="False" AllowSorting="true"
            AllowPaging="true" OnNeedDataSource="radgrid1_OnNeedDataSource" OnItemDataBound="radgrid1_OnItemDataBound"
            OnSortCommand="radGrid1_SortCommand">
            <MasterTableView Width="100%" PagerStyle-AlwaysVisible="true" EnableNoRecordsTemplate="true"
                ShowHeadersWhenNoRecords="false">
                <NoRecordsTemplate>
                    No Data Found.
                </NoRecordsTemplate>
                <Columns>
                    <telerik:GridTemplateColumn UniqueName="Quotation_no" HeaderText="Quotation_no">
                        <ItemTemplate>
                            <asp:LinkButton ID="btnView" runat="server"></asp:LinkButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="lob_desc" HeaderText="Decription" SortExpression="lob_desc">
                        <ItemTemplate>
                            <asp:Label ID="lblDesc" runat="server" Text='<%# Eval("lob_desc") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="lob_desc" HeaderText="Units" SortExpression="UNITS">
                        <ItemTemplate>
                            <asp:Label ID="lblUnits" runat="server" Text='<%# Eval("UNITS") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <PagerStyle AlwaysVisible="True"></PagerStyle>
            </MasterTableView>
        </telerik:RadGrid>
Nambi
Top achievements
Rank 1
 answered on 10 Sep 2014
1 answer
82 views
I am trying to implement the Demo Code given at :  http://demos.telerik.com/aspnet-ajax/htmlchart/examples/drilldownchart/defaultcs.aspx
I am using same Column names in my database.
It only works for "years" but when i clicked on "2004" or any other year it gives following Error. 

An exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll but was not handled in user code

Additional information: Index was out of range. Must be non-negative and less than the size of the collection.


I am really confused about this. Please help me out in this. 

Looking forward for a quick response.
Thank you.
Danail Vasilev
Telerik team
 answered on 10 Sep 2014
1 answer
65 views
I am trying to implement the Demo Code given at :  http://demos.telerik.com/aspnet-ajax/htmlchart/examples/drilldownchart/defaultcs.aspx
I am using same Column names in my database.
It only works for "years" but when i clicked on "2004" or any other year it gives following Error. 

An exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll but was not handled in user code

Additional information: Index was out of range. Must be non-negative and less than the size of the collection.

This error occurs at  the code line :- 

 SqlDataSource2.SelectParameters[0].DefaultValue = Year.ToString();


I am really confused about this. Please help me out in this. 

Looking forward for a quick response. 
Thank you.
Danail Vasilev
Telerik team
 answered on 10 Sep 2014
1 answer
114 views
I am trying to implement the Demo Code given at :  http://demos.telerik.com/aspnet-ajax/htmlchart/examples/drilldownchart/defaultcs.aspx
I am using same Column names in my database.
It only works for "years" but when i clicked on "2004" or any other year it gives following Error. 

An exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll but was not handled in user code

Additional information: Index was out of range. Must be non-negative and less than the size of the collection.

This error occurs at  the code line :- 

 SqlDataSource2.SelectParameters[0].DefaultValue = Year.ToString();


I am really confused about this. Please help me out in this. 

Looking forward for a quick response. 
Thank you.
Danail Vasilev
Telerik team
 answered on 10 Sep 2014
3 answers
127 views
Hi,

I use your code from "http://www.telerik.com/help/aspnet-ajax/editor-printing-content-with-styles.html" to print the RadEditor html content and some additional custom information. In particular, I add some email information (sender, recipient, etc.) as the editor is used in an email web client.

A problem arises in the case of external images referenced in the html content, e.g. "<img width="1600" height="900" id="Grafik_x0020_1" src="/an_image_url_comes_here">". These images are not printed. However, the default RadEditor print function does work fine in this case.

How do I make the external images to be printed as well in the custom code?

My code looks like this:

        Telerik.Web.UI.Editor.CommandList["CustomPrint"] = function (commandName, editor, args) {
            var printIframe = document.createElement("IFRAME");
            document.body.appendChild(printIframe);
            var printDocument = printIframe.contentWindow.document;
            printDocument.designMode = "on";
            printDocument.open();

            printDocument.write("<html><head></head><body>" + editor.get_html(true) + "</body></html>");
            printDocument.close();

            try {
                if (document.all) {
                    printDocument.execCommand("Print");
                }
                else {
                    printIframe.contentWindow.print();
                }
            }
            catch (ex) {
                window.alert("error");
            }
            
            //document.body.removeChild(printIframe);
        };

Many thanks!!!

Roland
Ianko
Telerik team
 answered on 10 Sep 2014
3 answers
535 views
Hello,
We are using grid in our project and we are faced to an important issue. There are 3 options to export the data displayed on the grid such as Excel, Pdf, and Word. Excel and Word work just fine both there is a problem with exporting to pdf. When we search the log files we came across that there are invalid characters in the data. But these characters are Ok for office to omit them. I saw a similar question in the forum (this), that solution is not acceptable in our standards and will cause performance issues. The other point is that the solution is only focusing on just specific part of the program. In our case we know one parameter but there will be same or different character at the different part of the program. Here is the exception we caught;
Exception information:
Exception type: GridPdfExportException
Exception message: Invalid XHTML. RadGrid has to render correct XHTML in order to export to PDF.
Parse error:
' ', hexadecimal value 0x1A, is an invalid character. Line 883, position 199.

Do you have a solution for this kind of error?
Thanks,
Ertan
Kostadin
Telerik team
 answered on 10 Sep 2014
1 answer
83 views
Hi
I'm new to Telerik RadGrid and it's databinding. I'm trying to use the ADO.NET Data Service binding but I need to pass parameter. I'm using the sample code but I need to modify it a little bit.

In a perfect world I would add an ID="dbAdoDataService" and runat="server" to the <DataBinding .... > and then in code behind I could use something like dbAdoDataService.SelectParameter = Convert.ToInt32(Request.QueryString["ProductID"]);. But it's not possible to add runat="server" or add an ID to the DataBinding so what can I do to select the rows I want at runtime? And I'm not sure how to modify the GridAdoNetDataService.cs. Please help me I'm stuck.  (Hope you understand my bad english).

Here is the samplecode from Telerik support site:

This is the binding code (Default.aspx):

1.<ClientSettings>
2.    <DataBinding Location="GridAdoNetDataService.svc" SelectCountMethod="GetCount">
3.        <DataService TableName="ReadOnlyProducts" />
4.    </DataBinding>
5.</ClientSettings>

And here is the GridAdoNetDataService.cs:

01.public class GridAdoNetDataService : DataService<NorthwindEntities>
02.{  
03.    public static void InitializeService(IDataServiceConfiguration config)
04.    {      
05.         config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
06.         config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
07.    }
08.  
09.    [WebGet]
10.    public int GetCount(string where)
11.    {
12.        return String.IsNullOrEmpty(where) ? CurrentDataSource.ReadOnlyProducts.Count() :
13.            CurrentDataSource.ReadOnlyProducts.Where(where).Count();
14.    }
15.  
16.}

Kostadin
Telerik team
 answered on 10 Sep 2014
6 answers
358 views

I like the ability to select a row just by clicking anywhere on it, but I don't know how to run a server-side event when it happens. 

Does anyone have an example of how to run a server-side event after clicking anywhere on a row in a RadGrid?  I don't really have room for a select button, so I'm looking for other options.
John
Top achievements
Rank 1
 answered on 09 Sep 2014
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?