Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
333 views
Hi All,

 I have created a radgrid .Rows inside the radgrid will depend on the selection made in the RadCombobox.So I have placed both Radgrid and  RadCombobox inside the Updateapnel ,because I don't want any postback.But the problems is whenever I change the items in Radcombobox I get Scripting error like "Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'grdCustomerSuppliedRequirementsPanel'. If it is being updated dynamically then it must be inside another UpdatePanel".can you please tell me the solution for this.

Thanks in Advance
Princia D

Princy
Top achievements
Rank 2
 answered on 03 Oct 2011
1 answer
280 views
I am using a class that is derived from the RadGrid...

    public

 

 

class RadGridExport : RadGrid

We are using the native PDF export features of the RadGrid control.  I would like to be able to insert an image (corporate logo) into the beginning of the pdf file (above the data table data).

I found the OnPDFExporting() event and decided to override it and thus access the RawHTML stream. 
I then attempted to add an image to the HTML via the <img> element:

 

 

 

 

 

 

 

protected override void OnPdfExporting(GridPdfExportingArgs e)

 

{

 

 

 

 

base.OnPdfExporting(e);

 

 

 

string newHTML = string.Empty;

 

 

 

string addHTML = string.Empty;

 

newHTML = e.RawHTML;

 

 

//THIS WORKS

 

addHTML =

 

@"<img alt='test' src='../images/corp_logo.gif'/>";

 

 

 

//THIS DOES NOT WORK (where URL is correct and resolvable)

 

addHTML =

 

@"<img alt='test' src='https://mycorp.net/pages/Custom/Images/corp_logo.gif'/>";

 

newHTML = addHTML + newHTML;

e.RawHTML = newHTML;

}

 

 

The issue that I am running into is that the above technique will work as long as I am using a relative path that resolves within the directory structure of the web application / virtual directory.

However, if I used an absolute path (via http:/ or file:/ or even embedded by data:) that I get an error similar to:

"System.SystemException: Error while creating area : Encountered web exception while fetching image from file:///C:/WORKING/MyProject/MyProject.Controls/Test/https://mycorp.net/pages/Custom/Images/corp_logo.gif: The given path's format is not supported."

Even though I have manually coded the src attribute with a absolute path to a URL... the RadGrid appears to resolve to my web apps directory structure.

Is there any way that I can avoid this behavior and have the src attribute work against an absolute?

Or is there another technique or method recommended for adding an image to a PDF file that is being exported?

Thanks,
M.T.



Shinu
Top achievements
Rank 2
 answered on 03 Oct 2011
1 answer
94 views
How can I refresh a grid using script when I'm using a RadGrid1_NeedDataSource?  I've tried most of all of the sugestions in the forum but nothing seems to work.  I have a time stamp column in my datasource so I can tell when it was last updated.
My last attempt was
function refreshGrid()
{
 $find("<%= RadGrid1.ClientID %>").get_masterTableView().rebind(); 
}

Update information.  I'm using a usercontrol in DotNetNuke6.  I've researched and it seems  that its mostly an issue with the radAjaxManager.  I'm still haveing problems with putting the manager on the parent page programmatically from the user control.  I'm using

Dim manager As New RadAjaxManager()

manager.ID = "RadAjaxManager1"
Me
.Page.Form.Controls.Add(manager)
But I don't think it is getting registered.  If I can't get this last part to work I'm going to have to redo the entire structure.

As a hack work around a put a page refresh in the function OnClientClose

window.location.reload(true);
It's not very smooth but gets the job done for now.  Is there a better way?

Added information: I'm moving this question over to the Ajax forum since it more of an issue with the RadAjaxManager than with the RadGrid.  Sorry for the post but I did not see a way to delete.

 

Thanks

 

 

 

 

 

 

 

 

 

 


Iana Tsolova
Telerik team
 answered on 03 Oct 2011
1 answer
73 views
Hello,

I have a situation where I load a RadRating control alongside a video to allow users to rate it.  I have a client side method attached to the "OnClientRating" event to capture the user entry and save it into the database.

Below it, I have a grid of other videos.  When a user clicks on the one of the videos in the grid, I get the current rating value for that video and try to set it to the rating control via the "Rating.set_value" client side api method.  However, this is causing the control to fire the "OnClientRating" event again, with the current value as the rating.  This causes a new "rating", but it was not initiated by the user, but rather via the the "set_value" method.

Is there a way to NOT fire the OnClientRating event when executing the "set_value" method?  Or, is there another way I should approach this?

Thank you.
Princy
Top achievements
Rank 2
 answered on 03 Oct 2011
1 answer
48 views
I have followed most of the following thread:
http://www.telerik.com/community/forums/aspnet-ajax/grid/custom-insertcommand.aspx
However I can't get the radwindow to show.  If I run the code from a button click event it opens and displays fine if I run it from the

RadGrid1_ItemCommand then it does not show.  I know that event is firing since I have a trace log file within the process.

If e.CommandName = RadGrid.InitInsertCommandName Then
           e.Canceled = True
 
           Dim newwindow As Telerik.Web.UI.RadWindow = New Telerik.Web.UI.RadWindow()
           newwindow.ID = "RadWindow1"
           newwindow.NavigateUrl = "/portals/0/NewEducation.aspx?RecID=0"
           newwindow.OnClientClose = "OnClientClose"
           newwindow.Width = New Unit(650)
           newwindow.Height = New Unit(580)
           newwindow.VisibleOnPageLoad = True
           newwindow.Modal = True
           RadWindowManager1.Windows.Clear()
           RadWindowManager1.Controls.Add(newwindow)
       End If

Please help.  Thanks

My grid is in an asp.update panel

Added information.  It seems that it's an issue with Ajax.  I removed the asp.update panel and it works fine but with a postback I added a
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="RadGrid1">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
   </telerik:RadAjaxManager>
 and again it does not show. Is there a way to have the best of both worlds?  Ajax and also a custom window when the add new record is clicked? 
William
Top achievements
Rank 1
 answered on 02 Oct 2011
0 answers
78 views
hi
hello guys how are you ,,,,

im working on an old system include graph reports ..... i need to Edit this reports,,,,, when i finish editing and try to save changes this message appears

"" this report was saved in previous version of crystal report using an older report file format if this report re-saved in the current version the file will be upgraded to to a new file format which may not compatible with previous version of crystal report ""

when i save it the report does not open ,,,,,,

this problem appears only in the Chart Reports and the Error Message Is " the webservice is stop working "Error Loading RadChart image " "

i undo this action but really need to change it ,,,,,
Regards

Haetham
Top achievements
Rank 1
 asked on 02 Oct 2011
0 answers
41 views
I have Binded the data to the treeview using dataset. Now i have even set the color of Parent Node.But unable to apply the Color or style to Child node after binding the data... Please help
Vivek Tyagi
Top achievements
Rank 1
 asked on 02 Oct 2011
17 answers
2.6K+ views
Hello,

On page 25, section 1.6, it states:

"RadControls for ASP.NET AJAX requires a ScriptManager before any of the controls on the page. You may instead use the RadScriptManager although it is not required. RadScriptManager has some optimization capabilities that can be used for maximum performance."

 

I ran the first application from the Training Guide (PDF page 34), and I am getting the below error about the web.config file and using the SmartTag to configure this control as well as the RadScriptManager control:

'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager

Where does this control belong on the page and how do I fix the web.config so that this lesson can run in the browser correctly?

Thanks,
R2

 

John
Top achievements
Rank 2
 answered on 02 Oct 2011
0 answers
67 views
Hi Everyone!

I need to limit visibility to certain root menu items based on Active directory roles.

Anyone have an idea how to implement this?

Thanks in Advance!


Dave
Dave
Top achievements
Rank 1
 asked on 01 Oct 2011
3 answers
81 views
hi 
i am using the rad combo box and its working perfect beside one issue. 
here is the scenario:
i clicking the combo box and its displays me the items list
then i selecting the item i want .then i post back to get the data i requested.
then the combo box text is the last item i selected . its good so far but when i
clicking back in combo box it opens but displays only the last item, until i 
deleting it and then displays all the items.


i am using stored proc to get data.


here is my code:
<telerik:RadComboBox
                ID="RadComboBox1" runat="server"
                Width="277px" Height="140px"
                EmptyMessage="Type in..."
                DataTextField="Item"             
                OnItemsRequested="RadComboBox1_ItemsRequested"
                AutoPostBack="true"
                EnableLoadOnDemand="true"
                Filter="Contains"
                LoadingMessage="Loading..."
                MarkFirstMatch="true"
                 
                 >
            </telerik:RadComboBox>

thank you!
yaniv
Top achievements
Rank 1
 answered on 01 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?