Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
132 views
I've got a form with the two RadGrids, each one within a RadDock.

If I open a window from a RadDock Command, and then handle the onClientClose event as per the script below the script runs OK and the RadGridFlightMeals rebinds and displays correctly.  However if I try to then Rebind RadGridFlightSeats by calling RadGridRebindFlightSeats() from within CloseRadWindowCreateFlightMeal() this says the object is null and cannot be found.

I've tried calling seperately as per above and also including the find and rebind options within a single script but neither works.

However if I call RadGridRebindFlightSeats() from server side using...

 

 

 

 

RadScriptManager.RegisterStartupScript(this, this.GetType(), "RadGridRebindFlightSeats", "RadGridRebindFlightSeats();", true);

...

when not closing a radwindow but from another command button on the dock header the script works OK...???


<telerik:RadWindow runat="server"  ID="RadWindowCreateFlight" InitialBehaviors="None" 
                NavigateUrl="~/Dialogs/CreateFlight.aspx" ReloadOnShow="true" Animation="None" OnClientClose="CloseRadWindowCreateFlight"
                Height="550px" Modal="true" Title="Create Flight" Width="700px" Behaviors="Close, Move" Enabled="True" 
                VisibleStatusbar="False" IconUrl="~/favicon.ico" KeepInScreenBounds="True" ShowContentDuringLoad="False">
            </telerik:RadWindow>


 

 

 

 

 

function CloseRadWindowCreateFlightMeal() {
  
            var action = get_cookie("ACTION");
            delete_cookie("ACTION");
  
            if (action == "FLIGHT MEAL CREATED") {
                var tabStrip = $find("ctl00_contentBody_tabStripEvent");
                var tab = tabStrip.findTabByText('Flights');
                tab.set_selected(true); //The same as tab.select();
  
                var multiPage = $find("ctl00_contentBody_multiPageEvent");
                var pageView = multiPage.findPageViewByID("ctl00_contentBody_pageFlights");
                pageView.set_selected(true);
  
                var masterTable = $find("ctl00_contentBody_RadDockFlightMeals_C_RadGridFlightMeals").get_masterTableView();
                masterTable.rebind();
            }
  
            return false;
        }
                  
  
        function RadGridRebindFlightSeats() {
            var masterTable = $find("ctl00_contentBody_RadDockFlightSeats_C_RadGridFlightSeats").get_masterTableView();
            masterTable.rebind(); 
            return false;
        }

 

Cliff Gibson
Top achievements
Rank 1
 answered on 10 Aug 2010
1 answer
82 views

I would like to add grouping to my Grid.

I want 3 horizontal sections in my grid. At the beginning of Each section I would like to specifically Add Group Header.

I want paging separate to group Level ( Not to Grid level)

EditForm for Each group will be opening a same user control.

How do I do this?

Thanks

Maria Ilieva
Telerik team
 answered on 10 Aug 2010
3 answers
347 views

Hi,

I want my TreeView to remove a marked post when I've confirmed it from a button located in a modal popup.

Scenario:

1. TreeView is populated from DB.

2. Right click on some item.

3. Choose delete.

4. Modal popup appears asking if you're sure you want to delete the selected node.

5. If no, just close the popup. If yes, delete it from DB and refresh tree.

The problem is that it has to rerender the tree to show the changes. Is it possible to use the .Remove() function from a asp:button? If so, can I also use the add and rename functions?

Code for TreeView:

01.Protected Sub tree_ContextMenuItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeViewContextMenuEventArgs) Handles tree.ContextMenuItemClick
02.    Dim node As RadTreeNode = e.Node
03.    Dim item As RadMenuItem = e.MenuItem
04.    Dim menu As RadMenu = item.Menu
05.    Dim value As String = item.Value
06. 
07.    Dim r As New Regex("\d*:"
08.    Dim strName As String = node.Text
09.    Select Case value
10.        Case "3" 'delete
11.            hdfNode.Value = node.Value
12.            If (r.IsMatch(strName)) Then
13.                lblConfirmDelete.Text = strName.Substring(strName.IndexOf(": ") + 2).Replace("*", "")
14.            Else
15.                lblConfirmDelete.Text = strName.Replace("*", "")
16.            End If
17.            mpeNodeDelete.Show()
18.            Exit Select
19.    End Select
20.End Sub

Code for button:

1.Protected Sub btnNodeDelete_ok_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnNodeDelete_ok.Click
2.    Try
3.    wrkTree.DeleteNode(hdfNode.Value.ToString())
4.    Catch ex As Exception
5.        lblMess.Text = ErrorHandler.ExceptionTranslation(ex)
6.    End Try
7.    setuptree()
8.End Sub

Yana
Telerik team
 answered on 10 Aug 2010
1 answer
156 views
I have a GridBoundColumn with this property
DataFormatString="{0:dd-MMM-yyyy hh:mm:ss tt}"

This works nicely...BUT...I have an application setting variable with this so if the format changes I don't have to change it in a million places.  It is this variable:
MyWeb.Properties.Settings.Default.DateFormatString

NOT in the codebehind...Is there any way to replace the string with a server variable or something in the aspx?  Maybe some <%= %> or eval or other method?
Mira
Telerik team
 answered on 10 Aug 2010
1 answer
107 views
Hello,

my Version:
Telerik ASP.NET AJAX v.2010.1.415.35

so i haven´t a property named EnableMarkMatches like in this demo
http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/keyboardsupport/defaultcs.aspx

so i can´t build the higlighting with "starts with" method.

also the property header/footertemplate is missed.

what is wrong?
Yana
Telerik team
 answered on 10 Aug 2010
1 answer
137 views
Hi,

I have 2 panels in an aspx page.
Panel1 - has 1 radiobuttonlist with Yes and No as options
Panel 2 - has 2 textboxes.

I want when Yes from radiobuttonlist is selected - the panel 2 to be displayed and the same to be hdden with No is selected.

The following the code i am using in aspx page:

<telerik:RadAjaxManager ID="RadAjaxManager2" runat="server">
    <AjaxSettings>     
      </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="pnlRadioButtons">
        <UpdatedControls>
          <telerik:AjaxUpdatedControl ControlID="pnlRadioButtons" />
        </UpdatedControls>
      </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="pnlMiddleData">
        <UpdatedControls>
          <telerik:AjaxUpdatedControl ControlID="pnlMiddleData" />
        </UpdatedControls>
      </telerik:AjaxSetting>
    </AjaxSettings>
  </telerik:RadAjaxManager>


The following is the C# code:

protected void RadBtnSystemUser_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (RadBtnSystemUser.SelectedValue.ToString() == "1")
        {
            pnlMiddleData.Visible = true;
            reqFldUserId.Enabled = true;
        }
        else
        {
            pnlMiddleData.Visible = false;
            reqFldUserId.Enabled = false;
        }
    }

This throws an error saying that since are in 2 seperate update panels an error occured.

Is this possible?
Please help.

--
Regards,
Debashis
Maria Ilieva
Telerik team
 answered on 10 Aug 2010
1 answer
158 views
Hi,

I want to change or modify the default CSS - WebBllue for Radgrid. Can I know how to achieve the same?

Thanks
-Phani
Princy
Top achievements
Rank 2
 answered on 10 Aug 2010
2 answers
140 views
I've been trying to have my sliding zone load with the Tab hidden.  This is proving difficult.  I have tried putting javascript in the page to run when the page is rendered.  That throws an error though, even when I put the script at the end of the page it runs before the controls are rendered on the page and throws a script error.  This also happens when I register client script block at the end of the pageload server side.

The one thing that come the closest to working is calling the javascript in the OnClientLoad event of the RadSplitter.  However, this throws a javascript error which I will note below.  Everything works, everything, but I cannot have a javascript error on my page for the end user.

The Error is 'Object doesn't support this property or method.'

The debugger shows the error at this code in the page:
getHandler:function(b){var a=this._getEvent(b);if(!a||a.length===0)return null;a=Array.clone(a);return function(c,d){for(var b=0,e=a.length;b<e;b++)a[b](c,d)}}

the highlighted error is at the end on

a

 

[b](c,d)

Clearly this is not being thrown in the javascript I am using.  Here is the code I am using.

 

<telerik:RadSplitter 
   ID="RadSplitter2" 
   runat="server" 
   Height="82px" 
   Width="100%"
   Orientation="Horizontal"
   VisibleDuringInit="false" 
   Skin="EPSS" 
   EnableEmbeddedSkins="false" 
   OnClientLoad="javascript:TogglePaneTabVisibility('<%=SlidingPane.ClientID %>')"
>

function TogglePaneTabVisibility(panelid)
      {
            var slidingZone = $find("<%=szCR.ClientID %>"); 
            var pane = slidingZone.getPaneById("<%=SlidingPane.ClientID %>"); 
              
          if (pane.isTabDisplayed())
           {
                pane.hideTab();
            }
            else
            {
                pane.showTab();
           }
      }


Any help is greatly appreciated.

Adam Heeg
Top achievements
Rank 1
 answered on 10 Aug 2010
1 answer
114 views
This is very weird.  I've got a RadTextBox that I am loading with text for client-side editing, then submitting the edited text to a database with a Callback.  This works exactly once.

After the first Callback, when I use the exact same javascript function call to re-load the RadTextBox with text to edit, no text appears.  However, there's no javascript error either.  And the rendered HTML in the browser that defines the RadTextBox is exactly the same both before and after the Callback.

When I click submit to do a second Callback, whatever I have typed into the RadTextBox is ignored, and the value passed to the Callback is whatever was typed in the RadTextBox the first time around.  It is as if, upon Callback, a new RadTextBox is being displayed which is visible to the browser, but not to the DOM.  And meanwhile the old RadTextBox is still visible to the DOM, but invisible to the browser.

What the heck is going on?

Thanks,

Jesse
Maria Ilieva
Telerik team
 answered on 10 Aug 2010
1 answer
102 views
Hi

I have problem in radeditor content background, the Editor is taking background color as my webpage background color. For this how can i solve please find attached file and let me know

Aspx Code:

<telerik:RadEditor ID="RadEditor1" ImageManager-EnableImageEditor="false" BackColor ="White" runat="server" EnableEmbeddedSkins="true" Width="97%"  AllowScripts="true" ContentFilters="none">
            <Content></content>
</telerik:RadEditor>   


Thanks
Rajiv
Princy
Top achievements
Rank 2
 answered on 10 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?