Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
122 views
I am facing problem with rad grid page buttons (Move next, previous, Last, first). Buttons are disappearing when I am trying to Click the button. Can u give the solution. please find the attached screen shot.

Please provide solution.
Princy
Top achievements
Rank 2
 answered on 29 May 2013
3 answers
921 views
Hi Telerik Team,

We are using rad chart for drawing Bar and Line Series graphs.

Have set the property autoscale=true;
When the Y axis value is 1 or 2 the Y axis shows decimal points. Need to eliminate the decimal points. Please refer the screen shot.

As the data will be dymanic, do not want to use the property autoscale = false and set min and max value with steps.
we did set ValueFormat to Number, but this also ended up showing decimal.

At any point of time my Y axis should not contain the decimal, as our result data will not have such decimal data.

Version: 2009.3.1208.35

Early reply will be appreciated.

Thanks and regards.
OMAR
Top achievements
Rank 1
 answered on 28 May 2013
2 answers
130 views

Hi,

 

My grid has template column with textbox in item template and textbox in footer template. The aspx looks like this:

 

<telerik:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter Amount column" Groupable="False" HeaderText="Amount" Reorderable="False" ShowFilterIcon="False" UniqueName="Amount" HeaderTooltip="Amount">

    <HeaderStyle Width="17%"></HeaderStyle>

    <ItemTemplate>

       <asp:TextBox ID="txtAmount" runat="server" Width="75%" CssClass="rightalign" onblur="return txtAccountAmount_Blur
                                                                                                            (event);"
/>

    </ItemTemplate>

    <FooterTemplate>

       <asp:Literal ID="Literal1" runat="server" ><span style='color: Black; font-weight:

                     bold;'>Sum:</span></asp:Literal>

       <asp:TextBox ID="txtAmountTotal" runat="server" Width="75%" CssClass="rightalign" />

    </FooterTemplate>

</telerik:GridTemplateColumn>

 

Then I have function on this local aspx page as:

function txtAccountAmount_Blur(evnt){

    var txtBox = ((evnt.target) ? evnt.target : evnt.srcElement);

    var isValid = Currency_Validate( txtBox );

    SetGridCurrencyTextBoxError(isValid, txtBox, evnt);

    return isValid;

}

       

 

In global javascript:

 

function SetGridCurrencyTextBoxError(isValid, txtBox, evt){

    var cell = txtBox.parentNode;

 

    var errorMsg = document.getElementById(cell.id + "_spnError");

 

    if(!isValid){//Was not valid currency value.

        if(!errorMsg){

            errorMsg = document.createElement('span');

            errorMsg.className = 'inlineerrortext';

            errorMsg.innerHTML = 'Invalid currency value.';

            errorMsg.id = cell.id + "_spnError";

            cell.insertBefore(errorMsg, txtBox);

        }

 

}

 

Cell.id is always empty. I used developer tools to debug. There is textbox id. I see it. It is something like this:

Ctl00_maincontent_rgdAccounts_ctl00_ctl04_txtAmount . As far as I know, parent id should be - Ctl00_maincontent_rgdAccounts_ctl00_ctl04

 

Please let me know how to get id of parentnode

 

Thanks,

Prathiba

Prathibarani
Top achievements
Rank 1
 answered on 28 May 2013
3 answers
189 views
hi,

I have a page with a line chart of 9 series, each will have 360 points, so totally more than 3000 points. When I hard refresh this page, the cpu usage is raising from 12% to 70% then to 100%. I have Intel Core 2 Duo cpu with 3.16GHz, 8G memory, 64- bit Win7 system. Any suggestion for improvement is appreciated. I am using version 2012.2.626.40.

here is my code:

<telerik:RadChart ID="radchart1" runat="server" OnBeforeLayout="radchart1_OnBeforeLayout"

AutoLayout="true" Skin="Vista" IntelligentLabelsEnabled="false" PlotArea-XAxis-AutoScale="false"
    <Legend Appearance-ItemTextAppearance-TextProperties-Font="Arial, 7pt" Appearance-ItemTextAppearance-    AutoTextWrap="False"></Legend
    <ChartTitle TextBlock-Appearance-TextProperties-Font="Arial, 10pt, style=Bold"> </ChartTitle>

    <PlotArea>

        <XAxis>

            <Appearance

                <TextAppearance TextProperties-Font="Arial, 8.25pt, style=Bold" />

                <LabelAppearance RotationAngle="60"> </LabelAppearance>

            </Appearance
                </XAxis
                <YAxis AxisMode="Extended" AutoScale="false"> 
                        <Appearance
                                <TextAppearance TextProperties-Font="Arial, 8.25pt" /> 
                        </Appearance
                </YAxis
        </PlotArea>
</telerik:RadChart>

code to load chart series:

 

chartseries.Type = ChartSeriesType.Line;

chartseries.Appearance.PointMark.Visible = true;

chartseries.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;

chartseries.Appearance.LabelAppearance.Visible = false;

for (int i = 0; i < data.Count(); i++)

{

    if (radchart1.PlotArea.XAxis.Items.Count() < data.Count())

        radchart1.PlotArea.XAxis.AddItem(data[i].Date.ToString());
                chartseries.AddItem(Convert.ToDouble(data[i].Count) > 100 ? 101 : Convert.ToDouble(data[i].Count), data[i].Count.ToString());

                chartseries.Items.Last().ActiveRegion.Tooltip = data[i].Count.ToString("#,##0");
}

function to customize xaxis labels 

protected void radchart1_OnBeforeLayout(object sender, EventArgs e)

{

         foreach (var item in radchart1.PlotArea.XAxis.Items)

        {

        DateTime xaxis = Convert.ToDateTime(item.TextBlock.Text); 
                if (xaxis.Minute > 0)

                {

                        item.Visible = false;

                }

        else

                {

                        item.TextBlock.Text = xaxis.ToString("h tt");

                        item.Visible = true
                }

        }

}

msigman
Top achievements
Rank 2
 answered on 28 May 2013
6 answers
171 views
I have a simple RadWindow popup from a button using ContentTemplate - with a Cancel and an Update Button
<telerik:RadWindow ID="rwLumpSum" Modal="true" Top="0" Left="0" VisibleOnPageLoad="false" runat="server" >
    <ContentTemplate>
    <asp:UpdatePanel ID="cpLumpSum" UpdateMode="Conditional" runat="server">
    <ContentTemplate>
        <table>
        <tr>
        <td>Lump Sum</td>
        <td>
            <telerik:RadNumericTextBox ID="rntbLumpSum" MinValue="1" MaxValue="999.99" runat="server">
                <NumberFormat DecimalDigits="2" />
            </telerik:RadNumericTextBox>
        </td>
        </tr>
        <tr>
        <td>
            <telerik:RadButton id="rbCancel" Text="Cancel" OnClientClicked="rbCancelClicked" AutoPostBack="false" UseSubmitBehavior="false" runat="server" />
        </td>
        <td>
            <telerik:RadButton id="rbUpdate" Text="Update" runat="server" />
        </td>
        </tr>
        </table>
    </ContentTemplate>
    </asp:UpdatePanel>
    </ContentTemplate>
</telerik:RadWindow>

the Cancel button closes the form fine with the following script
function rbCancelClicked(button) {
    var rwLumpSum = $find("<%=rwLumpSum.ClientID%>");
    rwLumpSum.Close();
}

the Update needs to do something, then close the form
only it doesn't even close the form
Protected Sub rbUpdate_Click(sender As Object, e As EventArgs) Handles rbUpdate.Click
    Dim ws As CommonFunctions
    Dim sb As StringBuilder = Nothing
 do something here
    sb = New StringBuilder("<SCRIPT language='javascript'>")
    sb.Append("var rwLumpSum = $find(")
    sb.Append(Chr(34))
    sb.Append("<%=rwLumpSum.ClientID%>")
    sb.Append(Chr(34))
    sb.Append(");rwLumpSum.Close();")
    sb.Append("</SCRIPT>")
    ws = New CommonFunctions()
    ScriptManager.RegisterStartupScript(Me, Me.GetType(), "CloseWindow", sb.ToString, False)
End Sub

help!
thanks

oh and clicking the Update also throws a JavaScript error in some Telerik Web script library
Elliott
Top achievements
Rank 2
 answered on 28 May 2013
3 answers
283 views
Hi All,
  I am  new to telerik controls I am using the asyn upload to upload files from a  user but the tough part is I have a user control which has a hyperlink to open a radwindow which contains asp page where user actually loads the files using asyn upload once done i have to populate radgrid back in the parent page file  how can i do this and i need hyperlink on the grid with the uploaded file name to actually allow user to open save dialog and i am using local folder to save files and paths.
msigman
Top achievements
Rank 2
 answered on 28 May 2013
1 answer
82 views
I would think that after getting the data source correct and the automatic inserts set to true, I should be able to see the "add new record" line on top of my radGrid.  Unfortunately, this isn't the case.  Please see below (some code truncated for length purposes): (Visual Basic syntax)

<telerik:RadGrid runat="server" ID="grdExtraFields" AutoGenerateColumns="false" AllowPaging="true"
  Width="90%" Height="400px" AllowSorting="true" DataSourceID="sqlVCK" PageSize="20"
  AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true">
    <MasterTableView EditMode="InPlace" AutoGenerateColumns="false">
        <Columns>
            <telerik:GridEditCommandColumn UniqueName="btnEdit" ButtonType="LinkButton" />
 
            <telerik:GridTemplateColumn DataField="section" HeaderText="Section Name" UniqueName="section">
                <ItemTemplate>
                    <telerik:RadComboBox ID="cboSection" runat="server" DataSourceID="sqlSection"
                      DataTextField="description" DataValueField="section" Width="200px" Enabled="false">
                    </telerik:RadComboBox>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadComboBox ID="cboSection" runat="server" DataSourceID="sqlSection"
                      DataTextField="description" DataValueField="section" Width="200px">
                    </telerik:RadComboBox>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="INTERNAL_READABLE" HeaderText="Internal Name" UniqueName="internalname" />
            <telerik:GridBoundColumn DataField="EXTERNAL_READABLE1" HeaderText="External Name" UniqueName="externalname" />
            <telerik:GridTemplateColumn DataField="GRIDS_DATATYPE" HeaderText="Type" UniqueName="type">
                <ItemTemplate>
                    <telerik:RadComboBox ID="cboType" runat="server" selectedvalue='<%#Bind("GRIDS_DATATYPE") %>' Enabled="false">
                        <Items>
                            <telerik:RadComboBoxItem Text="Label (-4)" Value="-4" />
                            <telerik:RadComboBoxItem Text="Label (-3)" Value="-3" />
                            <telerik:RadComboBoxItem Text="Key field" Value="-2" />
                            <telerik:RadComboBoxItem Text="System control" Value="-1" />
                            <telerik:RadComboBoxItem Text="Textbox" Value="1" />
                            <telerik:RadComboBoxItem Text="Tree" Value="4" />
                            <telerik:RadComboBoxItem Text="Listbox" Value="7" />
                            <telerik:RadComboBoxItem Text="Multi-line text" Value="9" />
                            <telerik:RadComboBoxItem Text="Date" Value="170" />
                        </Items>
                    </telerik:RadComboBox>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadComboBox ID="cboType" runat="server" selectedvalue='<%#Bind("GRIDS_DATATYPE") %>'>
                        <Items>
                            <telerik:RadComboBoxItem Text="Label (-4)" Value="-4" />
                            <telerik:RadComboBoxItem Text="Label (-3)" Value="-3" />
                            <telerik:RadComboBoxItem Text="Key field" Value="-2" />
                            <telerik:RadComboBoxItem Text="System control" Value="-1" />
                            <telerik:RadComboBoxItem Text="Textbox" Value="1" />
                            <telerik:RadComboBoxItem Text="????" Value="4" />
                            <telerik:RadComboBoxItem Text="Listbox" Value="7" />
                            <telerik:RadComboBoxItem Text="Multi-line text" Value="9" />
                            <telerik:RadComboBoxItem Text="Date" Value="170" />
                        </Items>
                    </telerik:RadComboBox>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
...
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    </ClientSettings>
</telerik:RadGrid>
<asp:SqlDataSource id="sqlVCK" runat="server" ConnectionString="<%$ ConnectionStrings:iknetConnectionString %>"
  SelectCommand="select internal_readable, external_readable1, ...
  from grids where custfile = @custfile AND department = @dept AND section in (10, 13, 15, 16)"
  InsertCommand="INSERT INTO grids (SECTION, INTERNAL_READABLE, EXTERNAL_READABLE1, EXTERNAL_READABLE2, EXTERNAL_READABLE3, ..., GRIDWIDTH, REQUIRED)
    VALUES (@section, @fieldname, @fieldname, @fieldname, @fieldname, ..., -1, @required)"
  UpdateCommand="UPDATE grids SET internal_readable = @internal_readable, external_readable1 = @EXTERNAL_READABLE1,
  external_readable2 = @EXTERNAL_READABLE1, external_readable3 = @EXTERNAL_READABLE1, ..., section = @section where grids = @grids"
  DeleteCommand="DELETE FROM grids WHERE grids = @grids">
    <SelectParameters>
        <asp:Parameter Name="custfile" type="Int32" />
        <asp:Parameter Name="dept" Type="Int32" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="internal_readable" type="string" />
        <asp:Parameter Name="EXTERNAL_READABLE1" type="string" />
        <asp:Parameter Name="grids_datatype" type="Int32" />
...
        <asp:Parameter Name="grids" type="Int32" />
    </UpdateParameters>
    <InsertParameters>
        <asp:Parameter Name="section" type="Boolean" />
        <asp:Parameter Name="fieldname" type="string" />
        <asp:Parameter Name="type" type="Int32" />
...
        <asp:Parameter Name="required" type="Boolean" />
    </InsertParameters>
    <DeleteParameters>
        <asp:Parameter Name="grids" type="Int32" />
    </DeleteParameters>
</asp:SqlDataSource>

If anybody can tell me why the "add new record" doesn't show up, it would be appreciated.

Thanks,
Patrick
Patrick
Top achievements
Rank 1
 answered on 28 May 2013
22 answers
525 views
I am trying to do the below:

            <telerik:AjaxSetting AjaxControlID="TreePane" EventName="NodeClick">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="TreePane" />
                    <telerik:AjaxUpdatedControl ControlID="pnlMaintain" LoadingPanelID="apnlMain"  />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="TreePane" EventName="NodeDrop">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="TreePane" />
                </UpdatedControls>
            </telerik:AjaxSetting>

So only the NodeClick event of a TreeView control will update the pnlMaintain control.  However, the control is updated no matter what event is executed.  It seems like this should work, but it does not.
Fredrik
Top achievements
Rank 2
 answered on 28 May 2013
2 answers
125 views
Hi,

I am using excel BIFF engine to export data to excel because I had to export company logo also. I notice that file name and worksheet name are same. I want to change the name of worksheet, different from file name. Please let me know how to do. We are using Q1 2013 suite.

Thanks,
Prathibarani
Top achievements
Rank 1
 answered on 28 May 2013
2 answers
188 views
Hi,
I have a repeater control with a button inside.
On button click, I want to add items to the tree view.
I am trying to ajaxify the button inside the repeater, but it works only for the first row.
Button in all other rows does full postback.
Could you help please.
Here is my code:
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings
            <telerik:AjaxSetting AjaxControlID="btnAddItem"
                 <UpdatedControls
                     <telerik:AjaxUpdatedControl ControlID="tvProjectSummary" LoadingPanelID="RadAjaxLoadingPanel1"
                     </telerik:AjaxUpdatedControl
                 </UpdatedControls
             </telerik:AjaxSetting
         </AjaxSettings>
     </telerik:RadAjaxManager>
     <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Width="270px" BackgroundPosition="Center" Skin="Outlook" EnableSkinTransparency="true"
      </telerik:RadAjaxLoadingPanel
  
      <telerik:RadTreeView ID="tvProjectSummary" runat="server" AllowNodeEditing="true" EnableDragAndDrop="true" Skin="Metro"  OnClientNodeDropping ="SaveCtrlState" OnNodeDrop="HandleDrop">
           <Nodes>
               <telerik:RadTreeNode Value="Root" ImageUrl="Images/subfolder_button.png"
                            AllowEdit="true" Text="NEW PROJECT" Font-Bold="true" Selected="true">
                </telerik:RadTreeNode>
            </Nodes>
         </telerik:RadTreeView>
           
         <asp:Repeater ID="rptItems" runat="server" OnItemCommand="rptItems_ItemCommand">
             <ItemTemplate>
                 <ul class="options_items">
                     <li>
                         <asp:Label ID="lblItems" runat="server" Text="<%# Container.DataItem %>"></asp:Label>
                         <asp:LinkButton ID="btnAddItem" runat="server" CommandName="AddItem" >Add+</asp:LinkButton>
                     </li>
                  </ul>
              </ItemTemplate>
          </asp:Repeater>
Rob
Top achievements
Rank 1
 answered on 28 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?