Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 views

Hi All,
I have problem with RibbonBar, I have it on my page, it is added to ajaxmanager. The code on the page look like this

<telerik:RibbonBarTab Text="MyApp">

 

<telerik:RibbonBarGroup Text ="Docs">

 

 

<Items >

 

 

<telerik:RibbonBarButton ID="rbbHelp" Size="Large" Text="Help" ImageUrlLarge="Ikcsy/Png/Help.png" />

 

 

 

 

 

then in code file a have a fuction

protected void RadRibbonBar1_ButtonClick(object sender, RibbonBarButtonClickEventArgs e)

{

 

 

 

 

 

switch

(e.Button.Text.ToString())

 

 

{

 

 

case "Help":
try
{

 

 

Response.Clear();

 

 

Response.ContentType =

 

"text/pdf";

 

Response.AppendHeader("Content-Disposition", "attachment; filename=" + "HelpFile" + ".pdf" );

 

 

 

 

string file_path ="\\Help\\HelpFile.pdf";

 

 

Response.TransmitFile(file_path);
Response.End();

 

 

}

 

catch(Exception ex)

 

 

{

 

 

 

 

}

 

break;

 

 

 

}
}
after I clicked the button i get an error after Response.End :
ex = {Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.} and after this I get on page jscript error Sys.WebForms.PageRequestManagerParserErrorException. What can I do to download/transmit the file correctly ?

Regargs.
Tomek

Simon
Telerik team
 answered on 05 Apr 2011
3 answers
526 views
Hi, 
In each row of my RadGrid I have a CheckBox as shown below.
<telerik:GridTemplateColumn HeaderText="Is Critical?" HeaderButtonType="TextButton" UniqueName="critical">
    <ItemTemplate>                                                                   
        <asp:CheckBox ID="chkCritical" runat="server" />
    </ItemTemplate>                                                                
</telerik:GridTemplateColumn>

When the user checks the CheckBox system makes an ajax call from clientside and updates the database. This part is working fine.
I want change the row background color on check/uncheck of the CheckBox on clientside. Could not find a method to set background color on DataItem. Please help.
Pavlina
Telerik team
 answered on 05 Apr 2011
3 answers
138 views
Is it possible to hide a tab from code (c#).  I don't see a visibility property.
Simon
Telerik team
 answered on 05 Apr 2011
9 answers
170 views
Hi,

I have a standalone ImageManger on the page which is not taking the correct globalization settings from the thread.

I have

Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE")
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE")

In Code behind but it is falling back to the default culture from web.config.

How can I set the dialog language correctly?

Marc
Rumen
Telerik team
 answered on 05 Apr 2011
5 answers
158 views
Hi, I have a RadGrid that gets bound with template columns that contain a single image (it's an indicator light). Here's the code for the template column:

Public Class GridImageItemColumn 
   Inherits GridTemplateColumn 
 
   Public Class GridImageItemTemplate 
      Implements ITemplate 
       
      Public column As GridImageItemColumn = Nothing 
  
      Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn 
         Dim image as New Image() 
         image.ID = Me.column.UniqueName 
         container.Controls.Add(image) 
         AddHandler image.DataBinding, AdressOf image_DataBinding 
      End Sub 
 
      Private Sub image_DataBinding(ByVal sender As ObjectByVal e As EventArgs) 
         Dim dataItem As GridDataItem = CType(CType(sender, Control).NamingContainer, GridDataItem) 
         If dataItem IsNot Nothing Then 
         Dim image As Image = CType(sender, Image) 
         image.CssClass = "t_img" 
         Dim value As String = DataBinder.Eval(dataItem.DataItem, Me.column.DataField).ToString() 
         If Not String.IsNullOrEmpty(value) Then 
            image.ImageUrl = "~/images/" & value & ".png" 
         End If 
      End Sub 
   End Class 
 
   Public Sub New() 
      Dim template As New GridImageItemTemplate() 
      template.column = Me 
      Me.ItemTemplate = template 
   End Sub 

What I'm wondering is, how can I dynamically tooltipify these indicator lights? I've tried to do it via how the example states:
Me.RadToolTipManager1.TargetControls.Add(target.ClientID, (TryCast(e.Item, GridDataItem)).GetDataKeyValue("ID").ToString(), True

but .. that doesn't work since I have no way to find the target Image control, since the name isn't static (it isn't static, because there are n number of these columns).

Any clues?
Svetlina Anati
Telerik team
 answered on 05 Apr 2011
1 answer
73 views
Dear Telerik's team support,

I have the issue about RadGrid.
It's not display data when I use IE 9.0 browser (showed in IE 7,8, Firefox, Chrome).

Please help me this issue, thanks

Best Regards,
Trung Tin
Martin
Telerik team
 answered on 05 Apr 2011
1 answer
216 views

Hi Guys,

I publish my web app to several server. But one of my installation returns ajax exceptions. I check the system date and it's correct.

You can find the fiddler detail and ie error message below.


-------------------------IE error message ..
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.2)
Timestamp: Tue, 5 Apr 2011 08:26:16 UTC

Message: ASP.NET Ajax client-side framework failed to load.
Line: 44
Char: 34
Code: 0

----------------------- Fiddler message

URL http://pc:80/sharestore/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=sm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a3f7f575c-f971-4b26-8881-745c41ac5a2c%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.1.329.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a9f6c9f10-1e09-4cc8-989d-ef8c903e2042%3a16e4e7cd%3a86526ba7%3a874f8ea2%3af7645509%3a24ee1bba%3ae330518b%3a1e771326%3ac8618e41%3ae4f8f289%3a6a6d718d%3a7165f74%3af46195d3%3aaa288e2d%3a11a04f7e%3a5836


Regards ...
Sebastian
Telerik team
 answered on 05 Apr 2011
11 answers
459 views
I am using a RadMenu in a Master Page and on the page that uses the master page I am having a button display a Modal Popup Panel.  When the panel gets moved it show it behind the Menu hence not fully behaving like a Modal popup window.  Is anyone else noticing this behavior and have a fix for it?
Sebastian
Top achievements
Rank 1
 answered on 05 Apr 2011
1 answer
289 views

Hello,

I have a window (used to display error messages) which resides on the master page. This window is then called by a publically accessable function on the master code behind which can be accessed by the child pages. Now, if I attempt to use the RadGrid RowDrop function and an error occurs, the master window does not display. The window does appear if I force an error (give an invalid stored procedure name) on the population method, but in this situation a full page laod accurs.

I would greatly appreciate your assistance.


See sample code example below:

Master Page
--------------------
public void Show_Error_Msg(String strLocation, String strError)
{           
            RadWindow objWindow = RadWindowManager1.Windows[0];
            (objWindow.ContentContainer.FindControl("lbl_error_local") as Label).Text = strLocation;
            (objWindow.ContentContainer.FindControl("lbl_error_msg") as Label).Text = strError;
            objWindow.VisibleOnPageLoad = true;
 }  

Content Page
---------------------

protected void RadGrid1_RowDrop(object sender, GridDragDropEventArgs e)
{
      try{
            throw new Exception("This is the error from the RowDrop function");
      }
      catch(exception err){ Master.Show_Error_Msg("Row Drop", err.Message.ToString()); }
}
           
Svetlina Anati
Telerik team
 answered on 05 Apr 2011
4 answers
221 views
Hi i have problem with size window in IE9. Size of window is not same in IE8 and IE9. Top window on image is in IE9 bottom window is in IE8.
NavigateUrl = http://content.gopas.cz/demo/MSOffice2010cz/14exc3/14exc34m.htm
My code:
<telerik:RadWindow ID="DemoLessionWindow" Skin="Web20"  runat="server" VisibleStatusbar="false" BackColor="Black"
    VisibleTitlebar="true" OffsetElementID="offsetElement" Width="1028" Height="690"
     Behaviors="Close" KeepInScreenBounds="false" Modal="true" ShowContentDuringLoad="false"  >
</telerik:RadWindow>
Svetlina Anati
Telerik team
 answered on 05 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?