Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
86 views
Hi,

in my application i have a button that displays a modal popup. in that Modal i have a button that displays another modal popup.
the issue is the second popup shows behind the first one. I have read where people are suggesting using setActive to bring the second modal forward (ontop)
however when i try and get do this using the following code.

                      window.parent.purchaseLicense(licenseTypeId, ownerId, licenseIdToUpgrade, onLicensePurchased);
                      oWindow = window.frameElement.radWindow;
                      setTimeout(function () { oWindow.setActive(true); }, 0);
                   
Owindow is coming back with the first Modal.

How can i get the second modal and show that ontop?
As you can see the second modal is coming  from the parent because i don't want it to be inside the other.


thoughts?




Marin Bratanov
Telerik team
 answered on 24 Nov 2014
2 answers
342 views
My grid has a <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="30px" /> column to start things out. I am then trying to follow this example http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html in order to keep track of what rows I've selected.

However, I find that the javascript event for selecting a row only fires when I press the checkbox in the header ("select all"). And it fires once for every visible row, of course. Why isn't it firing when I click on the checkboxes next to an individual row?
C
Top achievements
Rank 1
 answered on 24 Nov 2014
1 answer
730 views
Just started learning Telerik APIs.  Using C# / Linq.  Reading up on MasterTableView and trying to hook up a simple grid which lists row data from an Orders table, including one column that lists the Name (a GridDropDownColumn) from a Customers table. So far no name is being displayed.

Where do I set datasource for the Customers table - how do I hook this up?
Thanks.
====
CREATE TABLE Customers
  (
    ID int NOT NULL IDENTITY(1,1) PRIMARY KEY,
    Name varchar(128) NOT NULL
  )

CREATE TABLE Orders
  (
    ID int NOT NULL IDENTITY(1,1) PRIMARY KEY,
    Description varchar(32) NOT NULL,
    CustomerID int NOT NULL FOREIGN KEY REFERENCES Customers(ID)
  )


    <telerik:RadGrid runat="server" ID="RadGrid_Order" AutoGenerateColumns="false" AllowPaging="true"
        OnNeedDataSource="RadGrid_NeedDataSource" OnUpdateCommand="RadGrid_UpdateCommand"
        OnItemCreated="RadGrid_ItemCreated" OnDeleteCommand="RadGrid_DeleteCommand"
        OnInsertCommand="RadGrid_InsertCommand" OnItemDataBound="RadGrid_ItemDataBound">
        <MasterTableView DataKeyNames="ID" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage" EditMode="InPlace">
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                <telerik:GridBoundColumn DataField="ID" HeaderText="ID" ReadOnly="true" ForceExtractValue="Always" ConvertEmptyStringToNull="true" />
                <telerik:GridBoundColumn DataField="Description" HeaderText="Description" />
                <telerik:GridDropDownColumn UniqueName="RadCombo_Customer" HeaderText="Name" DropDownControlType="RadComboBox"
                    DataField="CustomerID" ListDataMember="Customers" ListValueField="ID" ListTextField="Name" />

                <telerik:GridButtonColumn ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
            </Columns>
            <EditFormSettings>
                <EditColumn ButtonType="ImageButton" />
            </EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>

        protected void RadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
           RadGrid_Order.DataSource = OrdersTable.DataSource();  // query returns SELECT * FROM Orders;
        }


Radoslav
Telerik team
 answered on 24 Nov 2014
1 answer
90 views
I would like to add a control (ie: button) to the header of my node, essentially to the right of the rendered text field.  

I have an Item template defined for the data bound items, but haven't be able to figure out how to add a control to the node or specify a template for the node itself.

See attached picture for an example of what I am trying to achieve.
Peter Filipov
Telerik team
 answered on 24 Nov 2014
1 answer
212 views
Hi all,

I am experiencing some strange things. It could be safari/ios, but my dropdownlist used to worked
on safari, iphone and ipad. But it's not working anymore due to an update i guess.

When i click on the drop down-arrow, nothing happens.
Is there anyone who can give me a help on this

thanks

Richard


Dimitar
Telerik team
 answered on 24 Nov 2014
1 answer
202 views
is there any way to wait for savechanges to complete before calling another action? i need to make sure my form doesn't submit until it's finished. and then i need to submit my form
Maria Ilieva
Telerik team
 answered on 24 Nov 2014
1 answer
198 views
I have a requirement to display data in a ASP.NET grid.  The columns are dynamically created as the table source is selected by the user and is not known at design time.  I am able to build the data table with the respective column names and display the data in the grid.  This is working OK, but I also have a requirement to color code specific columns.  The data source that I am display is the results on a data compare process so I have columns named MYFIELD1_S and MYFIELD1_T where the _S and _T represents the source and target.  I am need to compare the values in MYFIELD1_S versus MYFIELD1_T and if the values are different then color code MYFIELD1_T. 

I have some logic that is looking for the column name ending with "_T", get the column index and compare it to the column index-1 (i.e. the _S column).  But I have been having a hard time getting the column index.  I have tried the ItemCreated and ItemDataBound events without any luck and have looked at prerender.  I have this function working perfectly for a WinForm grid using CellFormatting event, but this does not exist in ASP.NET and we are moving from a WinForm app to ASP.NET

How is the best way to handle this requirement?
Scott Manning
Top achievements
Rank 1
 answered on 24 Nov 2014
7 answers
184 views
Hello,

I am working on a project with RadGrid.

My site is multilingual and therefore I use RadGrid.Main.resx.
There is a problem / bug in RTL languages.
If I use DateRange filter and I use Hebrew as my language:
A. The fields “From” and “To” are not translated into Hebrew.
B. The filter is not up to par with RTL, but remained in LTR / or it aligns wrong is not exactly clear. See attached picture

 I will be happy to receive a solution.

Thanks,
Daniel
Daniel
Top achievements
Rank 1
 answered on 23 Nov 2014
0 answers
69 views
Hi All,
I am using the below code to refresh a radgrid on radwindow close but this is the error i get. Can anyone help me solve this.
Error
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)

Aspx
     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"   
        onajaxrequest="RadAjaxManager1_AjaxRequest">  
        <AjaxSettings>  
            <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
        </AjaxSettings>  
    </telerik:RadAjaxManager> 
  
                                      <script type="text/javascript">
                                          function closeRadWindow() {
                                              $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
}
</script> 

Code
        protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
            {
            RadGrid1.MasterTableView.SortExpressions.Clear();
            RadGrid1.MasterTableView.GroupByExpressions.Clear();
            RadGrid1.Rebind();
            } 

        }

Thanks in advance
Edd
Top achievements
Rank 1
 asked on 23 Nov 2014
2 answers
138 views
Hello,

I am working on a project with RadGrid.

I am trying to create a FilterTemplate like this video:
http://youtu.be/jOY3NFzdoVY

This is FilterTemplate’s code, created in the designer:
<FilterTemplate>
                            <telerik:RadMenu ID="RadMenu1" runat="server" OnClientItemOpened="itemOpened">
                                <Items>
                                    <telerik:RadMenuItem PostBack="false" Text="Date Filter">
                                        <ContentTemplate>
                                            <div id="DateFilterDivWrapper" class="Wrapper">
                                                <table id="DateFilterTable">
                                                    <tr>
                                                        <td class="CustomFilter">
                                                            <asp:Label ID="lbl_From" runat="server" Text="From"></asp:Label>
                                                        </td>
                                                        <td class="CustomFilter">
                                                            <telerik:RadDateTimePicker ID="dt_picker_From" runat="server"></telerik:RadDateTimePicker>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="CustomFilter">
                                                            <asp:Label ID="lbl_To" runat="server" Text="To"></asp:Label>
                                                        </td>
                                                        <td class="CustomFilter">
                                                            <telerik:RadDateTimePicker ID="dt_picker_To" runat="server"></telerik:RadDateTimePicker>
  
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2" style="text-align: center;" class="CustomFilter">
                                                            <telerik:RadButton ID="btn_Filter_Date" runat="server" Text="Filter"></telerik:RadButton>
                                                        </td>
                                                    </tr>
                                                </table>
  
  
                                            </div>
                                        </ContentTemplate>
                                    </telerik:RadMenuItem>
                                </Items>
                            </telerik:RadMenu>
  
                        </FilterTemplate>

However, I want to code to be code-behind, like this:
01.Private Sub RadGrid1_ColumnCreated(sender As Object, e As Telerik.Web.UI.GridColumnCreatedEventArgs) Handles RadGrid1.ColumnCreated
02.        If e.Column.ColumnType = "GridDateTimeColumn" Then
03.            Dim xx As New MyCustomFilteringColumn
04.            e.Column.FilterTemplate = xx
05.        End If
06.    End Sub
07. 
08.Public Class MyCustomFilteringColumn
09.    Implements ITemplate
10.  
11.    Public Sub InstantiateIn(container As Control) Implements ITemplate.InstantiateIn
12.        Dim RadMenuItem_DivDate As New RadMenuItem
13.        Dim insidMenuControl As New Control
14.  
15.  
16.        Dim lbl_From, lbl_To As New Label()
17.        Dim dt_picker_From, dt_picker_To As New RadDateTimePicker
18.        Dim btn As New RadButton()
19.        lbl_From.ID = "lbl_From"
20.        lbl_To.ID = "lbl_To"
21.        lbl_From.Text = "From" 'can take from resource  (all the .text)
22.        lbl_To.Text = "To"
23.        dt_picker_From.ID = "dt_picker_From"
24.        dt_picker_To.ID = "dt_picker_To"
25.        btn.ID = "btn_Filter"
26.        btn.Text = "Filter"
27.  
28.  
29.  
30.  
31.  
32.        insidMenuControl.Controls.Add(New Literal With {.Text = "<div id=""DateFilterDivWrapper"">"})
33.        insidMenuControl.Controls.Add(New Literal With {.Text = "<table id=""DateFilterTable""> <tr>  <td>"})
34.        insidMenuControl.Controls.Add(lbl_From)
35.        insidMenuControl.Controls.Add(New Literal With {.Text = "</td> <td>"})
36.        insidMenuControl.Controls.Add(dt_picker_From)
37.        insidMenuControl.Controls.Add(New Literal With {.Text = "</td>  </tr> <tr> <td>"})
38.        insidMenuControl.Controls.Add(lbl_To)
39.        insidMenuControl.Controls.Add(New Literal With {.Text = " </td> <td>"})
40.        insidMenuControl.Controls.Add(dt_picker_To)
41.        insidMenuControl.Controls.Add(New Literal With {.Text = "</td>  </tr> <tr>   <td colspan=""2"" style=""text-align:center;"">"})
42.        insidMenuControl.Controls.Add(btn)
43.        insidMenuControl.Controls.Add(New Literal With {.Text = "  </td> </tr>  </table>"})
44.        insidMenuControl.Controls.Add(New Literal With {.Text = "</div>"})
45.  
46.        RadMenuItem_DivDate.PostBack = False
47.        RadMenuItem_DivDate.Text = "Date Filter"
48.  
49.        RadMenuItem_DivDate.ContentTemplate.InstantiateIn(insidMenuControl)
50.  
51.        Dim RadMenu_DateFilter As New RadMenu
52.        RadMenu_DateFilter.ID = "RadMenu_DateFilter"
53.        RadMenu_DateFilter.OnClientItemOpened = "itemOpened"
54.        RadMenu_DateFilter.Items.Add(RadMenuItem_DivDate)
55.  
56.        container.Controls.Add(RadMenu_DateFilter)
57.  
58.    End Sub
59.End Class

However, when I try to transfer the above code to code-behind I receive the following exception (It occurs on line 49):
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

I would be happy to get a code-behind solution.

Thank you,
Daniel.
Daniel
Top achievements
Rank 1
 answered on 23 Nov 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?