Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
243 views

RadHtmlChart - I am looking into a way to export all the images (or svg's) in a HtmlChartHolder.
I saw this update here but have heard no help posted there yet. http://www.telerik.com/support/code-library/exporting-radhtmlchart-to-png-and-pdf

my issue is the text does not show up. it may be a permissions issue or the font library looking in the wrong place.

I have tried the fixes suggested there but I still only get 1 image without text created.
also I look at the page and there is the HtmlChartHolder in a div and then multiple svg's inside it of my charts.
so I think I would need a way to loop them and send them all to the server to be created into an image.

maybe I should look into a different svg to image on server program?
also, I have done some image combining myself so if I can get to those images put into a folder such as img01.jpg, img02.jpg etc etc I have my own code to combined them I can use (if nothing out of the box does it)

Doug

Danail Vasilev
Telerik team
 answered on 19 May 2015
1 answer
157 views

Dear Team,

I'm creating a TileList Dynamically using the below code. The content template tile is having a anchor tag, when  I click  on it the associated method has to be called. Instead of calling the click event associated to anchor tag, the RadTileList onclickclick event is getting fired. Please help on this. Below is the code.

 

  <asp:UpdatePanel ID="UpdatePanelTileList" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<telerik:RadTileList runat="server" AutoPostBack="false" OnClientTileClicking="OnClientTileClicking" ID="ProjectAssetsTileList"
Width="97%"
EnableDragAndDrop="true" OnTileDataBound="ProjectAssetsTileList_TileDataBound"
SelectionMode="Multiple">
</telerik:RadTileList>
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function OnClientTileClicking(titleList, args) {
debugger;
alert('hi');
args.set_cancel(true);
$telerik.cancelRawEvent(args);
return false;
}
function MyFunctionEdit() {
alert('hi edit');
return false;
}
</script>
</telerik:RadScriptBlock>

</ContentTemplate>
</asp:UpdatePanel>

 Tile creation Code:

private class ContentTemplate : ITemplate
{
private DomainDAL.ProjectAsset asset;

public ContentTemplate(DomainDAL.ProjectAsset asset)
{
this.asset = asset;
}
public void InstantiateIn(Control container)
{
string tileContent = string.Empty;
if (asset==null)
{
tileContent = @"<div class='card add'>
<div class='dotted-box'>
<h1>+</h1>
</div>
<div class='menu'>
<ul class='list-group'>
<a href='#' class='list-group-item' data-toggle='modal' data-target='#text-edit-lightbox'><span class='icon icon-text'></span>Add Text Frame</a>
<a href='#' class='list-group-item' data-toggle='modal' data-target='#image-library'><span class='icon icon-media'></span>Browse Media Library</a>
<a href='#' class='list-group-item' data-toggle='modal' data-target='#upload-library'><span class='icon icon-upload'></span>Upload images or videos</a>
</ul>
</div>
</div>";
}
else if (asset.ContentType==Constants.ContentType.Image )
{
tileContent = @"<div class='card' onclick='alert(hidiv);'><div class='card-wrapper'>
<div><img src='" + String.Format("{0}/{1}/{2}", BLOB_ROOT_URL, asset.Container, asset.ImageUrl) + @"' class='thumb-image'/>
<div class='pull-righ static-icon'>
<span class='close'><img src='../images/icons/icon-trash.png'/></span>
</div>
<div class='backdrop' >
<a href='javascript:MyFunctionEdit();' class='btn btn-transparent' data-toggle='modal' data-target='#image-editing'>Edit</a>
<span class='close'><img src='../images/icons/garbage.png'/></span>
</div>
</div>
<div>
<h4><img src='../images/icons/icon-photo.png' class='icon-margin'/>" + asset.Caption + @"</h4>
<p>Lorem ipsum dolor sit amet, conset adipiscing elit.</p>
</div>
</div>
</div>";
}
else
{
tileContent = @"<div class='card'><div class='card-wrapper'>
<div><div class='text-tile'><h2>" + asset.AssetName + @"</h2><h4>" + asset.Caption + @"</h4></div>
<div class='pull-righ static-icon'>
<span class='close'><img src='../images/icons/icon-trash.png'/></span>
</div>
<div class='backdrop'>
<a href='href='javascript:void(0)' onclick='event.preventDefault();alert(hi);' class='btn btn-transparent' data-toggle='modal' data-target='#image-editing'>Edit</a>
<span class='close'><img src='../images/icons/garbage.png'/></span>
</div>
</div>
<div>
<h4><img src='../images/icons/icon-photo.png' class='icon-margin'/>" + asset.Caption + @"</h4>
<p>Lorem ipsum dolor sit amet, conset adipiscing elit.</p>
</div>
</div>
</div>";
}
LiteralControl literal = new LiteralControl(tileContent);
container.Controls.Add(literal);

}
}

 

Bind Data to Tile List 

 protected void BindDataToTileList(List<DomainDAL.ProjectAsset> workingProjectAssets)
{
if (ProjectAssetsTileList.Groups.Count>0)
ProjectAssetsTileList.Groups.RemoveAt(0);
TileGroup group = new TileGroup();
foreach (DomainDAL.ProjectAsset asset in workingProjectAssets.Where(x => x.State != (int)Constants.AssetStatus.Deleted))
{
RadContentTemplateTile contTile = new RadContentTemplateTile();
contTile.ContentTemplate = new ContentTemplate(asset);
contTile.CssClass = "card";
group.Tiles.Add(contTile);
}
RadContentTemplateTile newAssetTile = new RadContentTemplateTile();
newAssetTile.ContentTemplate = new ContentTemplate(null);
newAssetTile.CssClass = "card add";
group.Tiles.Add(newAssetTile);
ProjectAssetsTileList.Groups.Add(group);

}

 

 

 

 

 

 

 

 

 

 

 

Marin Bratanov
Telerik team
 answered on 19 May 2015
1 answer
74 views
Is any option to use RadGrid in disconnected mode. So when user lost connection with internet(intranet), he can continue to work with grid - add new record, edit records. In html 5 appear such technologies like HTML5 Storage,Web Sql. Is it any way to interact with them?
Konstantin Dikov
Telerik team
 answered on 19 May 2015
1 answer
62 views

Hi,

how can I achive the creation of a new ressource URL for my combined scripts?

I have read I need to update the version of the assembly in which my scripts are embedded.

How can I do this in a (old) web site project? Here I do not have a properties folder and a AssemblyInfo.cs file.

 

Many thanks for any help.

Dimitar Terziev
Telerik team
 answered on 19 May 2015
4 answers
102 views
Hi everybody!

I have one RadGrid using a DataTable as DataSource.
Everything works fine, except by the fact there is as extra empty column right in the first place in the grid.

Can someone tell me how could I remove this "ghost" column?

Thanks...
Kostadin
Telerik team
 answered on 19 May 2015
5 answers
232 views

This would seem easy but I've not been able to figure out how to change the GrandTotalHeaderColumn text.

 I am able to change column text for regular columns like this:

 

 

if (IsModelDataCellPlannedHeader(modelDataCell))
                       {
                           e.ExportedCell.Value = "Plan";
                       }
 
private static bool IsModelDataCellPlannedHeader(PivotGridBaseModelCell modelDataCell)
       {
           return modelDataCell.TableCellType == PivotGridTableCellType.ColumnHeaderCell &&
                  modelDataCell.Field.UniqueName == "Plan";
 
       }

 

 This works fine but I cannot figure out how to tell if a column is a GrandTotalColumn.

This code does not work:

 

private static bool IsModelDataCellPlanGrandTotalHeaderColumn(PivotGridBaseModelCell modelDataCell)
        {
            if (modelDataCell.TableCellType == PivotGridTableCellType.ColumnHeaderCell &&
             modelDataCell.CellType == PivotGridDataCellType.ColumnGrandTotalDataCell &&
                   modelDataCell.Field.UniqueName == "plannedValue")
            {
                return true;
 
            }
 
            if (modelDataCell.TableCellType == PivotGridTableCellType.ColumnHeaderCell &&
             modelDataCell.CellType == PivotGridDataCellType.RowGrandTotalColumnTotal &&
                   modelDataCell.Field.UniqueName == "plannedValue")
            {
                return true;
            }
            return false;
 
        }

Obviously I was just shooting in the dark. It would be nice if there was a TableCellType of GrandTotalColumnHeader. That would seem to make sense.

 Let me know if there is a way to do what I'm trying to do.

Thanks!

Maria Ilieva
Telerik team
 answered on 19 May 2015
1 answer
75 views

Right now the only way to do data-binding in the markup is to use NameField, DataFieldY, ColorField within the PieSeries tag. This requires a per record model. My current need requires a per field model such as with some of your other controls.

You include an Items tag where each telerik:SeriesItem can be manually defined. If I could data-bind them, then I could do something such as:

<Items>
    <telerik:SeriesItem NameField="A1" DataFieldY="B1" ColorField="C1" />
    <telerik:SeriesItem NameField="A2" DataFieldY="B2" ColorField="C2" />
    <telerik:SeriesItem NameField="A3" DataFieldY="B3" ColorField="C3" />
</Items>

To give some context my current usage is:

RadPanelBar
   ItemTemplate
      Panel
         RadHtmlChart + asp:Table

So you see I need to be able to do the data within the chart all as one record. This works as I know I have a static amount of items for the PieSeries. Currently I've been doing this all in my codebehind as I can do a local pivot of a subset of each record and treat it as three separate records:

DataTable chartData = GetChartData();
radHtmlChart.DataSource = chartData;
radHtmlChart.DataBind();
 
PieSeries pieChartSeries = new PieSeries();
pieChartSeries.NameField = "Name";
pieChartSeries.DataFieldY = "Percentage";
pieChartSeries.ColorField = "Color";
radHtmlChart.PlotArea.Series.Add(pieChartSeries);

Now I know it's possible to bind my chart to a separate datasource, but I'd rather not do a whole new query. If there were a way to have a source use another source and pivot the data such as an adapter, then I'd be open to that as well. I'm still new to all of this on the markup side of things and haven't learned enough of the differences between a asp:SqlDataSource and telerik:RadClientDataSource for example.

 Thanks!

Danail Vasilev
Telerik team
 answered on 19 May 2015
1 answer
137 views

Please see my grid HTML below. It used <telerik:GridTemplateColumn> and also <ItemTemplate> which may not support Virtualization.

What to changes to make for enabling Virtualization here?

 

 

001.<telerik:GridBoundColumn UniqueName="CourseID" DataField="CourseID" Visible="false" />
002.                              
003.                            <HeaderStyle HorizontalAlign="Center" Font-Bold="True" Font-Names="Arial" Font-Size="8pt">
004. </HeaderStyle>
005. <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Font-Size="8pt" Width="5%">
006. </ItemStyle>
007. </telerik:GridBoundColumn>
008.<telerik:GridBoundColumn UniqueName="ChoiceName" DataField="ChoiceName" HeaderText="Choice"
009. HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%" HeaderStyle-Font-Bold="true"
010. HeaderStyle-Font-Size="8" HeaderStyle-Font-Names="Arial" ItemStyle-Font-Size="8"
011. ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" FooterText=""
012. Visible="true">
013. <HeaderStyle HorizontalAlign="Center" Font-Bold="True" Font-Names="Arial" Font-Size="8pt">
014. </HeaderStyle>
015. <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Font-Size="8pt" Width="5%">
016. </ItemStyle>
017. </telerik:GridBoundColumn>
018. <telerik:GridBoundColumn UniqueName="ChoiceNo" DataField="ChoiceNo" HeaderText="Choice No"
019. Visible="false" HeaderStyle-Font-Bold="true" HeaderStyle-Font-Size="8" HeaderStyle-Font-Names="Arial"
020. ItemStyle-Font-Size="8" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
021. <HeaderStyle Font-Bold="True" Font-Names="Arial" Font-Size="8pt"></HeaderStyle>
022. <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Font-Size="8pt"></ItemStyle>
023. </telerik:GridBoundColumn>
024. <telerik:GridBoundColumn UniqueName="RatioPercent" DataField="RatioPercent" HeaderText="Ratio Percent"
025. HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%" HeaderStyle-Font-Bold="true"
026. HeaderStyle-Font-Size="8" HeaderStyle-Font-Names="Arial" ItemStyle-Font-Size="8"
027. ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" FooterText=""
028. Visible="true">
029. <HeaderStyle HorizontalAlign="Center" Font-Bold="True" Font-Names="Arial" Font-Size="8pt">
030. </HeaderStyle>
031. <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Font-Size="8pt" Width="5%">
032. </ItemStyle>
033. </telerik:GridBoundColumn>
034. <telerik:GridBoundColumn UniqueName="Equipment" DataField="Equipment" HeaderText="Equipment"
035. HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%" HeaderStyle-Font-Bold="true"
036. HeaderStyle-Font-Size="8" HeaderStyle-Font-Names="Arial" ItemStyle-Font-Size="8"
037. ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" FooterText=""
038. Visible="true">
039. <HeaderStyle HorizontalAlign="Center" Font-Bold="True" Font-Names="Arial" Font-Size="8pt">
040. </HeaderStyle>
041. <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Font-Size="8pt" Width="5%">
042. </ItemStyle>
043. </telerik:GridBoundColumn>
044. <telerik:GridBoundColumn UniqueName="Temperature" DataField="Temperature" HeaderText="Temperature"
045. HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%" HeaderStyle-Font-Bold="true"
046. HeaderStyle-Font-Size="8" HeaderStyle-Font-Names="Arial" ItemStyle-Font-Size="8"
047. ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" FooterText=""
048. Visible="true">
049. <HeaderStyle HorizontalAlign="Center" Font-Bold="True" Font-Names="Arial" Font-Size="8pt">
050. </HeaderStyle>
051. <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Font-Size="8pt" Width="5%">
052. </ItemStyle>
053. </telerik:GridBoundColumn>
054. <%--Cycle1 Starts--%>
055.<telerik:GridTemplateColumn UniqueName="Cy1" HeaderStyle-HorizontalAlign="Center" HeaderText="Cycle 1" HeaderStyle-Font-Bold="true"
056.HeaderStyle-Font-Size="8pt" ColumnGroupName="C1" HeaderStyle-Font-Names="Arial" ItemStyle-Font-Size="8" ItemStyle-VerticalAlign="Top" FooterText="">
057.<ItemTemplate>
058. <telerik:RadGrid ID="Cycle1Grid" runat="server" ShowGroupPanel="false" AllowSorting="false" GridLines="Both" ShowFooter="false"
059.AllowPaging="false" AutoGenerateColumns="false"
060.HeaderStyle-CssClass="tableHeading br" EnableViewState="false">
061. <ClientSettings>
062.<ClientEvents OnRowDataBound="gridRowBound" />
063. </ClientSettings>
064.<MasterTableView Name="tblCycle1" ShowGroupFooter="true" GridLines="Both" TableLayout="Fixed"
065. DataKeyNames="PK_Dish_id">
066. <Columns>
067. <telerik:GridBoundColumn UniqueName="PK_Dish_id" DataField="PK_Dish_id" Visible="false" />
068. <telerik:GridBoundColumn UniqueName="FK_Choice_Cycle_ID" DataField="FK_Choice_Cycle_ID"
069. Visible="false" />
070. <telerik:GridBoundColumn UniqueName="QMOS_DISH_ID" DataField="QMOS_DISH_ID" Visible="false" />
071. <telerik:GridBoundColumn UniqueName="FOOD_ARCHV" DataField="FOOD_ARCHV" Visible="false" />
072. <telerik:GridBoundColumn UniqueName="IsActive" DataField="IsActive" Visible="false" />
073. <telerik:GridBoundColumn UniqueName="EDUOM" DataField="UOM" Visible="false" />
074. <telerik:GridBoundColumn UniqueName="choiceNum" DataField="choiceNum" Visible="false" />
075. <telerik:GridBoundColumn UniqueName="Flow" DataField="Flow" Visible="false" />
076. <telerik:GridBoundColumn UniqueName="cycleNum" DataField="cycleNum" Visible="false" />
077. <telerik:GridBoundColumn UniqueName="ChoiceNo" DataField="ChoiceNo" Visible="false" />
078. <telerik:GridBoundColumn UniqueName="EdCourseId" DataField="EdCourseId" Visible="false" />
079. <telerik:GridBoundColumn UniqueName="EdChoiceId" DataField="EdChoiceId" Visible="false" />
080. <telerik:GridBoundColumn UniqueName="FoodItem" DataField="FoodItem" HeaderText="Description" HeaderStyle-Font-Bold="true"
081.HeaderStyle-Font-Size="8" HeaderStyle-Font-Names="Arial" ItemStyle-Font-Size="8" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Middle">
082. <HeaderStyle HorizontalAlign="Left" Width="180px" CssClass="sampleTest" Font-Bold="True" Font-Names="Arial" Font-Size="8pt"></HeaderStyle>
083. <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
084. </telerik:GridBoundColumn>
085. <telerik:GridBoundColumn UniqueName="Qty" DataField="Qty" HeaderText="Qty" HeaderStyle-Font-Bold="true" HeaderStyle-Font-Size="8" HeaderStyle-Font-Names="Arial"
086.ItemStyle-Font-Size="8" ItemStyle-HorizontalAlign="Right" ItemStyle-VerticalAlign="Middle">
087. <HeaderStyle HorizontalAlign="Center" Width="40px" Font-Bold="True" Font-Names="Arial" Font-Size="8pt"></HeaderStyle>
088. <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle"></ItemStyle>
089. </telerik:GridBoundColumn>
090. <telerik:GridBoundColumn UniqueName="Measure" DataField="Measure" HeaderText="Measure" HeaderStyle-Font-Bold="true" HeaderStyle-Font-Size="8"
091.HeaderStyle-Font-Names="Arial" ItemStyle-Font-Size="8" ItemStyle-HorizontalAlign="Right" ItemStyle-VerticalAlign="Middle">
092. <HeaderStyle HorizontalAlign="Center" Width="50px" Font-Bold="True" Font-Names="Arial" Font-Size="8pt"></HeaderStyle>
093. <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" ></ItemStyle>
094. </telerik:GridBoundColumn>
095. <telerik:GridBoundColumn UniqueName="UOM" DataField="UOM" HeaderText="UOM" HeaderStyle-Font-Bold="true" HeaderStyle-Font-Size="8" HeaderStyle-Font-Names="Arial"
096.ItemStyle-Font-Size="8" ItemStyle-HorizontalAlign="Right" ItemStyle-VerticalAlign="Middle">
097. <HeaderStyle HorizontalAlign="Center" Width="40px" Font-Bold="True" Font-Names="Arial" Font-Size="8pt"></HeaderStyle>
098. <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" ></ItemStyle>
099. </telerik:GridBoundColumn>
100. <telerik:GridBoundColumn UniqueName="EditItem" >
101. <HeaderStyle Width="50px" />
102. </telerik:GridBoundColumn>
103. 
104. </Columns>
105. </MasterTableView>
106. </telerik:RadGrid>
107. <asp:Button runat="server" ID="btncycle1" style='float:right;' Text="Add New Ingredient" OnClientClick="addNewItem(this); return false;" />
108. </ItemTemplate>
109. <HeaderStyle HorizontalAlign="Center" Font-Bold="True" Font-Names="Arial" Font-Size="8pt"></HeaderStyle>
110. </telerik:GridTemplateColumn>
111. <%--Cycle1 End--%>
112. 
113. <%--Cycle2 Starts--%>
114.<telerik:GridTemplateColumn UniqueName="Cy2" HeaderStyle-HorizontalAlign="Center" HeaderText="Cycle 2" HeaderStyle-Font-Bold="true"
115.HeaderStyle-Font-Size="8" ColumnGroupName="C2" HeaderStyle-Font-Names="Arial" ItemStyle-Font-Size="8" ItemStyle-HorizontalAlign="Right" ItemStyle-VerticalAlign="Top" FooterText="">
116.<ItemTemplate>
117. <telerik:RadGrid ID="Cycle2Grid" runat="server" ShowGroupPanel="false" AllowSorting="false" GridLines="Both" ShowFooter="false"
118.AllowPaging="false" AutoGenerateColumns="false"
119.HeaderStyle-CssClass="tableHeading br" EnableViewState="false">

Angel Petrov
Telerik team
 answered on 19 May 2015
13 answers
519 views
Hi,

I'm using RadComboBoxes on my pages without specifying the height attribute as I do not want to potentially have empty space in the control.  So, with this, what I experience is that the combobox detects the page boundary just fine and opens either toward the top, or the bottom of the page, depending on proximity to either... however, it does not seem to take into account scroll position on the page.

So, if the items in the combobox do not reach the page boundary and the page is scrolled such that said boundary (either top or bottom) is not in view, then the list items extend past the viewable area of the page and no scrollbar is added to the combo box.

Is there any other way to force a scrollbar to appear without setting a static height for each combo box?

This KB article doesn't help in my situation becuase I'm using several different themes (one for each of your skins) where the combo box is decorated differently depending on the selected theme.

Any help or input would be appreciated.  I'm using Q32008 version of the controls.

Thanks,
Marty
MBEN
Top achievements
Rank 2
Veteran
 answered on 18 May 2015
1 answer
91 views

We are trying to pass customdata in the connection string in order to implement dynamic security.  Can you tell us if the customdata attribute is passed to the msmdpump.dll by the pivotgrid control as we are not seeing a value when we call the customdata function in our cube?

Thanks

Richard

 

Daniel
Telerik team
 answered on 18 May 2015
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?