Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
136 views
Adding the groupfooter and calculating a total for a column was pretty easy, but how can I format the output so that it shows something besides "Sum: 9999"?
Shawn Clabough
Top achievements
Rank 1
 answered on 20 Dec 2011
6 answers
217 views
I have a radmenu that I generate by examing sharepoint document library folders and building out a submenu structure based on the folder.
When I put many of the control on the page, the root menu from other controls shows up over the sub menu of the control.
Does anyone know how to prevent it, by altering programatically assigning the style for the z index to the sub menus?
See the attached file for a better understanding of the problem. The text was sanitized for public consumption.


Edit:
Additional Information: When rolling over the menu and the subitems menu shows it does properly cover the other menus and they do not show through. However when rolling over it a 2nd time it definitely shows through, as though its z index is larger.

These controls are each in their own webparts, does that matter? Maybe they're inheriting z-index?

Edit: more info: the effect only occurs in IE, didn't occur in chrome or mozilla firefox

My ascx: (customItem is the submenu), these classes are applied programmatically in code
<style type="text/css">
    .CustomItem
    {
         z-index:99999;
    }
     
    .rootItem
    {
        text-align:center !important;
        text-decoration:none !important;
        z-index:-1;
    }
    .CustomItem:hover
    {
     text-decoration:none !important;  
     
    }
</style>
<div id="section" runat="server" >
<telerik:RadMenu ID="FolderMenu" runat="server">
</telerik:RadMenu>

Ivan Zhekov
Telerik team
 answered on 20 Dec 2011
3 answers
141 views
  <MasterTableView DataKeyNames="ID" CommandItemDisplay="TopAndBottom"  EditMode="PopUp" DataSourceID="DS1">


Hi,

I was using the above code for editing data with a pop-up.
My edit is working fine...but the add button...which appears when I Give Commanditemdisplay is not l working..It says the specific cast is Invalid...once I remove the date fields then i get the add button working...


My data field:

   <telerik:GridBoundColumn UniqueName="TechnicalDateofEntry" HeaderText="TechnicalDateofEntry" DataField="TechnicalDateofEntry" DataFormatString="{0:d}">


Edit template:
                            <td>
                               DateofEntry  
                            </td>
                            <td>
                                <telerik:RadDatePicker ID="TextBox17" runat="server"  SelectedDate='<%# Bind( "TechnicalDateofEntry") %>'>
                                </telerik:RadDatePicker>
                            </td>
                 
 <InsertParameters>
                  
                    <asp:Parameter Name="TechnicalDateofEntry" Type="DateTime" />
                   
                                       
                </InsertParameters>


.I have the attached error...plz let me know wats causing this issue..Am i missing casting anywhere...all I declared is date time..


Thanks a lot..
S
Top achievements
Rank 1
 answered on 20 Dec 2011
1 answer
144 views
Hi,


Can some please help me in getting date from database table column..ASAP..

 <MasterTableView DataKeyNames="ID" CommandItemDisplay="TopAndBottom"  EditMode="PopUp" DataSourceID="DS1">

I was using the above code for editing data with a pop-up.
My edit is working fine...but the add button... is not l working..It says the specific cast is Invalid...once I remove the date fields then i get the add button working...

My field:
   <telerik:GridBoundColumn UniqueName="TechnicalDateofEntry" HeaderText="TechnicalDateofEntry" DataField="TechnicalDateofEntry" DataFormatString="{0:d}">

Edit template:
                            <td>
                               DateofEntry  
                            </td>
                            <td>
                                <telerik:RadDatePicker ID="TextBox17" runat="server"  SelectedDate='<%# Bind( "TechnicalDateofEntry") %>'>
                                </telerik:RadDatePicker>
                            </td>
                 
 <InsertParameters>
                  
                    <asp:Parameter Name="TechnicalDateofEntry" Type="DateTime" />
                   
                                       
                </InsertParameters>


.I have the attached error...plz let me know wats causing this issue..Am i missing casting anywhere...all I declared is date time..

I was update the records with out any casting...Why is it asking cast for inserting the data...????


followed the below article:


http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/templateformupdate/defaultcs.aspx  

please advise
Thanks a lot..  


            
S
Top achievements
Rank 1
 answered on 20 Dec 2011
3 answers
111 views
Hi
I have grid control on my page

<

 

 

Rad:RadGrid Width="100%" Height="100%" EnableAJAX="true" ID="grdDispatchedStaff" style="border:0;" runat="server" AllowPaging="False" AllowSorting="True"

 

 

 

AllowMultiRowSelection="false" AutoGenerateColumns="false"

 

 

 

OnNeedDataSource ="GridDispatchedStaffNeedDataSource" >

 

 

 

<MasterTableView DataKeyNames="DispatchAssignmentGUID" ClientDataKeyNames="DispatchAssignmentGUID" AllowNaturalSort="false" TableLayout="Fixed" >

 

 

 

<HeaderStyle Height="18px" Font-Names="Tahoma" Font-Size="7pt" Font-Bold="true"/>

 

 

 

<ItemStyle CssClass="RowModified" />

 

 

 

<AlternatingItemStyle CssClass="RowModified" />

 

 

 

<Columns>

 

 

 

<Rad:GridBoundColumn UniqueName="DispatchAssignmentGUID" SortExpression="DispatchAssignmentGUID" HeaderText="DispatchAssignmentGUID" DataField="DispatchAssignmentGUID" Visible="false" />

 

 

 

<Rad:GridBoundColumn UniqueName="FullName" SortExpression="FullName" HeaderStyle-Width="8%" HeaderText="Name" DataField="FullName" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="RadioID" SortExpression="RadioID" HeaderStyle-Width="8%" HeaderText="Radio ID" DataField="RadioID" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="CallSign" SortExpression="CallSign" HeaderStyle-Width="8%" HeaderText="Call Sign" DataField="CallSign" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ReferenceID" SortExpression="ReferenceID" HeaderStyle-Width="8%" HeaderText="Ref. ID" DataField="ReferenceID" DataFormatString="{0:d}"/>

 

 

 

<Rad:GridBoundColumn UniqueName="DispatchRole" SortExpression="DispatchRole" HeaderStyle-Width="7%" HeaderText="Role" DataField="DispatchRole" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="DispatchTime" SortExpression="DispatchTime" HeaderStyle-Width="11%" HeaderText="Dispatch Time" DataField="DispatchTime" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ETA" SortExpression="ETA" HeaderStyle-Width="11%" HeaderText="ETA" DataField="ETA" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ArrivalTime" SortExpression="ArrivalTime" HeaderStyle-Width="11%" HeaderText="Arrival Time" DataField="ArrivalTime" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ArrivalCode" SortExpression="ArrivalCode" HeaderStyle-Width="9%" HeaderText="Arrival Code" DataField="ArrivalCode" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ClearTime" SortExpression="ClearTime" HeaderStyle-Width="11%" HeaderText="Clear Time" DataField="ClearTime" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ClearCode" SortExpression="ClearCode" HeaderStyle-Width="8%" HeaderText="Clear Code" DataField="ClearCode" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<ClientSettings AllowDragToGroup="False">

 

 

 

<Resizing AllowColumnResize="True" EnableRealTimeResize="true" AllowResizeToFit="true"></Resizing>

 

 

 

<Selecting AllowRowSelect="true" />

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" ScrollHeight="100%"></Scrolling>

 

 

 

<ClientEvents OnRowContextMenu="RowContextMenu" OnRowDblClick="GridDblClick" OnRowClick="GridRowClick"></ClientEvents>

 

 

 

</ClientSettings>

 

</

 

 

Rad:RadGrid>

 


and event handler in code behind

 

 

protected void GridDispatchedStaffNeedDataSource(object sender, GridNeedDataSourceEventArgs e)

 

{

 

 

this.LoadGrid();

 

}


where

 

 

private void LoadGrid()

 

{

 

 

this.grdDispatchedStaff.DataSource = this.DataSource.DispatchAssignment;

 

}


this.DataSource is using DataSet from Session.

I have updated DataSet by adding another row and want to Rebuind Grid. The doc says I can't user bind or rebind with OnNeedDataSource. How can I refresh Grid on the page if data sourcer was changed.
Thanks.
Vladimir



Vladimir
Top achievements
Rank 1
 answered on 20 Dec 2011
4 answers
133 views
Hi,

on my web part there are some comboboxes. The comboboxes are defined in code behind (google like filtering for RadGrid).
_filterbox.EnableLoadOnDemand = true;
_filterbox.AutoPostBack = true;

When I'm clicking into a combobox and leave it without doing a selection or entering text, a postback will be rised. Why?
How can I prevent this?

I'm using the newest Telerik verion.

regards,
Ralf


Ralf
Top achievements
Rank 1
 answered on 20 Dec 2011
7 answers
251 views

Having a little trouble trying to create a dynamic button - if I add an image URL I simply get my image...

tbBtn = New RadToolBarButton
tbBtn.ImageUrl = "trans.gif"
rfeMediaManager.ToolBar.Items.Add(tbBtn)
 

As soon as I add a text value a default telerik refresh image appears...?

tbBtn = New RadToolBarButton
tbBtn.ImageUrl = "trans.gif"   
tbBtn.Text = "Standard Mode"
rfeMediaManager.ToolBar.Items.Add(tbBtn)

How can I have only my own image and text?

Ashok
Top achievements
Rank 1
 answered on 20 Dec 2011
2 answers
96 views
I have the following problem, I have this code:

<telerik:RadSplitter ID="Radsplitter5" runat="server" Height="655px" Width="100%"
            Skin="Office2010Black">
        <telerik:RadPane ID="Radpane9" runat="server" Width="215px" Scrolling="None">
           <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="FullExpandedItem"
           Skin="Office2010Black" Height="655px" Width="100%">
            <Items>
                <telerik:RadPanelItem Text="Moviles" Expanded="true" >
                    <Items>
                        <telerik:RadPanelItem Value="Moviles">
                            <ItemTemplate>
                            <asp:Panel ID="Panel1" runat="server" Height="445px" ScrollBars="Vertical">
                               <telerik:RadTreeView ID="TreeView1" CheckBoxes="true" Runat="server" TriStateCheckBoxes="true" CheckChildNodes="true" OnLoad="OnTreeLoad" OnClientContextMenuItemClicking="onClientContextMenuItemClicking"
                OnClientContextMenuShowing="onClientContextMenuShowing" OnClientNodeClicking="onNodeClicking" OnClientNodeChecked="ClientNodeChecked" Font-Size="Smaller">
                                <ContextMenus>
                    <telerik:RadTreeViewContextMenu ID="MainContextMenu" runat="server">
                        <Items>
                            <telerik:RadMenuItem Value="UltimasPosiciones" Text="Ultimas Posiciones">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem Value="LimpiarPosiciones" Text="Limpiar Posiciones" Visible="false">
                            </telerik:RadMenuItem>
                        </Items>
                        <CollapseAnimation Type="none" />
                    </telerik:RadTreeViewContextMenu>
                </ContextMenus>
    </telerik:RadTreeView></asp:Panel>


I need to know how to access the treeview using javascript.
Use this, and nothing:

var tree = $find('<%=RadPanelBar1.Items[0].FindControl("Treeview1").ClientID %>');

I do not know how, thank you very much beforehand.

Greetings.
mauricio
Top achievements
Rank 1
 answered on 20 Dec 2011
1 answer
122 views
I've just installed the controls and I'm not able to select a skin other than the default skin for RadGrid. I have added the dlls to my bin folder design, UI, UISkins, and XML. Is there another setup I have to do?
Celeste
Top achievements
Rank 1
 answered on 20 Dec 2011
3 answers
110 views
Hi,

I have a situation where I need to add usercontrols dynamically & in those usercontrols add RadDocks dynamically which itself contains usercontrol.

Following is the code I am using to add RadDocks in parent usercontrol

in .ascx
<telerik:RadDockLayout runat="server" ID="QuestionsDockLayout">
                   <telerik:RadDockZone ID="RadDockZone1" runat="server"/>
                      </telerik:RadDockLayout>
 
in .ascx.cs
private bool _shouldSavesState = false;
 
      protected void Page_Init(object sender, EventArgs e)
      {
          QuestionsDockLayout.SaveDockLayout += QuestionsDockLayout_SaveDockLayout;       
 
              LoadQuestions();
      }
 
      private void LoadQuestions()
      {
 
          foreach (var zone in QuestionsDockLayout.RegisteredZones)
          {
              zone.Docks.Clear();
              zone.Controls.Clear();
          }
 
          if (!string.IsNullOrEmpty(XmlNode_Page))
          {
              XmlDocument xmldoc_page = new XmlDocument();
 
              xmldoc_page.Load(new StringReader(XmlNode_Page));
 
              
              XmlNodeList nodePages = xmldoc_page.SelectNodes("//Question");
 
              if (nodePages != null && nodePages.Count > 0)
              {
                  for (int i = 0; i < nodePages.Count; i++)
                  {
                      RadDock radDock = new RadDock();
                      radDock.ID = "dockPanel_" + this.ID + "_Q" + i;
                       
                     radDock.AutoPostBack = true;
                       
                      radDock.Resizable = false;
                      radDock.DockMode = DockMode.Docked;                     
                      radDock.DockHandle = DockHandle.None;
                      radDock.OnClientInitialize = "SetHandleDock";
                      QuestionsDockLayout.RegisteredZones[0].Controls.Add(radDock);
 
                      XmlNode XnodeQuestion = nodePages[i];
                      UC_SurveyQuestion SQ = (UC_SurveyQuestion)LoadControl("~/UserControls/UC_SurveyQuestion.ascx");
                      SQ.ID = XnodeQuestion.Attributes["id"].Value;
                      SQ.XmlNode_Question = XnodeQuestion.OuterXml;
                      SQ.Page_ID = this.ID;
 
                      HtmlImage img = SQ.FindControl("Handle") as HtmlImage;
                      img.ClientIDMode = System.Web.UI.ClientIDMode.Static;
                      img.ID = "Handle_" + radDock.ClientID;
 
                      radDock.ContentTemplate = new CompiledTemplateBuilder(parent =>
                      parent.Controls.Add(SQ)
                          );
 
                      radDock.DockPositionChanged += dock_DockPositionChanged;
                      
                       
                  }
              }
             
          
      }
 
    
      private void dock_DockPositionChanged(object sender, DockPositionChangedEventArgs e)
      {
          //if dock position was changed set a flag for saving dock state
          _shouldSavesState = true;
      }
 
      private void QuestionsDockLayout_SaveDockLayout(object sender, DockLayoutEventArgs e)
      {
          //Save dock panels state in user's profile
          if (_shouldSavesState)
          {
              List<DockState> lst = QuestionsDockLayout.GetRegisteredDocksState();
          }
      }


Now the problem is when I change the positions of RadDock Panels changes to state doesn't persist.
In SaveDockLayout event GetRegisteredDockState method returns the same state of docks as when they are added.

I am not using LoadDockLayout event as indices of RadDocks are same as they are added.

I must be making some silly mistake.

Please help me asap.

Regards,
Suraj Patil
Slav
Telerik team
 answered on 20 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?