Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
102 views

Hi,

I have a Radgrid with some columns including Time column in format hh:mm:ss:

<telerik:GridBoundColumn HeaderText="POS-CD" DataField="POSCD" UniqueName="POSCD" ReadOnly="True" SortExpression="POSCD" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="START-TIME" DataField="STARTTIME" UniqueName="STARTTIME" ReadOnly="True" SortExpression="STARTTIME" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" DataType="System.String" >
</telerik:GridBoundColumn>

<telerik:GridBoundColumn HeaderText="END-TIME" DataField="ENDTIME" UniqueName="ENDTIME" ReadOnly="True" SortExpression="ENDTIME" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" >
</telerik:GridBoundColumn>

 

For some reason when RadGrid gets exported to excel columns START-TIME and END-TIME showing spaces.

I try to implemented this code:

if (e.RowType == Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowType.DataRow)
{
e.Row.Cells.GetCellByName("STARTTIME").StyleValue = "ttST";
}

 

StyleElement style3 = new StyleElement("ttST");
style3.NumberFormat.FormatType = NumberFormatType.LongTime;
e.Styles.Add(style3);

But it did not work.

Please help me to resolve this problem.

Thanks.

Vitaly.

Vitaly
Top achievements
Rank 1
Iron
Iron
 asked on 23 Jun 2017
1 answer
73 views

Hi.  I use Telerik in my application, but want to reduce the surface area that's exposed through the WebResource.axd handler.

In particular, I'd like to disable the AsyncUpload control entirely, so that any POST's to the HTTP Handler for AsyncUpload would be rejected.

Does Telerik support some form of "whitelist" configuration that allows me to only surface controls that I have a dependency upon?

Thanks for any information.

 

Marin Bratanov
Telerik team
 answered on 23 Jun 2017
1 answer
146 views

A field within the returned DataSource needs to either be displayed in the header or the footer and I am unsure of how to do this.  A column name is Cycle_Date and I would like to display something similar to this "Data as of <% =cycle_date%>".  I don't need to display it as a bound column within the grid just in either the header or footer.

 

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlExcessAnalysis" AutoGenerateColumns="false" EnableEmbeddedSkins="true"
    ShowFooter="true" FooterStyle-BackColor="#443634" GridLines="None" FooterStyle-ForeColor="White" AlternatingItemStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Center">
    <MasterTableView CommandItemDisplay="Top">
        <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
        <ColumnGroups>
            <telerik:GridColumnGroup Name="ExcessInformation" HeaderText="Excess Market Analysis" HeaderStyle-HorizontalAlign="Center" />
        </ColumnGroups>
        <Columns>
            <telerik:GridBoundColumn DataField="state" HeaderText="State" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center" ColumnGroupName="ExcessInformation"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="TotalExcess" HeaderText="# of Insureds" Aggregate="Sum" FooterAggregateFormatString="{0}" ColumnGroupName="ExcessInformation">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="TotalQualified" HeaderText="Total Qualified" Aggregate="Sum" FooterAggregateFormatString="{0}" ColumnGroupName="ExcessInformation">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

 

Eyup
Telerik team
 answered on 23 Jun 2017
0 answers
113 views

Hi Guys

 

I want to know how could i add a link button to a Radgrid but only if a condition in the datarow is true.

Basically what i have done is i have added my datatable as the source of my radgrid and now i want

to loop through each row and add a check to see if the column "status= completed" and "section = 1", So if the condition is met

I want to add a link button. 

How can i achieve this?

Ismail
Top achievements
Rank 1
 asked on 23 Jun 2017
5 answers
322 views
Although I have found several posts about similar issues, I have been unsuccessful at getting this to work.  I have two columns in a radgrid, one with a radcombobox. When choosing a value from the radcombobox in edit mode, I need to update client side the value of column 2 in the grid from a value in my radcombobox. I don't know how to get a hold of that column's edit mode textbox client side from the OnClientSelectedIndexChanged event of the radcombobox. Thanks

 

Eyup
Telerik team
 answered on 23 Jun 2017
4 answers
300 views
Hi All,

I have radgrid in which i have checkbox, radnumerictextbox, raddatepicker etc...controls.
I have to implement several rules in radgrid.

Below attached is the screenshot of radgrid.
1. When i check 'completed' checkbox 'percent complete' radnumerictextbox value should be 100, '99%Complete' checkbox should be uncheck and disable, 'Actual Start' and 'Actual Finish' raddatetimepickers filled with specific date.

i need this senario in client side only.
Please anybody help me to resolve this issue.

Thanks,
Nagendra.
Aung
Top achievements
Rank 1
 answered on 23 Jun 2017
2 answers
96 views

I have a bar chart that has a single series of labels that come from a data source.  Some of the labels are too long, and I am trying to wrap the text, as shown in this demo:

http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/functionality/multiline-labels

I was able to get the demo to work by just inserting the markup, but when I try to make text wrap in my own code, I get a javascript error. (Unterminated string constant)

I have simplified my code to give an example of what is happening. Here is the markup:

<telerik:RadHtmlChart ID="barChart" Transitions="true" Skin="Silk"  Height="500" runat="server">
    <ChartTitle>
        <Appearance>
            <TextStyle Bold="true" FontSize="14" />
        </Appearance>
    </ChartTitle>
    <Legend>
        <Appearance Position="Bottom" Visible="false"></Appearance>
    </Legend>
    <PlotArea>
        <XAxis>
            <TitleAppearance>
                <TextStyle Bold="true" FontSize="12" />
            </TitleAppearance>
            <LabelsAppearance Visible="true">
                <TextStyle Bold="true" FontSize="10" />
            </LabelsAppearance>
            <MajorGridLines Visible="false" />
            <MinorGridLines Visible="false" />
        </XAxis>
        <YAxis MajorTickType="None">
            <TitleAppearance>
                <TextStyle Bold="true" FontSize="12" />
            </TitleAppearance>
            <LabelsAppearance>
                <TextStyle Bold="true" FontSize="10" />
            </LabelsAppearance>
            <MajorGridLines Visible="true" />
            <MinorGridLines Visible="false" />
        </YAxis>
    </PlotArea>
</telerik:RadHtmlChart>

Here is the relevant code on the server. I have seen posts from 2013 that said this is not possible, but the 2014 demo implies that you have resolved he issue:

public void CreateChart(ChartEventArgs args)
{
    barChart.PlotArea.Series.Clear();
 
    //var ds = _presenter.GenerateChart(args);
 
    barChart.PlotArea.XAxis.Name = "Workflow Step";
    barChart.PlotArea.XAxis.DataLabelsField = "WorkflowStep";
 
    AddChartSeries("WorkflowStep", "AvgDaysToCSR", "{0:N2}", Color.FromArgb(245, 234, 105));
 
    var average = new List<ChartRequestTypeResult>();
 
    // Works, but doesn't wrap
    //average.Add(new ChartRequestTypeResult { WorkflowStepID = 1, WorkflowStep = "Test Wrap One", AvgDaysToCSR = 1.0 });
    //average.Add(new ChartRequestTypeResult { WorkflowStepID = 2, WorkflowStep = "Test Wrap Two", AvgDaysToCSR = 2.0 });
    //average.Add(new ChartRequestTypeResult { WorkflowStepID = 3, WorkflowStep = "Test Wrap Three", AvgDaysToCSR = 3.0 });
 
    // Gives error
    average.Add(new ChartRequestTypeResult { WorkflowStepID = 1, WorkflowStep = "Test\nWrap\nOne", AvgDaysToCSR = 1.0 });
    average.Add(new ChartRequestTypeResult { WorkflowStepID = 2, WorkflowStep = "Test\nWrap\nTwo", AvgDaysToCSR = 2.0 });
    average.Add(new ChartRequestTypeResult { WorkflowStepID = 3, WorkflowStep = "Test\nWrap\nThree", AvgDaysToCSR = 3.0 });
 
    barChart.DataSource = average;
    barChart.DataBind();
 
    BackgroundColor = Color.FromArgb(208, 212, 204);
}
 
public void AddChartSeries(string name, string seriesValue, string format, Color color)
{
    ColumnSeries cs = new ColumnSeries();
 
    cs.Name = name;
    cs.Stacked = false;
    cs.Spacing = 0.0;
    cs.Gap = 0.2;
    cs.DataFieldY = seriesValue;
    cs.Appearance.Overlay.Gradient = Gradients.Glass;
    cs.Appearance.FillStyle.BackgroundColor = color;
    cs.LabelsAppearance.DataFormatString = format;
    cs.TooltipsAppearance.DataFormatString = format;
    if ((color.R * 2) + (color.G * 3) + color.B < 600)
        cs.TooltipsAppearance.Color = Color.FromKnownColor(KnownColor.White);
 
    barChart.PlotArea.Series.Add(cs);
}
Johnathan
Top achievements
Rank 1
 answered on 22 Jun 2017
1 answer
205 views

Hi,

Is it possible to display the week numbers in the month view?
This would also be nice, since you could navigate to the week this way...

Regards
Andreas

Peter Milchev
Telerik team
 answered on 22 Jun 2017
4 answers
3.2K+ views
hello..we are using telerik trial version..how we can make grid filtering case insensitive
Eric
Top achievements
Rank 1
 answered on 22 Jun 2017
1 answer
213 views

Hi,
I have two issues with Kendo exporting PDF.
I am following the example from:
https://demos.telerik.com/kendo-ui/pdf-export/index
First one:
Here are two images attached showing the difference between WebPage text and PDF text. The text is vertical in my webpage but was changed to horizontal after being exported to PDF.

 

Thanks

 

 

Vessy
Telerik team
 answered on 22 Jun 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?