Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
2.0K+ views

Hello -- I am not having any luck with opening a popup.  My code is listed below. 

Can someone please help?  I get an error - 'Unable to get property "open" of undefined or null reference

Thanks, Raka.

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function editInfo() {
            if (confirm('Are you sure you want to do this?'))
                return window.radopen('/Folder/Edit.aspx', 'rwGeneric');
    }
    </script>
</telerik:RadCodeBlock>

Vessy
Telerik team
 answered on 31 Aug 2020
3 answers
208 views

With radhtmlchart, is it possible to do a diverging bar chart similar to this?

https://www.ryansleeper.com/wp-content/uploads/2018/05/Wins-Per-Conference-Per-Season-Diverging-Bar-Chart-Tableau-with-Labels.png

If so, is there an example I can follow?

Vessy
Telerik team
 answered on 31 Aug 2020
7 answers
566 views
Hello, i'm using RadAsyncUpload to send files to server. i am setting a postbacktrigger to button "save". The problem exists when a something goes wrong at server side.
for example: if some textbox has the incorrect format a valitonsummary displays the error message, but the uploaded files disappear, its like the control reset.

anyone knows how to stop the reset after PostbackTrigger?

thanks
Peter Milchev
Telerik team
 answered on 31 Aug 2020
2 answers
211 views

I need a Context Menu to pop up on right-clicking any Shape in RadDiagram, a different Context Menu upon right-clicking a Connection, and nothing at all on right-clicking white space.  I have experimented with setting "RadDiagram1" as a Target, but unlike the OnClick client-side event, which runs only if the user clicks on a shape or connection, setting the entire diagram as a Target does not differentiate between shape, connection and white space when right-clicked. So far, I have not found a way to specify a Shape or Connection as the Target.  Can somebody suggest a solution?  

Sheldon
Top achievements
Rank 1
 answered on 30 Aug 2020
9 answers
446 views

I have a user control that I dynamically create in the cells of a radcalendar. The control is based on the results of a database query that takes place in the DayRender event for each day of the calendar. Any given day can have zero, none or many of the user controls created within it. All this works fine, the problem is that none of the events associated with the user control ever get called when triggered. For instance if a checkbox is clicked the page will postback, but the event for this checkbox in the usercontrol doesn't execute. I know why this is, but I don't know how to fix it. Normally I would create/recreate my user controls in OnInit, but since this is happening in DayRender the controls don't exist when the page posts back. How can I get this to work?

Thank you,

John

(I had mistakenly posted this in the non-Ajax forum previously)

JeffSM
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 28 Aug 2020
1 answer
130 views
I have a radgrid that its datasource takes three inputs before executing.  I also want to allow for inserts to take place, but those three dropdown selections must be made prior to allowing a user to insert a record.  How can I prevent the edit form for showing if the selections are not made prior to clicking the Add New Record buttion on the radgrid?
Attila Antal
Telerik team
 answered on 28 Aug 2020
1 answer
254 views
I need a Context Menu to pop up on right-clicking any Shape in RadDiagram, a different Context Menu upon right-clicking a Connection, and nothing at all on right-clicking white space.  I have experimented with setting "RadDiagram1" as a Target, but unlike the OnClick client-side event, which runs only if the user clicks on a shape or connection, setting the entire diagram as a Target does not differentiate between shape, connection and white space when right-clicked. So far, I have not found a way to specify a Shape or Connection as the Target.  Can somebody suggest a solution?
Rumen
Telerik team
 answered on 28 Aug 2020
2 answers
268 views

Hi

I have a page with a radmultiselect. The items are populated using a webservice with the response in json format. All works fine.

I'm trying to get the items in code behind, but the RadMultiSelect.Items are aways null.

RadMultiSelect rms = area.FindControl("id_of_radmultiselect") as RadMultiSelect;
 
if (rms != null) {
    var selectedValues = rms.Value;
    foreach (string value in selectedValues) {
        MultiSelectItem selectedItem = rms.Items.FindChildByValue(value);
        string result = string.Format("Selected item with text: <strong>{0}</strong> and value: <strong>{1}</strong><br />", selectedItem.Text, selectedItem.Value);
    }
}

In my test I added two items and I get in the rms.Value the number 2.

But the rms.Items is always count = 0, and when I try to find chield by value the result are null.

Why the Value have two items and in the rms.Items is 0?

Thank you

Fabio PM
Top achievements
Rank 1
Iron
 answered on 28 Aug 2020
1 answer
199 views

Hi,

I need to set zoom level to 14,5 but when I use decimals, map location changes.

 

 

Figure 1 shows when zoom level is 14, then the place is correct

Figure 2 show when zoom level is set to 14,5 , then map is located in totally different place ???

 

Following map link is used to generate map:

https://#= subdomain #.tile.thunderforest.com/landscape/#= zoom #/#= x #/#= y #.png

 

- Auvo -

 

 

Doncho
Telerik team
 answered on 28 Aug 2020
1 answer
457 views

I have a combobox as filter in RadGrid. The combobox has "Alle"(all), "Nein"(no), "Ja"(yes) . The "Alle" was default. The page shows all 75 rows after loaded.

I want to have "Ja" as default and to show the 73 rows with "Ja". So I added OnLoad="cboFilterFormActive_Load" in the RadComboBox and a C# method cboFilterFormActive_Load(...).

The aspx code now is like:

<telerik:RadGrid ID="radGridForms" runat="server"
                 DataSourceID="SqlDataSource_Grid" AllowSorting="true" AllowPaging="true" PageSize="10" AllowFilteringByColumn="true"
                 OnDataBound="radGridForms_DataBound">
    <MasterTableView AutoGenerateColumns="false" AllowMultiColumnSorting="true">
        <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
        <Columns>
            <telerik:GridTemplateColumn DataField="FormKey" UniqueName="FormKey">
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="visible" HeaderText="aktiv" UniqueName="FormActive">
                <FilterTemplate>
                    <telerik:RadComboBox ID="cboFilterFormActive" runat="server" RenderMode="Lightweight"
                                         Skin="Bootstrap" Width="100%" ToolTip="Filter Formular aktiv"
                                         DataSourceID="SqlDataSource_FilterFormActive" DataTextField="visible" DataValueField="visible"
                                         AppendDataBoundItems="false"
                                         SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("FormActive").CurrentFilterValue %>'   
                                         OnClientSelectedIndexChanged="visibleComboIndexChanged"
                                         OnItemDataBound="cboFilterFormActive_ItemDataBound"
                                         OnLoad="cboFilterFormActive_Load">
                    </telerik:RadComboBox>
                    <telerik:RadScriptBlock ID="RadScriptBlockFilterVisible" runat="server">
                        <script type="text/javascript">
                            function visibleComboIndexChanged(sender, args) {
                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                tableView.filter("FormActive", args.get_item().get_value(), "EqualTo");
                            }
                        </script>
                    </telerik:RadScriptBlock>
                </FilterTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblFormVisible" runat="server" Text='<%# translateBool(Eval("visible")) %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
        <PagerStyle Position="TopAndBottom" AlwaysVisible="true" />
    </MasterTableView>
    <SortingSettings SortedBackColor="#EDEDED" EnableSkinSortStyles="false"></SortingSettings>
    <FilterMenu Skin="Bootstrap" EnableEmbeddedSkins="false" RenderMode="Lightweight"></FilterMenu>
</telerik:RadGrid>

 

a new mothod in aspx.cs:

        protected void cboFilterFormActive_Load(object sender, EventArgs e)
        {
            var combo = (RadComboBox)sender;
            RadComboBoxItem itm = combo.FindItemByText("Ja");
            if (itm !=null)
                itm.Selected = true;
        }

 

The "Ja" is now default in the Combobox. But it doesn't filter. All the 75 values are shown after loading page. How can I make it filter "Ja" out?

Uli
Top achievements
Rank 1
Veteran
 answered on 28 Aug 2020
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?