telerik gridview export to pdf in win forms - telerik

telerik gridview export to pdf in win forms.
hi i want to get pdfexport from telerik grid and i search on the web and find answer on Telerik gridview export images not working winforms
private void RunExportToPDF(string fileName, ref bool openExportFile)
{
GridViewPdfExport pdfExporter = new GridViewPdfExport(this.dataGridView1);
pdfExporter.RunExport(#"C:\New.pdf", new PdfExportRenderer());
}
but i still have error. any one can help me??
enter image description here

Related

Kendo UI Grid Excel export issues

I'm trying to use the (relatively new) built-in Excel and PDF export features in Kendo UI grid, which seem pretty straightforward. The PDF downloads with all of the data, but the Excel file just has the column headers with no data.
Just trying for the most basic implementation of this at the moment; in the grid init block I have:
$("#accountsContactsGrid").kendoGrid({
toolbar: ["excel", "pdf"],
excel: {
fileName: "DonorsGridExport.xlsx",
filterable: true
},
pdf: {
fileName: "DonorsGridExport.pdf"
},
dataSource: { <snip rest of datasource code...> }
});
The grid shows fine in the browser as well as the PDF. It's just the Excel that is the exception, with no data showing.
I also tried pulling the buttons outside of the toolbar and using the saveAsExcel and saveAsPDF functions, and I get the same result (PDF works, Excel has no data).
Any ideas why the data would go missing just for the Excel export?

Render Anchor by using Glassmapper in sitecore mvc

I am facing problem for rendering the anchor by using the glass mapper in sitecore mvc.
This is the code I have used to render the link:
#RenderLink(promoWidget, x => promoWidget.Link, new System.Collections.Specialized.NameValueCollection { { "target", promoWidget.Link.Target },{"class",promoWidget.Link.Class}}, true, contents: promoWidget.Link.Text)
But when from sitecore we select the link and click on insert anchor I put the text and anchor text. When I display this link by using above code it will render link this:
product
It is showing 2 times product#product. I want to display only once #product.
How can I do this?
Appreciate the help
Thanks,
Amol

clearable textbox

I am trying to create an app with no of clearable textboxes (a textbox with a 'x' inside, on clicking 'x' datas gets cleared in textbox).
I gone thru 2 links this one and this one, it wasnt helpful.
Can any one help to create a function for it?
not sure what the exactly problem you are facing. you can achieve this by having a textbox and a roundbutton (coding4fun) in a grid (adjacent columns)
the tap on button clears the textbox. you can even create yourself a nice user control that wraps the code nicely so you can have multiple instances.
Something like that?
public TextBox CreateTextBox(string defaultText)
{
var tb = new TextBox { Text = defaultText };
tb.GotFocus += new RoutedEventHandler((object sender, RoutedEventArgs e) =>
{
if (tb.Text == defaultText)
tb.Text = "";
});
return tb;
}
Full Disclosure: I work at Telerik and our TextBox has this functionality built in:
http://www.telerik.com/products/windows-phone/overview/all-controls.aspx
You missed out this Link. It has a custom control "ClearableTextbox" which may suit your requirements.
You can download the source code which includes the dll file as well.
Include a reference to that dll in your project and then add the following line in the xaml page,
xmlns:clrtb="clr-namespace:ClearableTextBox;assembly=ClearableTextBox"
And then you can use the textbox something like,
<clrtb:ClearableTextBox Width="300" Height="60" VerticalAlignment="Top"/>
As the source code is available, you can make some modifications to it, so that it fits your requirements
UPDATE:
Alternately, I found this great control which makes your task easy:
PhoneTextBox in SilverlightWP7 toolkit

How to pass the image value in one xaml page to another xaml page in windows phone 7?

My Requirement is,
in first xaml page place all the images .if whenever click on particular image that image can be displayed in another xaml page .How To pass The image value from one xaml page to another xaml page for windows phone 7 app developement using silverlight.
There's a good screencast on different ways of navigating between pages (and passing values) from DimeCasts.net at http://www.dimecasts.net/Casts/CastDetails/174
As an example of one way of doing this (and assuming the images were in a ListBox) would be to add the following to the SelectionChanged event.
private void OnSelectedImageChanged(object sender, SelectionChangedEventArgs e)
{
NavigationService.Navigate(new Uri(string.Format("/image/{0}", HttpUtility.UrlEncode(((sender as ListBox).SelectedItem as PhotoViewModel).uri)), UriKind.Relative));
}
The above assumes an appropriately mapped route like:
<nav:UriMapping Uri="/image/{image}" MappedUri="/Image.xaml?u={image}" />
and that the original listbox was bound to the uri property of a PhotoViewModel object.
Hopefully, watching the screencast should make any of the above clearer.

Retrieve SharePoint List Data and bind this to a dropdownlist

I'm fairly new to SharePoint so apologies in advance for sounding like a 'Newbie'.
I have created a simple Webpart, which uses a Web User Control - [.ascx file] to provide all the controls for the Webpart. On the .ascx file, there is a DropDownList which is hard-coded at the moment and works well in the Webpart (within a SharePoint site).
However, I want the DropDownList on the .ascx file to be bound to a particular Column of a SharePoint List, so that when I update that column of the SharePoint List, the DropDownList reflects the update automatically.
Do any of you kind folk have any ideas on how to achieve this please?
Thank you very much in advance,
Ash 8-)
(p.s. Happy New Year to you All !)
I found the answer within minutes of posting the above article (typical).
The solution is to place the following code in the Page_Load event of the .ascx.cs (code-behind) file:
if (!Page.IsPostBack)
{
using (SPSite site = new SPSite("http://yoursharepointsite"))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["NameOfYourList"];
dropSite.DataSource = list.Items;
dropSite.DataValueField = "Title"; // List field holding value - first column is called Title anyway!
dropSite.DataTextField = "Title"; // List field holding name to be displayed on page
dropSite.DataBind();
}
}
}
I found the solution here:
http://blogs.msdn.com/mattlind/archive/2008/02/12/bind-a-asp-dropdownlist-to-a-sharepoint-list.aspx
Thanks,
Ash

Resources