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

I have taken the template demo whichuses an icon on the Tab to handle Tab deletions. On the face of it this seems to work perfectly as the Tabs disappear as expected. But, strange things start happening if you start dynamically adding new tabs.

I have a menu (actually a Toolbar) that when an option is selected it dynamically creates a new tab and page view. Now this works without any problem whatsoever. I have also used the template Tabstrip example to allow the Tab to be removed by displaying the red cross on the tab. That to works - click the cross and the tab disappears.

However, If I add say 4 tabs and then delete 2 I am left with 2 (correct) BUT if I now add another Tab the 2 Tabs that were deleted reappear! In fact, if you trace through the code you see straight away when adding the last Tab that the item count is 4 when it should be 2.

Can anyone explain this? Look, I'm no expert on Client side versus server side by any stretch of the imagination but it looks like there may be something there. The delete is taking place client side and the insert on the server side.

Also, I have a Skin Chooser in the toolbar and the moment I select a new skin the page is refreshed and all the deleted Tabs reappear!
I'm trying to create a BI reporting system and it would be really nice to allow the user to open multiple reports or dashboards in a Tab like fashion. This means they can switch between 2 reports easily and not have toopen multiple sessions.

I have also looked at the Windows control which is really nice but might have some limitations.

Thanks

Campbell
Nencho
Telerik team
 answered on 25 Feb 2013
7 answers
460 views
I have a RadGrid popping up a UserControl for Edit and Insert which works great, except that I need to do some server side validation on the UserControl prior to having it disappear and the InsertCommand event firing.

Problem is, when I implement code in the btnOk_Click event it seems to screw things up.

Can anyone point me in the right direction on this one?

Thanks.
mathieu cupryk
Top achievements
Rank 1
 answered on 25 Feb 2013
3 answers
186 views

set_cancel(true); does not cancel  ClientContextMenuShowing event.
Right click on the Node4 still shows default RadTreeView menu that has "Open", "Open in New Tab", etc
Also all the nodes of RadTreeView are created dynamically by loading XML.
Telerik.Web.UI.dll  version is 2010.2.713.35

MyPage.aspx  has

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="MyPage.aspx.vb" MasterPageFile="~/MyBase.master" Inherits="MyNamespace.MyPage" %>
<script type="text/javascript">
function ClientContextMenuShowing(sender, eventArgs) {
        var node = eventArgs.get_node();
       
        if ((node.get_text() == "Node4")) {
            eventArgs.set_cancel(true);    // default context menu still displays
            alert("After set_cancel for " + node.get_text());  // displayed
        }
    }
</script>
<AjaxSettings>
   <telerik:AjaxSetting AjaxControlID="Timer1">
      <UpdatedControls>
         <telerik:AjaxUpdatedControl ControlID="menu1" />
      </UpdatedControls>
   </telerik:AjaxSetting>
<asp:timer id="Timer1" runat="server" interval="300000">
</asp:timer>

MyBase.master  has
<td width="100%" valign="top">
   <div id="Div1" style="display:none;">
      <telerik:RadTreeView ID="menu1" EnableEmbeddedSkins="false" runat="server" Width="220px" ShowLineImages="false"    style="display:inline-block; overflow: hidden">                                                   
      </telerik:RadTreeView>
   </div>
</td>

MyPage.aspx.vb  has
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
   If Not Page.IsPostBack Then
      Timer1Tick(sender, e)
   End If
End Sub

Protected Sub Timer1Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
      LoadMyMenu()
End Sub

Private Sub LoadMyMenu()
      Dim objMenu As Telerik.Web.UI.RadTreeView = CType(m.GetMasterMenu(), Telerik.Web.UI.RadTreeView)
      Dim objUIService As New UIService(objUserSession)
      Dim objMenuData = objUIService.GetMenus(0)
      Dim XMLMenuItem = objMenuData.Item(0)
      objMenu.LoadXml(XMLMenuItem.XMLMenu.ToString)
      objMenu.Width = "220

   ‘This line works:      objMenu.Nodes.FindNodeByText("Node1").Nodes.FindNodeByText("Node2").Nodes.FindNodeByText("Node3").Nodes.FindNo   deByText("Node4").Text = "Node4”

‘This line does Not cancel default context menu:
objMenu.Nodes.FindNodeByText("Node1").Nodes.FindNodeByText("Node2").Nodes.FindNodeByText("Node3").Nodes.FindNodeByText("Node4"). EnableContextMenu = False
‘This, together with ClientContextMenuShowing() java script function ()se above does Not cancel default context menu also:
objMenu.OnClientContextMenuShowing = "ClientContextMenuShowing"

End Sub

So, how to cancel default context menu in my case for a particular node or set of nodes. Thank you

 

Marina
Top achievements
Rank 1
 answered on 25 Feb 2013
4 answers
196 views

Menu is dinamically created in code behind:

Dim objMenu As Telerik.Web.UI.RadTreeView = CType(m.GetMasterMenu(), Telerik.Web.UI.RadTreeView)
Dim objUIService As New UIService(objUserSession)
Dim objMenuData = objUIService.GetMenus(0)
Dim XMLMenuItem = objMenuData.Item(0)
objMenu.LoadXml(XMLMenuItem.XMLMenu.ToString)
objMenu.Width = "220"

It creates following nodes on the page:

Node 1
     Node2
          Node3
               Node4

Pointing to Node4, then clicking right mouse button displays menu with the following items :
"Open", "Open in New Tab","Open in New Window", "Save Target As", etc.

How to Not-show that menu on the right mouse button click on Node4 ?

Thank you

Marina
Top achievements
Rank 1
 answered on 25 Feb 2013
9 answers
423 views
Hi, I have a master (RadGridLOC) and detail grid (RadGridDetail) . In the detail grid, I provide a gridbutton to allow user to delete that row which is done in code behind using a stored procedure to do the update in the database. After the row is deleted, I would like the detail grid to reflect that (that is, the grid should refresh and not display the row just deleted) and also the master grid should also refresh since a status in the master grid gets updated and should show as such.Please tell me how I can achieve this. 
Thanks.
<telerik:GridButtonColumn ConfirmText="Unassign this contract?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Unassign" ButtonType="ImageButton" CommandName="Delete" Text="Unassign"
                    UniqueName="UnassignColumn">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                </telerik:GridButtonColumn>

protected void RadGridDetail_DeleteCommand(object source, GridCommandEventArgs e)
        {       
 
            //Get the GridDataItem of the RadGrid   
            GridDataItem item = (GridDataItem)e.Item;
            //Get the primary key value using the DataKeyValue.
            int locNbr = Convert.ToInt32(RadGridLOC.SelectedValues["in_loc"].ToString());
            int locYr = Convert.ToInt32(RadGridLOC.SelectedValues["y_loc"].ToString());
            int locVer = Convert.ToInt32(RadGridLOC.SelectedValues["in_loc_version"].ToString());
            string CntNbr = item.OwnerTableView.DataKeyValues[item.ItemIndex]["ic_contract"].ToString();
            int UwYr = Int32.Parse(item.OwnerTableView.DataKeyValues[item.ItemIndex]["y_underwriting"].ToString());
            OleDbConnection dbCon = new OleDbConnection(rootWebConfig.ConnectionStrings.ConnectionStrings["ConnectionString"].ToString());
            try
            {               
                dbCon.Open();
                OleDbCommand cmd = new OleDbCommand("sp_gloc_detail_del_1", dbCon);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add("@in_loc", OleDbType.Integer).Value = locNbr;
                cmd.Parameters.Add("@y_loc", OleDbType.Integer).Value = locYr;
                cmd.Parameters.Add("@in_loc_version", OleDbType.Integer).Value = locVer;
                cmd.Parameters.Add("@ic_contract", OleDbType.Char, 11).Value = CntNbr;
                cmd.Parameters.Add("@y_underwriting", OleDbType.Integer).Value = UwYr;
                cmd.Parameters.Add("@ic_user", OleDbType.Char).Value = Session["GRSUserID"];
                cmd.Parameters.Add("@f_mode", OleDbType.Integer).Value = Session["AuthMode"];
                cmd.ExecuteNonQuery();
 
                RadGridLOC.Rebind();
                //RadGridLOC.MasterTableView.Items[0].Selected = true;
                 
                //RadGridLOC.SelectedIndexes.Add(0);    
                 
                RadGridDetail.SelectedIndexes.Add(0);
                 
                 
                                 
            }
            catch (OleDbException ex)
            {                
                ScriptManager.RegisterStartupScript(this, typeof(string), "Error", "alert('Unable to unassign contract. Please contact System Administrator.');", true);
                LogErrorClass errclass = new LogErrorClass();
                int i = errclass.LogErrorMsg("Error", ex.Message, ex.StackTrace.ToString(), Session["GRSUserID"].ToString());               
                e.Canceled = true;
            }
            finally
            {
                dbCon.Close();               
            }
        }






Sharon
Top achievements
Rank 1
 answered on 25 Feb 2013
3 answers
48 views

Hello
I'am usign a RadGrid also i'am using a RadAjaxLoadingPanel its works great
but when i set the property AllowFilteringByColumn to true dosent work with RadAjaxLoadingPanel, if i remove the RadAjaxLoadinPanel it's work,

any suggesting of the cause of this issue?

Greats....
Kostadin
Telerik team
 answered on 25 Feb 2013
3 answers
150 views
Hi
while exporting to excel using exporttoexcel command is throwing below error.

internet explorer can't download Filename from the sitename alert box is coming if prefix contains https://.   but for  http:// it's exporting fine

in case of other browser it's not giving ant error..

how do i rectify this issue ,it's very very urgent..


Thanks
San





Daniel
Telerik team
 answered on 25 Feb 2013
1 answer
105 views
Hi All,

I want to have a different skin for the Pager than the rest of the RadGrid. I can't find a way to set it using the properties of the RadGrid, and if I try to set it in the itemcreated or itemdatabound events I'm told that it can only be set in or before the Page_PreInit.

Any help would be appreciated on the right way to go about this.

Thanks.
- Will
Eyup
Telerik team
 answered on 25 Feb 2013
3 answers
406 views
Background info: when user upload a file the file is save to a folder on a shared network drive. I'm using the RadAsyncUpload and I'm getting an error when i'm impersonating an acct that have access to the folder.

Error on this line :  FileUpload_File.UploadedFiles.Item(0).SaveAs(FullFilePathName)


Error Msg: Access to the path is denied

Stack: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.__Error.WinIOError() at System.IO.File.Move(String sourceFileName, String destFileName) at Telerik.Web.UI.AsyncUploadedFile.SaveAs(String fileName, Boolean overwrite) at Telerik.Web.UI.UploadedFile.SaveAs(String fileName) at xDefault.SaveFile()

I'm only getting this error when i'm impersonating

anyone have any idea why i'm having this issue?

Hristo Valyavicharski
Telerik team
 answered on 25 Feb 2013
3 answers
222 views

Controls: RadEditor, RadTextBox. Version: 2012.3.1120.40

Device, o/s, browser. Ipad ios6 safari
Issue:
Using these controls:
-Enter some text 'hello world', press and hold for magnifying glass, move between words. Typing more text at this point doesn't work, you need to hide the keyboard and press the control again to start typing again.
-Tap a word. wait for pop up to select word then Select word. same issue again.
-Entering text just into the RadEditor appears quite slow in response


RadEditor.
<telerik:RadEditor runat='server' EnableResize="false" ToolsFile="~/ToolsFile.xml"
   OnClientCommandExecuting="RichTextBoxOnClientCommandExecuting" ContentAreaMode="Div"
   ID='radEditor' Width="400px" StripFormattingOptions="AllExceptNewLines" EditModes="All">

Frames
<frameset cols = '100,*,100' id="DashboardFrame" >
    <frame name='left' scrolling='auto' id='DashboardFrameLeft' src='MenuJobSteps.asp' width='0'>
    <frame name='middle' scrolling='auto'  id='DashboardFrameMiddle' src='Test.aspx?JobId=79974' width='0' >
    <frame name='right' scrolling='auto' id='DashboardFrameRight' src='TitlePage.asp' width='0'>
 <noframes>
Marin
Telerik team
 answered on 25 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?