This is a migrated thread and some comments may be shown as answers.

[Solved] How to get only RawHTML string

1 Answer 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
pradip
Top achievements
Rank 1
pradip asked on 04 Apr 2009, 06:09 AM
Hi

Is there anyway to get only "RawHTML", without calling PDF export event? Or is there anyway I can

The inside RawHTML is useful for me but i do NOT want to create PDF.

Thanks,
Pradip

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 07 Apr 2009, 11:45 AM
Hello Pradip,

Try the following:
<script type="text/javascript" language="javascript"
    function gethtml() 
    { 
        var styleStr = "<head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>"
        var sh = '<%= ClientScript.GetWebResourceUrl(RadGrid10.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",RadGrid10.Skin)) %>'
        var htmlcontent = styleStr + "<body>" + $find('<%= RadGrid10.ClientID %>').get_element().innerHTML + "</body>"
        alert(htmlcontent); 
    } 
</script> 


<telerik:RadGrid ID="RadGrid10" runat="server" Skin="Black" /> 

protected void Page_Load(object sender, EventArgs e) 
    RadGrid10.DataSource = new int[] { 0, 1, 2, 3, 4 }; 

Regards,
Daniel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
pradip
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or