Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
217 views
Hello experts i want to create a dynamic menu  from the database just like the one in the following link

http://demos.telerik.com/aspnet-ajax/panelbar/examples/overview/defaultcs.aspx

my table structure is

screen_id , screen_name, parent_id, link
1,"Home",0,"/Home.aspx"
2,"MyContact",1,"/MyContact.aspx"
3,"MyTasks",1,"/MyTasks.aspx"

my problem is that i am not been able to place a sub menu under its parent menu at  e.g. menu id 2 and 3 under menu id 1.In ASP.net i used to use this line Menu1.FindItem(dr["ParentID"].ToString()).ChildItems.Add(mnu); but in Telerik i am not been able to use any of the function "FindItemByValue", "FindItem", "FindItemByText".

if any one can help?
Boyan Dimitrov
Telerik team
 answered on 30 Jul 2014
5 answers
64 views
Hi there,

I have a chart that has active areas set but when the page is rendered and the area is drawn with html, it has a blue outline where the area is. I tried the typical img border:none stylesheet trick but it does not work. Is there an attribute I can set or anything to make this line go away?

I have attached a screenshot of the chart I'm working with, the line is around the blue piece with the 15 over it.
Garrett
Top achievements
Rank 1
 answered on 30 Jul 2014
4 answers
173 views
Hello.
I have a rad grid with the Header Context Menu enabled.
When I hide a column by deselecting it in the Header Context Menu, the rad grid does not re size correctly in IE8. White space appears at the end of the screen in place of the hidden column.
In IE9 the rad grid re sizes correctly.

My aspx code is:

<%@ Page Language="c#" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<head runat="server">
  <title>Test</title>
</head>
<body>
  <form runat="server" id="Form1" method="post">
  <telerik:RadScriptManager ID="RadScriptManager" runat="server" />
  <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
      <telerik:AjaxSetting AjaxControlID="RadGrid1">
        <UpdatedControls>
          <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
        </UpdatedControls>
      </telerik:AjaxSetting>
    </AjaxSettings>
  </telerik:RadAjaxManager>
  <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
  <telerik:RadGrid runat="server" ID="RadGrid1" AllowFilteringByColumn="True" DataSourceID="SqlDataSource1"
    AllowSorting="True" ShowGroupPanel="True" AutoGenerateColumns="true" EnableHeaderContextMenu="True"
    GridLines="None">
    <MasterTableView FilterItemStyle-Wrap="true" FilterItemStyle-HorizontalAlign="Left"
      CommandItemDisplay="Top">
    </MasterTableView>
    <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"
      AllowGroupExpandCollapse="true" AllowColumnHide="true" ColumnsReorderMethod="Reorder">
      <Resizing AllowColumnResize="true" EnableRealTimeResize="true" ResizeGridOnColumnResize="true">
      </Resizing>
    </ClientSettings>
    <GroupingSettings ShowUnGroupButton="true" />
    <HeaderStyle Width="150px" Wrap="true" />
  </telerik:RadGrid>
  <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT TOP 10 CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM Customers"
    runat="server" />
  </form>
</body>
</html>

Thank you 
Natasha
Galin
Telerik team
 answered on 30 Jul 2014
3 answers
194 views
I have a User Control MainPage.aspx. Based on the tab clicked, it adds another control Page1.cs.Based on WorkFlow state, this adds another control Page2.cs.    Page2 has 5 controls out of which 2 are radgrids. Page 2 has an Update panel, where all the 5 controls are added. Since this is the page with the 2 radgrids which need to be ajaxified, I have added a RadAjaxManager here:
protected override void OnPreRender(EventArgs e)
 {
     base.OnPreRender(e);
     RadAjaxManager manager = new RadAjaxManager();
     manager = RadAjaxManager.GetCurrent(Page);
     manager.ID = "RadAjaxManager1";
     manager.AjaxSettings.AddAjaxSetting(_RadGridCtrl1, _UpdatePanel);
     manager.AjaxSettings.AddAjaxSetting(_RadGridCtrl2, _UpdatePanel);    
 
 }

Now Page2 to add the 1st grid, calls another class Inner1.cs, which based on certain conditions, calls Inner2 whcih again calls Inner3.cs which has the RadGrid. Here the RadGrid is simply added as   this.Controls.Add(this._RadGrid1); No panels or update Panels here.  Inner2 adds Inner3 in a Panel. I have added the RadAjaxManagerProxy to Inner1 as follows:
protected override void OnPreRender(EventArgs e
{    
   base.OnPreRender(e);         
   radProxy.ID = "RadAjaxManagerProxy2";
   radProxy.AjaxSettings.AddAjaxSetting(this._Inner2, _FsMain);
 }

A similar approach to add the second radGrid in the page is used. Page2.cs invokes Inner11.cs and adds it in an Update Panel. Inner11.cs has the AjaxManagerProxy as follows:
protected override void OnPreRender(EventArgs e)
 
      base.OnPreRender(e);
           
      radProxy.ID = "RadAjaxManagerProxy1";           
      radProxy.AjaxSettings.AddAjaxSetting(this._Inner22, _FsMain);
  }
Inner22.cs has the RadGrid. No panel or Update Panel here also.
These grids only allow delete, refresh and sort. Delete works good. But Refresh and Sort do not work.Both of them give the javascript error: Uncaught TypeError: Cannot set property 'control' of undefined.

Earlier, without the RadAjaxManagerProxy, I had both the grids with their own RadAjaxManager. Refresh worked but sort did not work. It would sort a column one way but on 2nd click sort the next column! Hence after research I used the proxy which seems the right approach but not working for me!

Viktor Tachev
Telerik team
 answered on 30 Jul 2014
3 answers
197 views
Please find the attached image.
In that how to show labels verically.


Thanks
Danail Vasilev
Telerik team
 answered on 30 Jul 2014
8 answers
416 views
Hi

I have a RadGrid with EditMode="InPlace"
On this grid I need to display a "delete" button with standard delete functionality. For this I have added the following column markup :
   <telerik:GridButtonColumn
   ConfirmText="Delete this Invoice?"
   HeaderTooltip="Delete Invoice"
   Text="Delete"
   HeaderText="Delete"
   CommandName="Delete"
   UniqueName="DeleteCommandColumn"
   ConfirmTitle="Delete"
   ConfirmDialogType="RadWindow"
   ButtonType="ImageButton"
   HeaderStyle-Width="70px"
   HeaderStyle-HorizontalAlign="Center"
   ItemStyle-HorizontalAlign="Center"
   ItemStyle-CssClass="DeleteConfirmPopup">
</telerik:GridButtonColumn>

With this the column shows up on the grid but the image does not display on the rows.
Is this a limitation on the RadGrid's InPlaceEdit? How can I add the delete functionality for InPlaceEdit grids?

FWIW - the same markup works fine on grids with EditForms.

I found a few posts suggesting use of GridTemplateColumns with asp:Imagebutton, but since it was an old post I am hoping there is a better solution in v2013.2.611.45

Thanks

Max
Top achievements
Rank 1
 answered on 30 Jul 2014
3 answers
278 views
Hello,

I have a grid in which I'm generating multi-line grand and group totals using the grid PreRender event. Initially, both the root header and footer grid items are obtained using the following::

GridItem[] rootHeaderItemArray = this.MasterTableView.GetItems(GridItemType.GroupHeader).Where(item => !item.GroupIndex.Contains(GROUP_INDEX_DELIMITER)).ToArray();
            GridItem[] rootFooterItemArray = this.MasterTableView.GetItems(GridItemType.GroupFooter).Where(item => !item.GroupIndex.Contains(GROUP_INDEX_DELIMITER)).ToArray();

The root header items are used to initiate a recursion method thus allowing traversal of all group headers and footers. Within the recursion method the following call is made:

GridItem[] headerGridItemChildArray = gridGroupHeaderItem.GetChildItems();

It has been noticed that the returned grid item array provided by GetChildItems is inconsistent. If a rebind (explicit or implicit) is triggered, the returned items by GetChildItems are consistent. If a rebind is not initiated (i.e., due to a custom grid item command which does not cause a rebind although the grid still triggers the ItemCreated event but not the ItemDataBound event) the items returned by the GetChildItems are different when compared to the items returned when a rebind occurs.

Additionally, the call to obtain the root items is also inconsistent depending if a rebind occurred. The call to obtain the group header root items is always correct but the call to obtain the group footer root items will not return any results if a rebind did not occur. In this scenario, it seems that the group footer root items end up being children of the root header items. Even if the GroupIndex property is used for the group header and footer root items (when a rebind does not occur), it is noticed that they are different and thus a group header cannot be associated to a group footer.

This is causing an issue since there is no way to properly traverse the group header and footer items and thus associate group footer items with group header items. It is understood that if an explicit rebind is used, then the problem is resolved. This is undesirable since it introduces overhead in retrieving the data again. 


Any help in resolving this issue is appreciated.

Thanks.



Viktor Tachev
Telerik team
 answered on 30 Jul 2014
3 answers
112 views
Hello,

I'm trying to implement a (maybe unusual) absolute / relative value-based RadHtmlChart with Stacked Column Series.

As category, I'm using the departments of our company. For each Department, there exist three shifts. Per shift, there are three kinds of times.
So, in case of three departments, i.e.:
ColumnSeries 1:
    - Shift 1, Value 1, Department 1 - 3
ColumnSeries 2:
    - Shift 1, Value 2, Department 1 - 3
...and so on.

The problem now is: I want to display each (sub-)bar's amount of the total bar's count. But everything I try ends up on the problem
that only a column SERIES (multiple sub-bars), not a series ITEM is accessible neither by C# nor by Javascript. That means, only values of all three subbars as a series are accessible, not a subbar's value compared to the current bar in (I hope this is understandable ;-) ).

What I need is something like:

Chart.PlotArea.Department1.Shift1.Value1.Tooltip =  Chart.PlotArea.Department1.Shift1.Value1 + " / " + Sum([...].Value1 + [...].Value2 + [...].Value3);

It would be the best to know both absolute and relative values (500/1000, 50%), but beginning even one of the two values would be nice to get.

Thanks in advance,

Jan
Danail Vasilev
Telerik team
 answered on 30 Jul 2014
1 answer
317 views
Hello everyone,

I am wondering if there is a way to configure the grid so that a single column or row is scrollable (not the entire grid).  So for instance, say we have a grid filled with customer sales history data.  The columns are: Name, Address, Phone, Sales_Number and Description.  The fields other than Description are mostly fixed size, but the description field could be anywhere from 20 characters to 1000 depending on the particular sale.  Is there a way to set it so that either:

1) the column "Description" is set to be scrollable above a certain height or value
or
2) the rows are set to be scrollable above a certain height

For clarity:  I'm not asking about the number of records visible in the grid or per page.  I'm talking about a single row or column.  I realize you can either set a value for height or autosize, but in the oddball cases where a particular cell is large it really ruins the readability of the information in the grid and I'm trying to find a solution besides just cutting of the data and forcing them to open the record in another window to view the full description. 

Thanks for the help!
Konstantin Dikov
Telerik team
 answered on 30 Jul 2014
25 answers
272 views
I have a requirement insert rows to radgid .The radgrid will have 3 Radcomboboxes , one text boxes If one of the radcomboboxes selected value contains "nearest" or "top" I have ton add rad numeric text boxes to one colun of the of the grid. All the radcombo will have static texts and values in aspx page. The combo boxes are not tied with any datasources. I am very new to editable Radgrid .How can I do this.Please heilp me.
Thanks
RR
Princy
Top achievements
Rank 2
 answered on 30 Jul 2014
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?