Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
199 views
I'm looking to implement a batch-edit grid, and one of the fields is going to need a dropdown as the edit control.

The demo (http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx) uses declarative databinding.  Based on the architecture of my project, I'd prefer to bind the dropdown serverside.  However, I can't seem to figure out the server-side events needed to get at the control in the code-behind.

Can someone point me in the right direction?

Thanks.

j
Clyde
Top achievements
Rank 1
 answered on 14 Sep 2014
11 answers
600 views
Dear all
I have a problem which seems to be very common with the RadAjaxmanager but with no real solution in the forums. I have a very simple function which causes an ajax postback from client side. This works fine once. After the first postback it gets a JavaScript client side error that the object is null - it cannot find the RadAjaxManager the second time..

 function OnClientResize() {
            var action = "CLIENTRESIZE|" + BrowserHeight() + "," + BrowserWidth();
            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(action);
            return false;
        }

There has been multiple posts on this issue but no real cause and solution. Could someone please help us out here?

Cheers

Tonie

Mahmoud
Top achievements
Rank 1
 answered on 14 Sep 2014
6 answers
162 views
I wanted more values inside the Grid pagesizer (instead of 10,20,50), so i wrote the following code (partly from the web)

        public static void ConfigurePageSizer(GridPagerItem pagerItem)
        {
            RadComboBox _pageSizeComboBox = (RadComboBox) pagerItem.FindControl("PageSizeComboBox");
            _pageSizeComboBox.Items.Clear();
            int[] _pageSize = new [] {10,20,50,100,250,500,750,1000};
            foreach (int _Size in _pageSize)
            {
                RadComboBoxItem _item = new RadComboBoxItem();
                _item.Text = _Size.ToString(CultureInfo.InvariantCulture);
                _item.Value = _Size.ToString(CultureInfo.InvariantCulture);
                _item.Attributes.Add("ownerTableViewId", pagerItem.OwnerTableView.ClientID);
                _pageSizeComboBox.Items.Add(_item);    
            }
        }

and then called it from : ....

        protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridPagerItem)
            {
                GridHelper.ConfigurePageSizer((GridPagerItem)e.Item);
            }
        }

But ... the problem is ...  the Grid page size combobox behaviour is now that is lost track of the current selected value, it always selects the first (10)

Please advice and/or Tips 

Kind regards,
      Hugo


Pavlina
Telerik team
 answered on 13 Sep 2014
2 answers
104 views
Hi there.

Can radgrid use dynamodb as a datasource?

Would our only option be to use the AWS SDK, create a collection of objects from querying dynamodb and use the radgrid object data source?

Thanks
Chris
Chris
Top achievements
Rank 1
 answered on 12 Sep 2014
4 answers
439 views
I have viewed the demo for custom CSS and found that I can accomplish the following:

1) when using the Metro skin on the Q1 2014 release, when you select a child node the top level node remains with the blue background. This confuses my client because it appears that both are selected. I have changed the indent and other properties, but that does not satisfy them.

2) I changed the ExpandedCssClass value to my custom "noBlue" as shown in the code.
.noBlue
{
   background-color:white !important;
}


3) This works

4) afterwards I spent an hour trying to generalize the style so that the default "rpExpanded" could be left in the panel definition, but the blue background on the expanded item suppressed. I have no clue

5) I found a sample in an older posting, not specific to my needs, but indicates to me that I need something that starts with ".rp" that references the background color or similar part of the panel control.
 
div.RadPanelBar_Default a.rpLink,
        div.RadPanelBar_Default div.rpHeaderTemplate,
         div.RadPanelBar_Default .rpTemplate
         {
                 color: red;
         }
.
Tomica
Top achievements
Rank 2
 answered on 12 Sep 2014
16 answers
645 views
Hello everybody,
I'm using radEditor and I noticed that when I type characters in the Greek language it converts them to their html entities. Is there a preference of some kind to avoid this behaviour? I want the editor to insert the actual unicode characters.

Thank you in advance,
Yannis Develekos
Jie
Top achievements
Rank 1
 answered on 12 Sep 2014
1 answer
245 views
I have a RadGrid in asp.net application which is bound to a ObjectDataSource. Everything works great except filtering.

I traced the query on SQL Server Profiler and found out ...where columnName like '%arabic text%' which is not returning any row.

if you change this to...where columnName like N'%arabic text%' it gives you the correct result.

Is there any solution or work around?.


Thanks
Kesava.
Angel Petrov
Telerik team
 answered on 12 Sep 2014
6 answers
227 views
Hi,

I'm fairly new to the radgrid control, have a radgrid up and running, but I am having some trouble with performance as the number of records grows especially with filters. At the moment, I am using ObjectDataSource and Custom paging

<asp:ObjectDataSource runat="server" ID="OrderAdminOrderDataSource" EnablePaging="false" SelectMethod="GetAllOrdersByCountryISO2Code"
    TypeName="Organo.Web.Application.Facades.OrderAdminFacade" DataObjectTypeName="Organo.Web.Domain.Model.Entities.Order">
    <SelectParameters>
        <asp:Parameter Name="countryISO2Code" />
        <asp:Parameter Name="orderStatusFilterLevel"/>
    </SelectParameters>
</asp:ObjectDataSource>

protected void OrderAdminGrid_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
       {
           OrderAdminGrid.VirtualItemCount =
           OrderAdminFacadeInstance.GetSelectRowCount(CountryDropDown.SelectedItem.Text,
           HttpContext.Current.Items["OrderStatusFilterLevel"].ToString());
           var startRow = (ShouldApplySortFilterOrGroup())
               ? 0
               : OrderAdminGrid.CurrentPageIndex*OrderAdminGrid.PageSize;
           var maxRows = (ShouldApplySortFilterOrGroup())
               ? OrderAdminGrid.VirtualItemCount
               : OrderAdminGrid.PageSize;
           OrderAdminGrid.AllowCustomPaging = !ShouldApplySortFilterOrGroup();
           OrderAdminGrid.DataSource =
               OrderAdminFacadeInstance.GetAllOrdersByCountryISO2Code(CountryDropDown.SelectedItem.Text
                   , HttpContext.Current.Items["OrderStatusFilterLevel"].ToString(), startRow,
                  maxRows);
        }

The second parameter to the select clause is just an int that the code bases what order statuses to return by doing a contains on the list returned here's the code:

protected void OrderAdminGrid_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    //var filterexpression = OrderAdminGrid.MasterTableView.FilterExpression;
    OrderAdminGrid.VirtualItemCount =
    OrderAdminFacadeInstance.GetSelectRowCount(CountryDropDown.SelectedItem.Text,
    HttpContext.Current.Items["OrderStatusFilterLevel"].ToString());
    var startRow = (ShouldApplySortFilterOrGroup())
        ? 0
        : OrderAdminGrid.CurrentPageIndex*OrderAdminGrid.PageSize;
    var maxRows = (ShouldApplySortFilterOrGroup())
        ? OrderAdminGrid.VirtualItemCount
        : OrderAdminGrid.PageSize;
    OrderAdminGrid.AllowCustomPaging = !ShouldApplySortFilterOrGroup();
    OrderAdminGrid.DataSource =
        OrderAdminFacadeInstance.GetAllOrdersByCountryISO2Code(CountryDropDown.SelectedItem.Text
            , HttpContext.Current.Items["OrderStatusFilterLevel"].ToString(), startRow,
           maxRows);
 
    //OrderAdminGrid.DataSource = OrderAdminFacadeInstance.GetAllOrdersByCountryISO2Code(CountryDropDown.SelectedItem.Text,
    //    HttpContext.Current.Items["OrderStatusFilterLevel"].ToString());
}

public IQueryable<Order> GetAllOrdersByCountryISO2Code(string countryISO2Code, string orderStatusFilterLevel, int startRow, int pageSize)
{
    var orders = countryISO2Code == "All"
        ? _orderRepository.GetAllFilteredByOrderStatus(GetOrderStatusFilter(Convert.ToInt32(orderStatusFilterLevel)))
            .OrderByDescending(n => n.OrderDate).Skip(startRow).Take(pageSize)
        : _orderRepository.GetAllFilteredByOrderStatus(GetOrderStatusFilter(Convert.ToInt32(orderStatusFilterLevel)), countryISO2Code)
            .OrderByDescending(n => n.OrderDate).Skip(startRow).Take(pageSize);
    return orders;
}
 
public int GetSelectRowCount(string countryISO2Code, string orderStatusFilterLevel)
{
    var orders = countryISO2Code == "All"
        ? _orderRepository.GetAllFilteredByOrderStatus(
            GetOrderStatusFilter(Convert.ToInt32(orderStatusFilterLevel)))
            .OrderByDescending(n => n.OrderDate)
        : _orderRepository.GetAllFilteredByOrderStatus(
            GetOrderStatusFilter(Convert.ToInt32(orderStatusFilterLevel)), countryISO2Code)
            .OrderByDescending(n => n.OrderDate);
    return orders.Count();
}

and finally this method filters out the records based on whether they are in the filter list or not.

public
IQueryable<Order> GetAllFilteredByOrderStatus(List<int?> filter, string countryISO2Code)
{
    int monthlyOrder = Convert.ToInt16(Enums.OrderType.MonthlyOrder);
 
    return
        this.FindAsQuery(
            x =>
                x.OrderType.OrderTypeId != monthlyOrder &&
                x.ShippingAddress.Country.CountryISO2Code == countryISO2Code &&
                filter.Contains(x.OrderStatusId));
 
}


So this all works great until we start getting more and more records. After looking at the sample for 300000 records with linqdatasource, I thought I'd try that or using an entitydatasource. The only problem is I don't know how to pass in the filter of the list of ints for orderstatuses I want to show or how to use the where clause. I'm open to any suggestions that might imporove performance.

Thanks in advance

Dash
Angel Petrov
Telerik team
 answered on 12 Sep 2014
1 answer
107 views
I have multi-select enabled on my grid. I know I can hold CTRL down to de-select it.

How can I do this without using the CTRL key?

In other words, single-click a row to select it and (if selected) a single-click will unselect it.

The other posts here in the forum that discuss this have broken links.

Kind of uncool even if they are old threads.

-Dave
Eyup
Telerik team
 answered on 12 Sep 2014
1 answer
129 views
Is there a way to access the attributes when the input type is set to "Text" because I am getting an error when trying to retrieve an attribute using the sample code "alert(args.get_entry().get_attributes().getAttribute("attr"));"

I am getting a  JavaScript runtime error: Object doesn't support property or method 'get_entry' .... any thoughts would truly be appreciated.

Nencho
Telerik team
 answered on 12 Sep 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?