Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
144 views
export to excel,pdf,csv are not working.  below is the code sample.

 

 

<asp:UpdatePanel runat="server"><ContentTemplate>
<telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="true" Skin="Outlook"
    AutoGenerateColumns="False" PageSize="12" AllowSorting="True" AllowMultiRowSelection="False"
    AllowPaging="True" OnNeedDataSource="RadGrid1_NeedDataSource" 
    OnItemCommand="RadGrid1_ItemCommand" AllowFilteringByColumn="True">
    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
    <ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true"/>
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="false"/>
        </ClientSettings>
  
    <MasterTableView Width="100%" DataKeyNames="intID" AllowMultiColumnSorting="True" CommandItemDisplay="Top"
        CommandItemSettings-ShowExportToExcelButton="true" CommandItemSettings-ShowAddNewRecordButton="false" UseAllDataFields="true">
    <Columns>
        <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>
        <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="column" />
        <telerik:GridBoundColumn SortExpression="strSiteID" HeaderText="Location" HeaderButtonType="LinkButton"
            DataField="strSiteID">
        </telerik:GridBoundColumn>
        <telerik:GridDateTimeColumn  SortExpression="dtInvoiceDate" HeaderText="Invoice Date" HeaderButtonType="LinkButton"
            DataField="dtInvoiceDate" DataFormatString="{0:d}" PickerType="DatePicker" FilterControlWidth="100px" >
        </telerik:GridDateTimeColumn>
        <telerik:GridBoundColumn SortExpression="strInvoiceNo" HeaderText="Invoice" HeaderButtonType="LinkButton"
            DataField="strInvoiceNo">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn SortExpression="strItemNo" HeaderText="Part #" HeaderButtonType="LinkButton"
            DataField="strItemNo">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn SortExpression="intItemCount" HeaderText="QTY" HeaderButtonType="LinkButton"
            DataField="intItemCount">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn SortExpression="strCondition" HeaderText="Condition" HeaderButtonType="LinkButton"
            DataField="strCondition">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn SortExpression="strStatus" HeaderText="Status" HeaderButtonType="LinkButton"
            DataField="strStatus">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn SortExpression="strETA" HeaderText="ETA" HeaderButtonType="LinkButton"
            DataField="strETA">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn SortExpression="strBoxID" HeaderText="Box ID" HeaderButtonType="LinkButton"
            DataField="strBoxID">
        </telerik:GridBoundColumn>
    </Columns>
    </MasterTableView>
</telerik:RadGrid>
</ContentTemplate></asp:UpdatePanel>

disabling ajaxifying didn't help.

 
Ronak
Top achievements
Rank 1
 answered on 28 Aug 2012
3 answers
156 views
I created the radribbonbar programmatically using the trial dll.
But when add the bouhgt dll by the company, the code doesn't work.

for example:

this is my aspx.cs
 protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack) CreateMenu();


    }


    private void CreateMenu()
    {
        RadRibbonBar menu = new RadRibbonBar();
        menu.ID = "Menu";


        RibbonBarTab tab1 = new RibbonBarTab();
        tab1.ID = "Tab1";
        tab1.Text = "Tab1";
        RibbonBarGroup group1 = new RibbonBarGroup();
        group1.ID = "group1";
        RibbonBarButton btn = new RibbonBarButton();
        btn.ID = "btn";
        btn.Text = "btn";
        group1.Items.Add(btn);
        btn = new RibbonBarButton();
        btn.ID = "btn1";
        btn.Text = "btn1";
        group1.Items.Add(btn);
        tab1.Groups.Add(group1);
        menu.Tabs.Add(tab1);


        tab1 = new RibbonBarTab();
        tab1.ID = "Tab2";
        tab1.Text = "Tab1";
         group1 = new RibbonBarGroup();
        group1.ID = "group21";
        group1.Text = "group2";
        btn = new RibbonBarButton();
        btn.ID = "btn1";
        btn.Text = "btn1";
        group1.Items.Add(btn);
        tab1.Groups.Add(group1);
        menu.Tabs.Add(tab1);


        tab1 = new RibbonBarTab();
        tab1.ID = "Tab3";
        tab1.Text = "Tab1";
        group1 = new RibbonBarGroup();
        group1.ID = "group3";
        tab1.Groups.Add(group1);
        menu.Tabs.Add(tab1);


        tab1 = new RibbonBarTab();
        tab1.ID = "Tab4";
        tab1.Text = "Tab1";
        group1 = new RibbonBarGroup();
        group1.ID = "group4";
        tab1.Groups.Add(group1);
        menu.Tabs.Add(tab1);
 
        header.Controls.Add(menu);
    }


aspx:
 <form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<%--Needed for JavaScript IntelliSense in VS2010--%>
<%--For VS2008 replace RadScriptManager with ScriptManager--%>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
</Scripts>
</telerik:RadScriptManager>
<script type="text/javascript">
//Put your JavaScript code here.
    </script>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<div>
    <div id="header" runat="server">
    </div>
</div>
</form>



js error:
attach 1 and 2



How I can fix this

thanks

Ivan Zhekov
Telerik team
 answered on 28 Aug 2012
0 answers
59 views
hi

How do i achieve no push down effect on an asp.net button on IE9.

I have a piece of code when view with firefox, the search button can be clicked without the push down effect. Which is what i wanted.
But when i view it IE9, it has the push down effect when clicked which i do not want.

How do i achieve the same thing as firefox when i view it with IE9. Thanks a lot.

<td>
<div style="text-align: center">
<telerik:RadTextBox ID="RadTextBox1" runat="server" Style="border-style: solid; border-width: 8px;
border-color: #e9e5d9; font-size: medium; border-radius: 3px 0px 0px 3px; font: bold 15px/10px 'lucida sans', 'trebuchet MS', 'Tahoma';"
Height="48px" Width="470px" EmptyMessage="search here......">
</telerik:RadTextBox><asp:Button ID="btnSearch" runat="server" Style="overflow: visible; position: absolute;
border: 0px none #d83c3c; padding: 0; cursor: pointer; height: 48px; width: 110px;
font: bold 15px/0px 'lucida sans', 'trebuchet MS', 'Tahoma'; color: #fff; text-transform: uppercase;
border-radius: 0px 3px 3px 0px; background-color: #d83c3c;" Text="SEARCH" />
</div>
</td>

L
Top achievements
Rank 1
 asked on 28 Aug 2012
1 answer
309 views

I need to create some controls dynamically from code behind, and then, I need to add a JavaScript code to this control.. something like this:

 

Dim radTextbox As Telerik.Web.UI.RadTextBox

radTextbox = New Telerik.Web.UI.RadTextBox

radTextbox.TextMode = Telerik.Web.UI.InputMode.SingleLine

radTextbox.ID = drRow.item("CampoAlias")   'Name added dynamically

radTextbox.EnableViewState = False

radTextbox.Width = "200"

radTextbox.ClientEvents.OnValueChanged = "Titulo___onChange()"  'Function name added dynamically

Dim strString as string  'code will be added dynamically too

strString  = "<script type='text/javascript'>"

strString  +="        function Titulo___onChange() { alert(' Hello!!!'); }"

strString  +="</script>"

//here I have to add the javascript code to the page… how???? I don’t now!!!

// how can I be sure the postback will work very well too.


Other option I tested and It didn’t work out:

 

------------------------------------------------------------------

I need to create some controls dynamically from code behind, and then, I need to add a JavaScript code to this control.. something like this:

 

Dim radTextbox As Telerik.Web.UI.RadTextBox

radTextbox = New Telerik.Web.UI.RadTextBox

radTextbox.TextMode = Telerik.Web.UI.InputMode.SingleLine

radTextbox.ID = drRow.item("CampoAlias")   'Name added dynamically

radTextbox.EnableViewState = False

radTextbox.Width = "200"

radTextbox.ClientEvents.OnValueChanged = "Titulo___onChange()"  'Function name added dynamically

        Dim scriptText As String = ""

        scriptText = "function Titulo___onChange(){"

        scriptText += "  alert(' Hello ');  "

        scriptText += " }"

        ClientScript.RegisterClientScriptBlock(Me.GetType(), "CounterScript", scriptText, True)

 

‘The first execution work out well, but in the postback send a error: “Microsoft JScript runtime error: Object expected”

Eyup
Telerik team
 answered on 28 Aug 2012
4 answers
117 views
Hello,

I am using the example code as described on on this page, in order to provide for editing grid cells, then submitting all changed cells as a batch.  I have had to adapt this code, because my grid is created entirely in the code-behind instead of within the page markup.  However, I don't think this makes a difference to my question.

The question is, how do I detect only those columns within the grid that are not readonly?  I only have two columns in my grid that I want to allow the user to edit.  Therefore, I don't need or want all of the grid cells to have the dblclick event handler added.  I only need the event handler added to the editable cells.

I would imagine there would be some sort of technique on the client, within the RowCreated function, to determine if a column is readonly or not.

Thanks for any help!
Regards,
Steve
CarmenM
Top achievements
Rank 1
 answered on 28 Aug 2012
0 answers
28 views
 WANT ELMAH exception handling framework to work with Telerik AJAX

SO THAT unhandeled (system) exceptions get automatically logged to ELMAH table and System Error page is displayed when an such exception occurs.

Can anybody give solution for this?

Hari krishna
Top achievements
Rank 1
 asked on 28 Aug 2012
1 answer
121 views
I am decoratively creating a Spline chart and need to change the line colors:

<telerik:RadChart
           ID="RadChartModelingZones"
           runat="server"
           DataSourceID="SqlDataSourceModelingZones"
           DefaultType="Spline"
           Skin="Gray"
           ChartTitle-TextBlock-Text="Merit">
           <Appearance Corners="Round, Round, Round, Round, 7">
               <FillStyle FillType="ComplexGradient">
                   <FillSettings GradientMode="Horizontal">
                       <ComplexGradient>
                           <telerik:GradientElement Color="236, 236, 236" />
                           <telerik:GradientElement Color="248, 248, 248" Position="0.5" />
                           <telerik:GradientElement Color="236, 236, 236" Position="1" />
                       </ComplexGradient>
                   </FillSettings>
               </FillStyle>
               <Border Color="130, 130, 130" />
           </Appearance>
           <Series>
               <telerik:ChartSeries Name="Series 1" Type="Spline">
                   <Appearance>
                       <FillStyle MainColor="164, 164, 164">
                       </FillStyle>
                       <TextAppearance TextProperties-Color="51, 51, 51">
                       </TextAppearance>
                   </Appearance>
               </telerik:ChartSeries>
               <telerik:ChartSeries Name="Series 2" Type="Spline">
                   <Appearance>
                       <FillStyle MainColor="108, 108, 108">
                       </FillStyle>
                       <TextAppearance TextProperties-Color="51, 51, 51">
                       </TextAppearance>
                   </Appearance>
               </telerik:ChartSeries>
           </Series>
           <Legend>
               <Appearance Dimensions-Margins="17.6%, 3%, 1px, 1px"
                           Dimensions-Paddings="2px, 8px, 6px, 3px" Position-AlignedPosition="TopRight">
                   <ItemMarkerAppearance Figure="Square">
                       <Border Width="0" />
                   </ItemMarkerAppearance>
                   <FillStyle MainColor="">
                   </FillStyle>
                   <Border Width="0" />
               </Appearance>
           </Legend>
           <PlotArea>
               <XAxis>
                   <Appearance Color="182, 182, 182" MajorTick-Color="216, 216, 216">
                       <MajorGridLines Color="216, 216, 216" PenStyle="Solid" />
                       <TextAppearance TextProperties-Color="51, 51, 51">
                       </TextAppearance>
                   </Appearance>
                   <AxisLabel>
                       <TextBlock>
                           <Appearance TextProperties-Color="51, 51, 51">
                           </Appearance>
                       </TextBlock>
                   </AxisLabel>
               </XAxis>
               <YAxis>
                   <Appearance Color="182, 182, 182" MajorTick-Color="216, 216, 216"
                               MinorTick-Color="223, 223, 223">
                       <MajorGridLines Color="216, 216, 216" />
                       <MinorGridLines Color="223, 223, 223" />
                       <TextAppearance TextProperties-Color="51, 51, 51">
                       </TextAppearance>
                   </Appearance>
                   <AxisLabel>
                       <TextBlock>
                           <Appearance TextProperties-Color="51, 51, 51">
                           </Appearance>
                       </TextBlock>
                   </AxisLabel>
               </YAxis>
               <Appearance>
                   <FillStyle FillType="Solid" MainColor="White">
                   </FillStyle>
                   <Border Color="182, 182, 182" />
               </Appearance>
           </PlotArea>
           <ChartTitle>
               <Appearance>
                   <FillStyle MainColor="">
                   </FillStyle>
               </Appearance>
               <TextBlock>
                   <Appearance TextProperties-Color="102, 102, 102"
                               TextProperties-Font="Arial, 18pt">
                   </Appearance>
               </TextBlock>
           </ChartTitle>
       </telerik:RadChart>
 
Here is the DataSource:

<asp:SqlDataSource
    ID="SqlDataSourceModelingZones"
    runat="server"
    ConnectionString="<%$ ConnectionStrings:...%>"
    SelectCommand="GetMeritModelingZones"
    SelectCommandType="StoredProcedure">
    <SelectParameters>
        <asp:ControlParameter
            ControlID="RadSlider"
            DefaultValue="0.00"
            Name="Merit"
            PropertyName="SelectedValue"
            Type="Decimal" />
    </SelectParameters>
</asp:SqlDataSource>

I would prefer to keep all markup in aspx as opposed to changing the line colors in the code behind if that is possible.

The attached shows the chart w/ the default colors and cannot seem to change.

Thanks,

Steve

Evgenia
Telerik team
 answered on 28 Aug 2012
4 answers
396 views
Hi
My problem with ExportToPDF is that columns is being overlapped when not wide enough to display text.
So I'm trying to use "word-wrap:break-word". It works fine at grid control and IE displays all of text.
But It doesn't work if it is exported to a PDF. It doesn't break word at all in pdf output.
In PDF output, is there any way to display all text by extending height of row?
I don't want text to be truncated.

Thanks 
Daniel
Telerik team
 answered on 28 Aug 2012
4 answers
438 views
Hello,

I want to add ComboBox to RAD Grid header columns. For e.g. I have many columns in RAD Grid and each column header will have a dropdown with items. On selecting the drop down the grid column get populated with the data related to the field column from database. Please see the attached image to get more idea on my request.

Is this possible? Please advise.

Thank you,
Asok
Asok
Top achievements
Rank 1
 answered on 28 Aug 2012
10 answers
229 views
HI

i have linkbutton with commandargments to find the selectd value  inside a Gridview which on click navigates to new page with selectd value  in Quey String whic is used in landing page to show some data,this GridView  is ajaxified using radajaxmanger.
 
we shows 100 rows grouping 10rows are a group,

in page load if we click 14th row i..e  4th row in second group its giving correct values in command arguments
after a search im showing only rows of 2nd group i..e 11 to 20 rows
now if i clik the 14th row in  command arguments its giving 4th row of  first group

two days back only we have implemented  radajaxmanger,from then we are facing this issue

Please help me




Maria Ilieva
Telerik team
 answered on 28 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?