Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
479 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
56 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
106 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
91 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
137 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
187 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
375 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
105 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
56 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
3 answers
152 views
Hi, we have a RadRotator in a DIV.
We have also jQuery code that do "slideUp" and "slideDown" of this DIV.

if I include <script src="js/jquery-1.9.1.min.js" /> RadRotator don't work fine, if I omit <script src="js/jquery-1.9.1.min.js" />, "slideUp" and "slideDown" don't work.

I have read this article

http://www.telerik.com/help/aspnet-ajax/introduction-using-jquery.html

but no solution suggested work fine

How is possible solve the problem?
Slav
Telerik team
 answered on 21 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?