Telerik Forums
UI for ASP.NET AJAX Forum
17 answers
579 views
I have problem with the AutoCompleteBox where i get an Object reference not set to an instance of an object error in popup.

I have the placed the control inside a DetailsView like this

<InsertItemTemplate>
 <telerik:RadComboBox ID="CmbChemicalsInsertMode" CheckBoxes="true" Filter="Contains" HighlightTemplatedItems="true" ExpandDirection="Up" MarkFirstMatch="true" AllowCustomText="true" DataTextField="Name" EmptyMessage="Vælg stoffer" Runat="server">
</telerik:RadComboBox>
 <asp:ImageButton ID="BtnAddChemical" CausesValidation="false" ToolTip="Tilføj valgte" width="15px" height="15px" ImageUrl="~/Images/plus.png" OnClick="BtnAddChemical_Click" runat="server" ></asp:ImageButton>
<telerik:RadTextBox ID="TxtDeclaration" TextMode="MultiLine" Rows="5" Text='<%# DataBinder.Eval(Container, "DataItem.Declaration") %>' Runat="server" Skin="Metro"
              Width="170px" />
               
 <telerik:RadAutoCompleteBox ID="RACBChemicals"  InputType="Token" AllowCustomEntry="true" Skin="Metro" DataTextField="Name" DropDownWidth="400"
    DropDownHeight="250" Runat="server"></telerik:RadAutoCompleteBox>
</InsertItemTemplate>

The detailsview is located inside a RadWindow. As soon as i start typing something in the field, i get the previous mentioned popup error.
As soon as i try to move the AutoCompleteBox outside of the DetailsView, the error stops and the control works fine

Martin
Top achievements
Rank 2
 answered on 25 Aug 2014
3 answers
300 views
Hi Guys,

I'm trying to create a chart with multiple line series' below is my code:



string
sql = string.Format(@"SELECT     dbo.ProductSales.OrderDate, dbo.ProductSales.ProductID, dbo.ProductSales.UnitsSold, dbo.Product.Name
                                    FROM         dbo.ProductSales INNER JOIN
                      dbo.Product ON dbo.ProductSales.ProductID = dbo.Product.ProductID
 
                                    WHERE     (DistributionCentreID = 3) AND (dbo.Product.ProductID = 10)
                                    GROUP BY dbo.ProductSales.OrderDate, dbo.ProductSales.ProductID, dbo.ProductSales.UnitsSold, dbo.Product.Name
                                    HAVING      (OrderDate >= CONVERT(DATETIME, '01/10/2013', 103)) AND (OrderDate <= CONVERT(DATETIME, '10/10/2013', 103))");
        SqlUtils db = new SqlUtils("Charon");
 
        try
        {
            DataTable dt = db.FillTable(sql);
 
            RadHtmlChart htmlChart = new RadHtmlChart();
            htmlChart.ID = "htmlChart";
            htmlChart.Width = Unit.Pixel(680);
            htmlChart.Height = Unit.Pixel(400);
 
            htmlChart.Legend.Appearance.Position = ChartLegendPosition.Bottom;
 
            htmlChart.PlotArea.XAxis.TitleAppearance.Text = "Date";
            htmlChart.PlotArea.YAxis.TitleAppearance.Text = "Units Sold";
 
            htmlChart.PlotArea.XAxis.MajorTickType = TickType.Outside;
 
            htmlChart.PlotArea.XAxis.MinorTickType = TickType.Outside;
 
            //htmlChart.PlotArea.XAxis.DataLabelsField = row["OrderDate"].ToString();
 
 
 
            foreach (DataRow row in dt.Rows)
            {
                var lineSeries = new LineSeries { Name = row["Name"].ToString() };
 
 
                lineSeries.LabelsAppearance.Visible = true;
                lineSeries.TooltipsAppearance.Color = System.Drawing.Color.White;
                lineSeries.TooltipsAppearance.DataFormatString = string.Format("{0} x {1}", row["UnitsSold"], row["Name"]);
                lineSeries.DataFieldY = "UnitsSold";
                lineSeries.DataFieldX = "OrderDate";
 
                //SeriesItem seriesItem = new SeriesItem();
 
                var unitsSold = (int)row["UnitsSold"];
 
                //lineSeries.SeriesItems.Add(unitsSold);
 
                CategorySeriesItem seriesItem1 = new CategorySeriesItem();
 
                seriesItem1.Y = unitsSold;
 
                lineSeries.SeriesItems.Add(seriesItem1);
 
                htmlChart.PlotArea.Series.Add(lineSeries);
 
            }
 
 
 
            HtmlChartHolder.Controls.Add(htmlChart);
 
            //LineChart.DataSource = trendAnalysisbyDate(1);
            //LineChart.DataBind();
        }
        finally
        {
            db.Close();
        }



Example Data & how the chart currently looks is attached...

I've just hidden the Name column.. just a text string..

I want the chart to show Units Sold on the left (y axis) and the order date on the bottom (x axis) and the product name to the be label/ledgend..

Any help would be great. Thanks!



Shinu
Top achievements
Rank 2
 answered on 25 Aug 2014
2 answers
299 views
Hi,
I am working on a menu using a RadGrid. developing in C#

I have a MasterTableView that contains the Main information, and one GridTableView in DetailTables. (Check menu attach file)
Once I click the expanded icon on then master table, the grid table view is displayed.

I am looking at selecting a record on the GridTableView (by clicking on the record) to open a form.

However the OnSelectedIndexChanged is not firing.
So I don't know if it should be set up diferently when in a GridTableView (as it is working if I put the event in the RadGrid at a higher level)
Or if I should use another event.

This is how I have set it up (Check html file attached for more details):
- EnablePostBackOnRowClick="true" in the Client settings of the RadGrid.
- OnSelectedIndexChanged="GV_SelectedIndexChanged" set up in the GridTableView, and the C# code added accordingly.

Thank you for your help.

Anne
Anne
Top achievements
Rank 1
 answered on 25 Aug 2014
0 answers
108 views
 
hello 

I am using Telerik ReportViewer to display reports,
But when I print report ,it  exports to pdf instead of printing. as shown in attached image.



please help.
Kishor
Top achievements
Rank 2
 asked on 25 Aug 2014
3 answers
170 views
Hello,

Is there any client API or mechanism that can be used to configure RADEditor MaxTextLength property dynamically in the Client code (JavaScript)? I need to control maximum number of characters should be allowed to enter into editor (single instance) depending on context option (jquery) selected by the user. For example, 200 characters for legend but 1000 characters for reference etc.

Thanks,
Chuck
Shinu
Top achievements
Rank 2
 answered on 25 Aug 2014
1 answer
71 views
Dear Team,

I have 3 controls. First one is textbox, second is AsyncUpload and Third is textbox  again. Initially we are focusing on textbox1 and enter 'Tab' button from keyboard focusing on AsyncUpload Control and when i again click on 'Tab' from keyboard it needs to focus on textbox2 where as it is happening on double tab from keyboard.

Please let me know how i can solve this issue.

Thanks and Regards,
Rajender.A
Princy
Top achievements
Rank 2
 answered on 25 Aug 2014
1 answer
66 views
Hi Telerik Team,

I has been working with Telerik Controls for the last months and there is something that still I can't feel as something good. When I create the Local Resource (resx) file for my aspx page, a lot of tags are added to the aspx, and of course a lot of local resources entries in the resx file. I do understand the entries created on resx file, but the number of tags become kind on insane in the aspx file, for example for a simple RadTextBox that was originally like this:

<telerik:RadTextBox ID="ttxtFirstName" runat="server" Width="100%" ></telerik:RadTextBox>
(I do not define Skin as it is set on web.config for all the telerik controls)

And after creating the local resource my aspx ends like this:

<telerik:RadTextBox ID="ttxtFirstName" runat="server" Width="100%" 
                                    LabelCssClass="" LabelWidth="64px" 
                                    meta:resourcekey="ttxtFirstNameResource1" Resize="None" 
                                    ResolvedRenderMode="Classic">
                                    <EmptyMessageStyle Resize="None" />
                                    <ReadOnlyStyle Resize="None" />
                                    <FocusedStyle Resize="None" />
                                    <DisabledStyle Resize="None" />
                                    <InvalidStyle Resize="None" />
                                    <HoveredStyle Resize="None" />
                                    <EnabledStyle Resize="None" />
                                </telerik:RadTextBox>

So, as you can see a lot of tags (and lines, because each tag is using one line of code) are generated and if you ask me, it doesn't look simple and even can break the low "beauty" of the code that we can have.

Is this completely necessary?, when a local resource for a ASP.NET textbox is generated the only thing added to our code is the metarsourcekey. Is there a way to create the local resource different from using option inside Tools Menu that could be used to avoid this?

I will leave aside the number of entries generated in resx file, just cause those can be ignored or removed. But what bothers me is to mess up with the code, even if it is the aspx file.

Consider that we could have very long forms where the number of controls can be large and adding around 10 lines per each control is not pretty. Hope that you could share a solution.

Regards,

Oscar Ramirez




Ianko
Telerik team
 answered on 25 Aug 2014
1 answer
165 views
Hi,

I am using Teleriks' 2014.2.618 version. Earlier, I was using 2012 ones. 

I have ContextMenu on RadGrid which is suppose to open a menu. It worked perfectly fine on 2012 version. However, on 2014, the ContextMenu doesn't open up. While debugging our javascript its breaks at contextmenu.showAt(100,100). 

We verified the passing parameter as integer. We pass the RadGrid's Id as sClientId.

It throws error as : Unable to get property 'showAt' of undefined or null reference 

var x = 0;
var y = 0;

function showMenu()
        x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
        y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;

        var contextMenu = $find(sClientId);
        contextMenu.showAt(x, y);
}

Shinu
Top achievements
Rank 2
 answered on 25 Aug 2014
1 answer
161 views
hi

How do I remove or delete item from listbox using command name? Thanks a lot

Here is my code:

<telerik:RadListBox ID="lbProductList" runat="server" Width="100%"  EnableViewState="true" ViewStateMode="Enabled" Skin="Metro" style="top: 0px; left: 0px" AutoPostBack="True" EnableDragAndDrop="True">
                  <ItemTemplate>
                        <table>
                                <tr>
                                    <td class="leftbox"><asp:Image ID="Image1" CssClass="circularsmall" runat="server" EnableViewState="true" ImageUrl='<%# "~/images.ashx?id=" + Eval("PhotoThumb")%>' /></td>
                                    <td class="rightbox"><div class="semibold"  style="word-wrap:break-word"><%# Eval("ProductName")%></div>
                                    <div>
                                    <asp:LinkButton ID="lnkDelete" CommandName="remove" Text="Remove" style="text-decoration:none;color:darkgray;font-size:smaller" runat="server"></asp:LinkButton></div>
                                    </td>
                             </tr>
                          </table>
                     </ItemTemplate>
                 </telerik:RadListBox>
Princy
Top achievements
Rank 2
 answered on 25 Aug 2014
3 answers
133 views
Hello! 

I'm trying to put a link (<a>) in the text property of RadPanelItem. 

By doing this, I have problems with the layout, as below

Is it possible to fix?
Princy
Top achievements
Rank 2
 answered on 25 Aug 2014
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?