Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
107 views
 <telerik:RadWindow ID="RadWindow1AddProductFromQuote" runat="server" IconUrl="none" AutoSizeBehaviors="Default" Behaviors="Close" Width="595px" Skin="Black" Height="365px" AutoSize="false" Modal="true" >
            <ContentTemplate>
                <telerik:RadGrid ID="radgridProductfromqoute" Width="97%" Style="margin: 0 auto;" runat="server" AutoGenerateColumns="false" EnableHierarchyExpandAll="true"
                    PageSize="20" Skin="Black" OnNeedDataSource="radgridProductfromqoute_NeedDataSource" AllowFilteringByColumn="false" OnDetailTableDataBind="radgridProductfromqoute_DetailTableDataBind">
                      <ClientSettings>
                    <ClientEvents OnHierarchyExpanded="OnHierarchyExpanded" />
                    
                </ClientSettings>
                    <MasterTableView DataKeyNames="QuotationID" ClientDataKeyNames="QuotationID"  HierarchyLoadMode="Client">
                        <Columns>
                             <telerik:GridTemplateColumn HeaderText="Quotation No" UniqueName="QuotationID">
                                <ItemTemplate>
                                    <asp:Label ID="lblQuotationID" runat="server" Text='<%# Eval("QuotationID") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Quotation No" UniqueName="QuotationNo">
                                <ItemTemplate>
                                    <asp:Label ID="lblQuotationn" runat="server" Text='<%# Eval("QuotationNo") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Quotation Date" UniqueName="Quotationdate">
                                <ItemTemplate>
                                    <asp:Label ID="lblQuotationDate" runat="server" Text='<%# Eval("QuotationDates") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Company Name" UniqueName="Company">
                                <ItemTemplate>
                                    <asp:Label ID="lblCompanyName" runat="server" Text='<%# Eval("CompanyName") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>

                        <DetailTables>
                            <telerik:GridTableView Name="calldetails"  Width="100%" AllowPaging="false" ItemStyle-BackColor="#6C7170" AlternatingItemStyle-BackColor="#666666"
                                AutoGenerateColumns="false" align="center" CssClass="Businessgrid" AllowFilteringByColumn="false">
                                <Columns>
                                    <telerik:GridTemplateColumn HeaderText="Description">
                                        <ItemTemplate>
                                            <asp:Label ID="lblItemDescription" runat="server" Text='<%# Eval("ItemDescription") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Qty">
                                        <ItemTemplate>
                                            <asp:Label ID="lblQty" runat="server" Text='<%# Eval("Quantity") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="VAT">
                                        <ItemTemplate>
                                            <asp:Label ID="lblVAT" runat="server" Text='<%# Eval("VATPercentage") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Cost Price">
                                        <ItemTemplate>
                                            <asp:Label ID="lblCost" runat="server" Text='<%# Eval("CostPrice") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Selling Price">
                                        <ItemTemplate>
                                            <asp:Label ID="lblSelling" runat="server" Text='<%# Eval("SellingPrice") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Sub Total">
                                        <ItemTemplate>
                                            <asp:Label ID="lblSubTotal" runat="server" Text='<%# Eval("TotalAmount") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Total">
                                        <ItemTemplate>
                                            <asp:Label ID="lblTotal" runat="server" Text='<%# Eval("MarginAmount") %>'></asp:Label>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Total">
                                        <ItemTemplate>
                                            <asp:Label ID="lblItemID" runat="server" Text='<%# Eval("QuotationTransID") %>'></asp:Label>
                                            <asp:CheckBox ID="chkProduct" runat="server" ></asp:CheckBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                </Columns>
                                <NoRecordsTemplate>
                                    <div>
                                        No call details found
                                    </div>
                                </NoRecordsTemplate>
                            </telerik:GridTableView>
                        </DetailTables>
                        <NoRecordsTemplate>
                            <div>
                                No call details found
                            </div>
                        </NoRecordsTemplate>
                    </MasterTableView>
                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                </telerik:RadGrid>  here i need "lblItemID" this control value find any buddy help me........







Shinu
Top achievements
Rank 2
 answered on 12 Aug 2014
1 answer
165 views
I have a saved the multiple checked items into my database, when I retrieve out the records, it only checked one item in the listbox instead of multiple. I have also verified that the records returned in the datatable contains 3 records.

aspx:
 <telerik:RadListBox ID="lbxDevelopmentComponent" SelectionMode="Multiple" runat="server" OnClientItemChecked="OnClientItemChecked"
                                        CheckBoxes="true" DataTextField="Text" DataValueField="Value" Width="500px" Height="150px">
                                    </telerik:RadListBox>

.cs:
var dtDevelopmentComponent = _objSqlManager.ExecuteSQL(sqlDevelopmentComponent.ToString(), paramDevelopmentComponent);

                        if (dtDevelopmentComponent.Rows.Count > 0)
                        {
                            for (int i = 0; i < dtDevelopmentComponent.Rows.Count; i++)
                            {
                                RadListBoxItem item = lbxDevelopmentComponent.FindItemByText(dtDevelopmentComponent.Rows[0]["DEVELOPMENT_COMPONENT_NAME"].ToString());
                                if (item != null)
                                    item.Checked = true;
                            }
                        }
Bozhidar
Telerik team
 answered on 12 Aug 2014
3 answers
187 views
Hi , 

I am trying to display line chart dynamically and get displayed in my panel. I don't understand what I am doing wrong. Please help.

I have this in my .aspx file
      <asp:Panel ID="Panel3" runat="server"  style="float:left;width:45%;">
             <telerik:RadHtmlChart ID="RadHtmlChart3"  runat="server" ChartTitle-Text="Dynamic Line Series">
             </telerik:RadHtmlChart>         
      </asp:Panel>

and the following code in aspx.cs file
 if (DropDownList1.SelectedValue == "Line")
        {
            SqlConnection sqlConn3 = new SqlConnection(ConfigurationManager.ConnectionStrings["xxxx"].ConnectionString);
            SqlCommand SqlCmd3 = new SqlCommand("Select ST as state, count(*) as no_of_cust FROM CUSTOMER group by ST", sqlConn3);
            SqlCmd3.Connection.Open();
            SqlDataReader reader3 = SqlCmd3.ExecuteReader();

            DataTable dt = new DataTable();
            dt.Columns.Add("State_col");
            dt.Columns.Add("No_Customers");
            if (reader3.HasRows)
            {
                while (reader3.Read())
                {
                    dt.Rows.Add(reader3.GetValue(0).ToString(), reader3.GetInt32(1));
                }
            }

            var columns = new List<string>();
            for (int i = 0; i < reader3.FieldCount; i++)
            {
                columns.Add(reader3.GetName(i));
            }
            RadHtmlChart3.ChartTitle.Text = "My dynamic Line Chart";
            RadHtmlChart3.ChartTitle.Appearance.Align = Telerik.Web.UI.HtmlChart.ChartTitleAlign.Center;
            RadHtmlChart3.ChartTitle.Appearance.Position = Telerik.Web.UI.HtmlChart.ChartTitlePosition.Top;
            RadHtmlChart3.Legend.Appearance.BackgroundColor = System.Drawing.Color.White;
            RadHtmlChart3.Legend.Appearance.Position = Telerik.Web.UI.HtmlChart.ChartLegendPosition.Bottom;
            RadHtmlChart3.PlotArea.Appearance.FillStyle.BackgroundColor = System.Drawing.Color.White;
 //           RadHtmlChart3.PlotArea.XAxis.Color = System.Drawing.Color.Azure;
            RadHtmlChart3.PlotArea.XAxis.MajorTickType = Telerik.Web.UI.HtmlChart.TickType.Outside;
            RadHtmlChart3.PlotArea.XAxis.MinorTickType = Telerik.Web.UI.HtmlChart.TickType.Outside;
            RadHtmlChart3.PlotArea.XAxis.Reversed = false;
            RadHtmlChart3.PlotArea.XAxis.DataLabelsField = columns[0];

            RadHtmlChart3.Appearance.FillStyle.BackgroundColor = System.Drawing.Color.White;
            RadHtmlChart3.PlotArea.YAxis.LabelsAppearance.DataFormatString = "{0}";
            RadHtmlChart3.PlotArea.YAxis.LabelsAppearance.RotationAngle = 0;
            RadHtmlChart3.PlotArea.YAxis.LabelsAppearance.Color = System.Drawing.ColorTranslator.FromHtml("#000000");
            RadHtmlChart3.PlotArea.YAxis.MajorGridLines.Color =  System.Drawing.ColorTranslator.FromHtml("#EFEFEF");
            RadHtmlChart3.PlotArea.YAxis.MinorGridLines.Color = System.Drawing.ColorTranslator.FromHtml("#F7F7F7");
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.Position = Telerik.Web.UI.HtmlChart.AxisTitlePosition.Center;
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.RotationAngle = 0;
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.Text = columns[1];
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.TextStyle.Color = System.Drawing.ColorTranslator.FromHtml("#000000");
            RadHtmlChart3.PlotArea.XAxis.TitleAppearance.Text = columns[0];
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.Text = columns[1];

           ScatterLineSeries slineSeries = new ScatterLineSeries(); 
            slineSeries.LabelsAppearance.Visible = false;
            slineSeries.LabelsAppearance.Position = Telerik.Web.UI.HtmlChart.LineAndScatterLabelsPosition.Below;
            slineSeries.LabelsAppearance.DataFormatString = "{0}%";
            slineSeries.TooltipsAppearance.DataFormatString = "{0}%";
            slineSeries.DataFieldX = columns[0];
            slineSeries.DataFieldY = columns[1];
         
           RadHtmlChart3.PlotArea.Series.Add(slineSeries);
            RadHtmlChart3.DataSource = reader3;
            RadHtmlChart3.DataBind();
   }
}


Thank you
    







Danail Vasilev
Telerik team
 answered on 12 Aug 2014
5 answers
666 views
I have searched the forums and google to try and figure this out but I am at a loss, any help is much
appriciated.

Problem is when the content page is not in the same folder as the masterpage, the rad controls stop working

Folder structure
WebApplication
       Site1.Master  - contains radtreeview
Admin
    WebForm1.aspx  - blank content page
In this example the radtreeview in master page stops working, the javascript seems to be the problem,
no client side features work, not even just the default expand collapse

If I put the master page and the content page in the same directory all works as expected.

An example page that is not working can be viewed here
http://simplyfundraising.ageektech.com/webapplication/admin/webform1.aspx

Thank you.
      

Sunit
Top achievements
Rank 1
 answered on 12 Aug 2014
1 answer
254 views
I have a aspx web form which contain RadWindow manager with multiple windows in it.  When I open up window via the radwindow manager it seems it won't "affect" the session timer within the "parnet" aspx web form.  How can I make it so that when there is a ajax call or a page refresh, within the radwindow, it will refresh the session timer of the "parent" web form?  

The issue is that the user think that they are still using the web page, but yet they keep getting kick off when session expires on the "parent" web form.

Thank you!

Marin Bratanov
Telerik team
 answered on 12 Aug 2014
2 answers
404 views
I have seen a couple of postings that seem to be related to this issue, but with no definitive answer.

I have a RadComboBox (in ASP.NET) with runat=server and AutoPostBack=true.  I have a handler for OnSelectedIndexChanged.  

The handler fires when the user selects an item with the mouse.  The handler doesn't fire when the focus is on the control and the user changes the selection using the keyboard (arrow up/down).  

The handler will execute in this case when the control loses focus, but that's not the desired behavior.  We have sections of the page that will be shown/hidden based on the user's selection, so the user expects those changes to happen as their selection changes.

What's the official position on how to handle this? 

My version of Telerik.Web.UI.dll is 2013.1.417.35.

Thanks,

David Cater
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2014
3 answers
386 views
I have a page that has links to pop up help documents in a radwindow.  The issue I want to resolve is if a user clicks a link more then one time I don't want multiple radwindows with the same help information.  Is there a way to prevent the same link from opening multiple times?

Here is the code i'm using to load the radwindow

  <script type="text/javascript">
    function GetRadWindow() {
      var oWindow = null; if (window.radWindow)
        oWindow = window.radWindow; else if (window.frameElement.radWindow)
          oWindow = window.frameElement.radWindow; return oWindow;
    }

    function radWin(myurl)
    {
      var oManager = GetRadWindow().get_windowManager();
      setTimeout(function () {
        oManager.open(myurl);
      }, 0);
    }
  </script>

Part of datagrid
<ItemTemplate>
    <%# DataBinder.Eval(Container.DataItem,"Path")%><a href="javascript:radWin('../temp.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"ID")%>')"><img src='../Images/Info.gif' border=0 alt="" /></a>
</ItemTemplate>

Thank you
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2014
3 answers
192 views
I am trying to utilize the RadImageEditor in my software. I dragged the control from the toolbox into my webpage. Here is my code.

<telerik:RadImageEditor ID="RadImageEditor1" runat="server" ToolBarMode="Default" Skin="Default"
     Width="820px" Height="490px">
</telerik:RadImageEditor>

I ran the website but I am not seeing any of the icons in the toolbar. See image below:
David
Top achievements
Rank 1
 answered on 12 Aug 2014
4 answers
167 views
Hello

Im trying to fire a simple onclientnodeclicking event on my treeview via keyboard (hitting enter).

But I find that upon pressing Enter on the node, besides firing the onclientnodeclicking event, also  fires a postback on a Button1 situated on the same page.
How do I prevent this?

Using the mouseClick on the treenode works as expected, without Button1 postback.

Simple example to illustrate:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">

        function NodeClick(sender, eventArgs) {           
           var node = eventArgs.get_node();
           alert(node.get_text());
          // eventArgs.set_cancel(true);                    
        }    
        
    </script>


</head>

<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>       
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click"  TabIndex="1" />
   <br /><br />
    <telerik:RadTreeView ID="RadTreeView1" Runat="server" Width="200px" Height="200px"  TabIndex="2"
        onclientnodeclicking="NodeClick" ResolvedRenderMode="Classic">
        <Nodes>
            <telerik:RadTreeNode runat="server" PostBack="False" Text="Root RadTreeNode1">
            </telerik:RadTreeNode>
            <telerik:RadTreeNode runat="server" PostBack="False" Text="Root RadTreeNode2">
            </telerik:RadTreeNode>
            <telerik:RadTreeNode runat="server" PostBack="False" Text="Root RadTreeNode3">
            </telerik:RadTreeNode>
        </Nodes>
    </telerik:RadTreeView> 
    
    </div>
    </form>
</body>
</html>

Mark
Top achievements
Rank 1
 answered on 11 Aug 2014
2 answers
127 views
Hello,

My customers would like to combine the column titles with checklist filtering. They would like to eliminate the textbox and display only the checklist button next to the column title as shown in the attached image. I realize that Radgrid does not have any built in ability to do this, but is there a way to customize it using code behind and/or client side scripting? If so, can you provide, or point me to an existing example?

Thanks,
~Sonny
Sonny
Top achievements
Rank 1
 answered on 11 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?