Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
206 views

I have this column in my RadGrid:

<telerik:GridTemplateColumn DataField="Data" HeaderText="Image" UniqueName="Upload">
   <ItemTemplate>
     <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("Data") %>'
                                            AutoAdjustImageControlSize="false" Height="126px" Width="180px" ToolTip='<%#Eval("Name", "Photo of {0}") %>'
                                            AlternateText='<%#Eval("Name", "Photo of {0}") %>'></telerik:RadBinaryImage>
      </ItemTemplate>
  <EditItemTemplate>
 <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" OnClientFileUploaded="OnClientFileUploaded"
                                            AllowedFileExtensions="jpg,jpeg,png,gif" MaxFileSize="1048576" onvalidatingfile="RadAsyncUpload1_ValidatingFile">
  </telerik:RadAsyncUpload>
 </EditItemTemplate>
</telerik:GridTemplateColumn>

and I am battling to export the content of the grid to pdf since the result I get does not show the pictures.

These are my export settings:

 <ExportSettings ExportOnlyData="True" FileName="InventoryWilton" IgnorePaging="True">
                            <Pdf PageWidth="21cm" PageHeight="19cm" PaperSize="A4">
                            </Pdf>
                            <Csv EncloseDataWithQuotes="False" />
                        </ExportSettings>
 

How can I export the grid to pdf including the binary images?

Thanks for helping

 

 

 

Felice
Top achievements
Rank 1
 answered on 23 Jun 2015
1 answer
183 views

when I create a dynamically control within RadWizard, for example:

// Code Behind

Label mylabel = new Label ();             

myetiqueta.ID = "lbl" + step.UniqueID; // step is a variable type RadWizardStep             

etiqueta.Text = "Any Value"             

step.Controls.Add (label); // Add control

if I want to access control in the code behind, for example

RadWizard.WizardSteps [0] .Controls [0];
I do not have access to control, is there any solution?

Plamen
Telerik team
 answered on 23 Jun 2015
1 answer
330 views

I know I can do this with code, but is there no way to populate a Datasource InsertParameter from a control?  In this case I want to update the datasource of a second grid with a value in the selected row of the first grid.

<asp:SqlDataSource ID="dsCommodities" runat="server" ConnectionString="<%$ ConnectionStrings:Market_Directory.My.MySettings.dbConnStr %>" DeleteCommand="DELETE FROM [Commodity] WHERE [CommodityID] = @CommodityID" InsertCommand="INSERT INTO [Commodity] ([CommodityName], [SortOrder], [Published], [MaterialID]) VALUES (@CommodityName, @SortOrder, @Published, @MaterialID)" SelectCommand="SELECT [CommodityID], [CommodityName], [SortOrder], [Published], [MaterialID] FROM [Commodity] WHERE ([MaterialID] = @MaterialID) ORDER BY [SortOrder]" UpdateCommand="UPDATE [Commodity] SET [CommodityName] = @CommodityName, [SortOrder] = @SortOrder, [Published] = @Published, [MaterialID] = @MaterialID WHERE [CommodityID] = @CommodityID">
    <DeleteParameters>
        <asp:Parameter Name="CommodityID" Type="Int32" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="CommodityName" Type="String" />
        <asp:Parameter Name="SortOrder" Type="Int32" />
        <asp:Parameter Name="Published" Type="Boolean" />
        <asp:ControlParameter ControlID="grdMaterials" DefaultValue="-1" Name="MaterialID" PropertyName="SelectedValue" Type="Int32" />
    </InsertParameters>
    <SelectParameters>
        <asp:ControlParameter ControlID="grdMaterials" DefaultValue="-1" Name="MaterialID" PropertyName="SelectedValue" Type="Int32" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="CommodityName" Type="String" />
        <asp:Parameter Name="SortOrder" Type="Int32" />
        <asp:Parameter Name="Published" Type="Boolean" />
        <asp:Parameter Name="MaterialID" Type="Int32" />
        <asp:Parameter Name="CommodityID" Type="Int32" />
    </UpdateParameters>
</asp:SqlDataSource>

 

Viktor Tachev
Telerik team
 answered on 23 Jun 2015
3 answers
85 views

I've implemented StripFormattingOptions and StripFormattingOnPaste (set to AllExceptNewLines) to strip formatting and OnClientPasteHTML to display an alert to the user that the formatting is being stripped from the pasted text. This works fine in IE and Firefox, but in Chrome and Safari the OnClientPasteHTML also fires when the user hits the Enter key while in the Rad Editor.

 

Has anybody else seen this behavior and what can I do to resolve it (other than removing the alert)?

Ianko
Telerik team
 answered on 23 Jun 2015
1 answer
139 views

From what I can tell OnBatchEditCellValueChanged triggers on blur of the field. Am I correct in this assumption? 

Konstantin Dikov
Telerik team
 answered on 23 Jun 2015
1 answer
172 views

I am using the following code in my template to show social share buttons for FB, Twitter and LinkedIn.  A peculiar thing I am noticing is that the FB button doesn't always show and I am not observing any pattern for when it appears or hides.

<telerik:RadSocialShare ID="SocialShare" runat="server">
    <MainButtons>
        <telerik:RadFacebookButton />       
        <telerik:RadTwitterButton />
      <telerik:RadLinkedInButton />
    </MainButtons>
</telerik:RadSocialShare>

Has anyone else noticed this behaviour and found a solution?

Danail Vasilev
Telerik team
 answered on 23 Jun 2015
3 answers
325 views

The open sub menu function only works when the >
image is selected, not anywhere in the item (as would be expected)

But when going back the user can select any area in
the menu item and it will go back correctly (as you would expected)

 

It has been like this for some years or am I doing something wrong? 

James Shelton Agar
Top achievements
Rank 2
 answered on 23 Jun 2015
1 answer
638 views

Hi,

 I have master page and there are  child pages that is using ajaxmanager. Now  we had requirement to add one button on master page and if user click on this button, whole page don't need to be refresh. I was trying to add ajaxmanager on Masterpage but there was an error saying only one instance of ajaxmanager can be used. Is there any other way?

 Thank you.

 Best regards,

Ei Wai

 

Viktor Tachev
Telerik team
 answered on 23 Jun 2015
13 answers
694 views
Hi

I am trying to make my radgrid (which is wrapped in a usercontrol) "readonly".
For this I need to remove the "Add New Record" button and the "Edit" and "Delete" columns of the grid.
I have got the following code to work where the "Edit" and "Delete" columns get removed for the master as well as all the detail tables (I have 4 levels of details), but when it comes to removing the "Add New Record" from the command item bar only the button on the MasterTable gets removed.  Any ideas what I am missing here or how I could hide  the button  on detail tables?

protected override void OnPreRender(EventArgs e)
{
  //Complete normal prerender stuff.
  base.OnPreRender(e);
 
  if (ReadOnly)
  {
    MakeGridReadOnly(MasterTableView);
  }
 
}
 
private static void MakeGridReadOnly(GridTableView radGridTableView)
{
  HideAddNewCommandButton(radGridTableView);
  HideEditDeleteColumns(radGridTableView);
 
  foreach (var detailView in radGridTableView.DetailTables )
  {
    MakeGridReadOnly(detailView);
  }
 
}
 
private static void HideAddNewCommandButton(GridTableView radGridTableView)
{
  if (radGridTableView.GetItems(GridItemType.CommandItem).Length <= 0) return;
  var commandItem = radGridTableView.GetItems(GridItemType.CommandItem)[0];

  var newRecordButton = commandItem.FindControl("AddNewRecordButton");
  if (newRecordButton != null)  newRecordButton.Visible = false;
 
  var initInsertButton = commandItem.FindControl("InitInsertButton");
  if (initInsertButton != null) initInsertButton.Visible = false;
 
}
 
private static void HideEditDeleteColumns(GridTableView radGridTableView)
{
  try
  {
    GridColumn editColumn = radGridTableView.Columns.FindByUniqueName("EditCommandColumn");
    if (editColumn != null)
      editColumn.Visible = false;
  }
  catch
  {
  }
 
  try
  {
    GridColumn deleteColumn = radGridTableView.Columns.FindByUniqueName("DeleteCommandColumn");
    if (deleteColumn != null)
      deleteColumn.Visible = false;
  }
  catch
  {
  }
}
Eyup
Telerik team
 answered on 23 Jun 2015
0 answers
154 views

Hello,

      I use the onbeforeunload javascript event in asp.net page. What i want is to custom message display and change the button name when message come if page leaving or close, this is not achievable in firefox higher version and this is drawback for firefox higher version.

Default message when page leaving : This page is asking you to confirm that you want to leave - data you have entered may not be saved.

I want to know that any work can be achieved from telerik side. I think you understand my query.

If any work can be achieved that will be appreciated thing.

Pl. help me  and suggest any work which can be work properly.

Thanks

 Jiten Mutum

 

 

 
 
 
Jiten
Top achievements
Rank 1
 asked on 23 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?