Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
174 views
Hi I am relatively new to Ajax so bear with me.  I have an RadAjaxPanel on my page.  inside the radajaxpanel i have two dropdown list, calender and a button.  The button is not firing.  However, when i move the radbutton outside of the radajaxpanel it works just fine.  Please help........... how do i get the radbutton inside the radajaxpanel to work.  Code is below..... btnViewReport is the one not working

                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="188px" 
                    style="margin-top: 0px" width="568px">
                    <telerik:RadComboBox ID="cbxRecipe" Runat="server" DataSourceID="dsRecipe" 
                   Height="600px" Width="250px" EnableLoadOnDemand="true"
                            DropDownWidth="249px" 
    EmptyMessage="Select a Recipe" HighlightTemplatedItems="true"
                 EnableAutomaticLoadOnDemand="True" 
                    DataTextField="RecipeCode" DataValueField="RecipeCode" 
                    AutoPostBack="True"  >
                        <HeaderTemplate>
                            <table style="width: 249px" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width: 40px;">
                                        Recipe</td>
                                    <td style="width: 149px;">
                                        Description</td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table style="width: 249px" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width: 40px;">
                                        <%# DataBinder.Eval(Container.DataItem, "RecipeCode")%>
                                    </td>
                                    <td style="width: 149px;">
                                        <%# DataBinder.Eval(Container.DataItem, "Recipe")%>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </telerik:RadComboBox>
                    <asp:SqlDataSource ID="dsRecipe" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:oCon_Riverside %>" SelectCommand="select RecipeCode, Recipe
from [dbo].[CCFIProduction_recipe]
Order by RecipeCode "></asp:SqlDataSource>
                    <br />
                    <br />
                    <telerik:RadComboBox ID="RadComboBox1" Runat="server" AutoPostBack="True" 
                        DataSourceID="dsGetUBI" DataTextField="UBI" DataValueField="UBI" 
                        DropDownWidth="298px" EmptyMessage="Select a UBI" Enabled="False" 
                        Height="600px" HighlightTemplatedItems="True" ShowDropDownOnTextboxClick="True" 
                        Width="300px">
                        <HeaderTemplate>
                            <table cellpadding="0" cellspacing="0" style="width: 298px">
                                <tr>
                                    <td style="width: 40px;">
                                        Recipe</td>
                                    <td style="width: 60px;">
                                        PackingDate</td>
                                    <td style="width: 80px;">
                                        MakingBatch</td>
                                    <td style="width: 60px;">
                                        UBI</td>
                                    <td style="width: 20px;">
                                        Shift</td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table cellpadding="0" cellspacing="0" style="width: 298px">
                                <tr>
                                    <td style="width: 40px;">
                                        <%# DataBinder.Eval(Container.DataItem, "RecipeCode")%>
                                    </td>
                                    <td style="width: 60px;">
                                        <%# DataBinder.Eval(Container.DataItem, "PackingDate")%>
                                    </td>
                                    <td style="width: 80px;">
                                        <%# DataBinder.Eval(Container.DataItem, "MakingBatch")%>
                                    </td>
                                    <td style="width: 60px;">
                                        <%# DataBinder.Eval(Container.DataItem, "UBI")%>
                                    </td>
                                    <td style="width: 20px;">
                                        <%# DataBinder.Eval(Container.DataItem, "Shift")%>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </telerik:RadComboBox>
                    <asp:SqlDataSource ID="dsGetUBI" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:oCon_Riverside %>" 
                        
                        SelectCommand="SELECT recipe.RecipeCode, Packing.MakingBatch, CONVERT(varchar(20), Packing.PackingDate, 101) as PackingDate, Packing.SellByLetter, Packing.UBI, Packing.Shift FROM recipe INNER JOIN Packing ON recipe.RecipeCode = Packing.RecipeCode WHERE (Packing.PackingDate &gt; dateadd(yyyy,-1,GETDATE())) AND (recipe.RecipeCode = @recipeCode) AND (NOT (Packing.UBI IS NULL)) ORDER BY recipe.RecipeCode, Packing.PackingDate DESC, Packing.SellByLetter">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="cbxRecipe" Name="recipeCode" 
                                PropertyName="SelectedValue" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    <asp:Label ID="Label1" runat="server" Font-Size="Small" 
                        Text="*Last 12 months shown"></asp:Label>
                    <br />
                    <br />
                    <asp:Label ID="LblMkDate" runat="server" Text="Select Make Date:"></asp:Label>
                    <telerik:RadDatePicker ID="RadDatePicker1" Runat="server" AutoPostBack="True" 
                        Culture="en-US">
                        <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False">
                        </Calendar>
                        <DateInput AutoPostBack="True" DateFormat="M/d/yyyy" 
                            DisplayDateFormat="M/d/yyyy" LabelWidth="40%">
                        </DateInput>
                        <DatePopupButton HoverImageUrl="" ImageUrl="" />
                    </telerik:RadDatePicker>
                    <br />
                    <br />
                    <telerik:RadButton ID="btnViewReport" runat="server" Text="View Report" AutoPostBack="True">
                    </telerik:RadButton>
                </telerik:RadAjaxPanel>


thanks
Pavlina
Telerik team
 answered on 21 May 2013
6 answers
462 views
Hello everyone,

On button click, confirm box gets open, but it does not trigger the "btnDelete_Click" event on clicking of OK button.
Below is the code:

<asp:Button ID="btnDelete" runat="server" Text="Delete" OnClientClick="return radconfirm('Delete Item?');"         OnClick="btnDelete_Click"  />


Please suggest me, where I am getting mistacke.


I have also tried  OnClientClick="return radconfirm('Delete Item?', event);"
but i am getting following error:
                    Object doesn't support this property or method
Elias
Top achievements
Rank 2
 answered on 21 May 2013
1 answer
52 views
I am using an editor and an image manager. I have written a custom file provider for this. It pulls the images, but my upload button is blocked out in the image manager. I have gone through the forums and haven't been able to find anything that will help me with this issue.
Vessy
Telerik team
 answered on 21 May 2013
2 answers
100 views
I have a grid, and in IE and FF it displays correctly.  However, in Chrome the last column is expanded way way off the page.  I tried using the css trick to shrink the filter box [thinking that was the issue] in http://www.telerik.com/community/forums/aspnet-ajax/grid/filtercontrolwidth-default-100.aspx, but that didn't work either [in turn, it EXPANDED the rest of the filter boxes - to be expected].

I do have HeaderStyle-Width properties set, but it still displays funny in Chrome.

Grid code:
<telerik:RadGrid runat="server" ID="radListDocuments" AllowPaging="True" AllowSorting="True" ShowHeader="True" AutoGenerateColumns="False" GridLines="None" CssClass="table_data" Width="100%"
                OnNeedDataSource="radListDocuments_NeedDataSource">
                <MasterTableView CommandItemDisplay="None" AutoGenerateColumns="False" DataKeyNames="document_id" AllowSorting="True" AllowMultiColumnSorting="False"
                    AllowFilteringByColumn="True" NoMasterRecordsText="No document records" PageSize="20">
                    <Columns>
                        <telerik:GridTemplateColumn AllowFiltering="False" HeaderStyle-Width="1%">
                            <ItemTemplate>
                                <a href='ViewDocument.aspx?id=<%# Eval("document_id") %>&type=division' target="_blank">
                                    <img src="~/images/icons/magnifier.png" alt="View" style="border: 0" /></a>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn AllowFiltering="False" HeaderStyle-Width="1%">
                            <ItemTemplate>
                                <a href="javascript:OpenModalWindow('EditDocument.aspx?documentid=<%# Eval("document_id") %>',450,200)">
                                    <img src="~/images/icons/page_edit.png" alt="Edit Attachment" style="border: 0" /></a>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn AllowFiltering="False" HeaderStyle-Width="1%">
                            <ItemTemplate>
                                <img src='~/images/icons/<%# FileHelper.DisplayDocumentIcon( Eval("filetype").ToString() ) %>' />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="filename" HeaderStyle-Width="30%" HeaderText="Document Name" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Font-Bold="True"
                            AutoPostBackOnFilter="True" />
                        <telerik:GridBoundColumn DataField="type_desc" HeaderText="Doc Type" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="15%" HeaderStyle-Font-Bold="True"
                            AutoPostBackOnFilter="True" />
                        <telerik:GridBoundColumn DataField="division_description" HeaderText="Division" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="15%" HeaderStyle-Font-Bold="True"
                            AutoPostBackOnFilter="True" />
                        <telerik:GridBoundColumn DataField="create_by" HeaderText="Created By" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="15%" HeaderStyle-Font-Bold="True"
                            AutoPostBackOnFilter="True" />
                        <telerik:GridDateTimeColumn DataField="create_date" HeaderText="Create Date" ItemStyle-HorizontalAlign="Center" PickerType="DatePicker"
                            DataFormatString="{0:MMM dd, yyyy}" HeaderStyle-Width="15%" HeaderStyle-Font-Bold="True" AutoPostBackOnFilter="True" ItemStyle-Width="15%">
                        </telerik:GridDateTimeColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

and I've attached a screenshot of the display issue.

Telerik version: 2013.1.417.40
Chrome: 26.0.1410.64 m

How can I fix it?
Mike
Top achievements
Rank 1
 answered on 21 May 2013
1 answer
88 views
var grid = $find('<%=rgdBieu1.ClientID %>'); 
      var MasterTableView = grid.get_masterTableView();
       var maNV = MasterTableView.get_dataItems()[args.get_commandArgument()].getDataKeyValue("MA_DV");
Hello everybody,
I have a problem. I use get_masterTableView(), it work in firefox and google chorme but can't work in internet explorer. In IE, function get_masterTableView() return null.
Have any ideas ?
Thanks you very much!
Viktor Tachev
Telerik team
 answered on 21 May 2013
1 answer
126 views
When trying to process the uploaded files for the RadAsyncUploader control I am getting an error "The device is not ready".

Does anyone have any ideas as to what may be causing this?

For Each file As Telerik.Web.UI.UploadedFile In Me.Uploader.UploadedFiles
 
                Dim targetFile = String.Format("{0}\{1}"targetFolderfile.GetName)
                file.SaveAs(targetFile)
 
            Next

I am using the latest version of the AsyncUploader control.
targetFile is a validly formed filename and the user has write access to the target folder.
Hristo Valyavicharski
Telerik team
 answered on 21 May 2013
1 answer
171 views
Hello,
First I meant " Stacked Columns", instead of " Stacked Charts"  (Could not edit the title)

This is a very similar case as in : Stacked Column series item label getting overlapping

Problem:
For one particular case when there are stacked columns with high amounts and some columns with very low amounts, causing the ratio to set smaller columns and overlapping the labels. (please check uploaded image)

What I have tried:
1) Set position on the Series.LabelAppearance, all the 4 options (Center, Inside Base, Inside end, Outside End) and of course they all keep overlapping.
2) Set Minimum and Max Values for the Y axis, to get more room for columns to be larger.
3) Smaller Font.

I was looking for the intelligent labels but I didn't find any similar option on this HTML Chart
http://demos.telerik.com/aspnetajax/chart/examples/newfeatures/intelligentlabels/defaultcs.aspx

Is there any work around for this? or future release for this feature?

I am currently using latest version 2013.1 417 (April 17)

Thank you very much for your time
Danail Vasilev
Telerik team
 answered on 21 May 2013
1 answer
371 views
Hi! I'm trying to set a small example of binding a RadGrid to a JSON string but I'm not accomplishing it...

Javascript (function gets called on an item click):
function FillTelerikGrid() {
 
        var GridData;
 
        GridData = "{\"Contacts\": {\"Contact\": [{\"ID\": \"1\",\"Name\": \"John Doe\",\"Age\": \"21\",\"Email\": \"johndoe@example.com\"}]}}";
        var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
        tableView.set_dataSource(GridData);
        tableView.dataBind();
 
}

Control.ascx
       <div id="<%=this.ClientID%>_ContextContainer" class="divContextContainer"
           style="float: left; height: 400px; overflow-y: auto; width: 33.3%;">  
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" Skin="Metro">
               <MasterTableView>
                   <Columns>
                       <telerik:GridBoundColumn DataField="ID" UniqueName="ID" HeaderText="ID">
                       </telerik:GridBoundColumn>
                   </Columns>
               </MasterTableView>
           </telerik:RadGrid>
       </div>


Control.ascx.cs
protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    dynamic data = new[] {
                        new { ID = "1", Name ="Name11",Age = "0"},
                        new { ID = "2", Name ="Name11",Age = "0"},
                        new { ID = "3", Name ="Name11",Age = "0"},
                        new { ID = "4", Name ="Name11",Age = "0"}
                    };
                    RadGrid1.MasterTableView.DataSource = data;
                    RadGrid1.DataBind();
                }
 
            }
            catch (Exception ex)
            {
                Platform.WebUI.DiagnosticsHelper.ReportError(ex);
                throw ex;
            }
        }


I based my code on the one i found on this post: http://www.telerik.com/community/forums/aspnet-ajax/grid/bind-radgrid-client-side-to-a-json-array.aspx

But, I'm getting the following Javascript exception:

On Chrome, I get:
Uncaught TypeError: Cannot read property 'style' of null ScriptResource.axd:6507
Telerik.Web.UI.RadGrid._getAllChildItemsRecursive ScriptResource.axd:6507
Telerik.Web.UI.RadGrid._getPositionedDataItems ScriptResource.axd:6499
Telerik.Web.UI.GridTableView.dataBind ScriptResource.axd:3831
FillTelerikGrid Notes.aspx:695
getContextView Notes.aspx:637
(anonymous function) Notes.aspx:608
f.event.dispatch jquery.js:3
h.handle.i

On Firefox I get:
[21:29:29.778] TypeError: m.get_element(...).parentNode.parentNode is null @ https://www.....(...)

P.S.: I didn't add RadScriptManager because the portal already has a ScriptManager... Don't know if that is the problem...
Andre
Top achievements
Rank 1
 answered on 21 May 2013
1 answer
103 views
Hello.

I would like to know, how can I update an ajax panel from another ajax panel in the same page (first scenario) and with an ajax panel in a user control e another in the user control's parent page (second scenario).

Best regards.

Eyup
Telerik team
 answered on 21 May 2013
1 answer
52 views
Hi,

For anyone who is also experiencing this problem. It appears something has changed regarding ObjectDataSource and adding to the selectparameter collection.

If, as we do, you programmatically do
dsmyods.SelectParameters.Clear();
dsmyods.SelectParameters.Add("Param", 123);
in the Page_Load event, then this will cause your grids to stop working as expected when trying to expandcollapse. Telerik have provided the following solution
protected void dsmyods_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            e.InputParameters.Clear();
            e.InputParameters.Add("Param", 123);          
        }

and adding OnSelecting="dsmyods_Selecting" to the ObjectDataSource decleration.

Hope this helps someone.
Daniel
Telerik team
 answered on 21 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?