Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
215 views
Hi,

I have a grid with sorting enabled.
I build the columns in the code-behind.
The grid also have static headers enabled.

When I click a header for sorting, the column is being sorted.
But when I click the arrow to change to the other sorting state, the arrow jumps to the next column.
Every extra click jumps the arrow a column to the right, instead of flipping the arrow in the same column.

I use version 2013.2.717.40.

Please advise.
Thanks,
Guy.
Mansi
Top achievements
Rank 1
 answered on 30 Jul 2014
2 answers
294 views
Hopefully this is an easy one..I am familiar with the CSS trick to right-align the last RadMenuItem for a RadMenu that is 100% wide:

div.RadMenu .rmRootGroup .rmLast   { float: right; } 
div.RadMenu .rmGroup     .rmLast   { float: none;  }

However, for a particular client, I need to have TWO (theoretically more but two for now) RadMenuItems right-aligned.. I cannot seem to figure out how to do this. The closest I could get was to have separate RadMenus contained within their own DIV (one float:left, one float:right). This put everything in the correct positions but left a whitespace gap in the middle that I could not seem to fill (not to mention borders on the edges that I couldn't get rid of even when using the tricks found in this forum..

So in short, is there a way to do this sort of like how tables do it (conceptually.. I know we all hate tables) where I could set my RadMenu to 100% width, set the first 4-5 RadMenuItems on the left to a fixed width, then somehow declare a separator item or such that would automatically fill up whatever is left over by the left items and the two that I would add after it?

I feel like I am missing something very easy but for the life of me I can't figure this one out.
Aaron Abdis
Top achievements
Rank 1
 answered on 30 Jul 2014
1 answer
205 views
Hi everyone,

I've got Grid with filter columns and everything works fine except focus.
I lost focus after FilterDelay elapsed. I tried to set focus with
ItemCommand and PreRender but cursor appears at the beginning of
textbox, not at the end, like this demo. (Client side binding)

How can I fix that? Is it possible?

Regards,

Kurt
Konstantin Dikov
Telerik team
 answered on 30 Jul 2014
1 answer
185 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
47 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
154 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
141 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
161 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
372 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
220 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?