This is a migrated thread and some comments may be shown as answers.

Grid

9 Answers 130 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shri Prakash
Top achievements
Rank 1
Shri Prakash asked on 15 Nov 2012, 08:25 AM
Hi All,

I have a requirement to implement in a grid and the grid should support the below features.
1. Multi Row Edit - The user should be able to edit all the columns in all the rows in a grid at any point of time. There shouldn't be any Edit button on each row to make the row editable or something similar to this.
2. Dynamic Column generation - Based on a Start Date and End Date, there should be way to dynamically generate Columns for Each month in a year within the time frame (Start Date and End Date). There will also be bound columns addition to these columns. (i.e.,) There will be a Employee Name, Employee Address columns as bound columns and depending on the Period of Service say June 2011 to June 2012 we need to generate columns for each month say June 2011, July 2011, thru May 2012, June 2012. For Every row, this column generation will be the same as per my requirement. i.e., the time span will NOT be different for different rows.
3. When I navigate to the Last column in a row in the grid and if I press Tab a new row should be created
4. Sorting should work on all the column in the grid
5. Pagination should also work. There should be a drop down for the user to choose the page size of the grid
6. Filter on Every column. Filter is to be like Excel-Like Filter. i.e., populating the distinct values from a column and populating these values in a dropdown and displaying it in the corresponding header of that column.
7. Ways to carry out the different types of validations and to display proper Error messages to the incorrect values that the user keys in to the columns
8. Ways to identifying the modified column values alone when there are more number of rows in the grid
9. Finally, we are supposed to use Oracle Database for development.So, any guidelines to be in compatible with the database.

Please do reply to this thread with whichever information you feel will help us to achieve the above requirements. We are in the process of evaluating Telerik RadGrid and if all the above are achievable, then we will be purchasing a licensed version.

Thanks Shri Prakash

9 Answers, 1 is accepted

Sort by
0
Shri Prakash
Top achievements
Rank 1
answered on 15 Nov 2012, 08:42 AM
In addition to my original post above.

1. One of the bound columns will have a drop down and depending on the selected option, we need to enable/disable some of the column(s) that will be generated dynamically based on the Start Date and End Date.
0
Eyup
Telerik team
answered on 20 Nov 2012, 09:03 AM
Hi Shri,

1. This can be achieved using batch updates:
   Batch Server Update    
   Performing Batch Updates

2. You can create or modify your grid programmatically:
  http://www.telerik.com/help/aspnet-ajax/grid-programmatic-creation.html#Section4
  http://www.telerik.com/help/aspnet-ajax/grid-changing-structure-dynamically.html

3. You could use the OnKeyPress client event to implement your custom logic to insert a new record to your database and rebind the grid, or to open the grid in insert mode. However, creating an empty grid row without any relation to the datasource is not supported.

4. Just enable sorting by setting the AllowSorting property to True. You could also enable the AllowMultiColumnSorting property of the MasterTableView
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/sorting/defaultcs.aspx

5.  RadGrid supports a full scale paging with many modes to choose from:
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/paging/defaultcs.aspx

6. You could enable RadGrid integrated filtering by setting AllowFiltering to True.  In addition to that, you could implement your desired filtering functionality using a Filter Template:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx

7. This depends entirely on the way you choose to implement your input and validation logic.

8. You could use several server events to hook on the Update command and check any given cell value.

9. Binding to Oracle datasource is supported. Also, please note that performing complex grid operations such as Inserting, Deleting, Updating, Hierarchy relations, Grouping, Paging, Sorting, Filtering require accommodating appropriate database operations. To use them with Simple Databinding you will need to declare custom event handling for every operation which requires binding to your DataSource. Therefore, we strongly recommend the use of more advanced databinding methods, which automatically handle the aforementioned functions:
Declarative DataSource
Advanced Data Binding

10. You can use the SelectedIndexChanged event of the dropdown column to apply the desired modifications.

In addition to that, RadGrid supports a lot of convenient features and attractive functionalities. Furthermore, it could be fully customized with Templates to meet the exact requirements and configuration of the users. You could check our demos for getting a practical idea of its capabilities.

I hope the provided information will help you in making your decision.

Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Shri Prakash
Top achievements
Rank 1
answered on 21 Nov 2012, 02:01 PM
Thanks for the response Eyup.
1. Will the Sorting work for the dynamically generated Template Columns, with the AllowSorting =True setting on the Grid Level ?
2. The Filter as well, just in case if client wants.
3. Any posts that explains about the Events and their usage in details. Eg: ItemCreated will be used for so on so, ItemDataBound will be used for so on so.. etc.. To understand how tedious it may be if we have to solve any defects after implementation.

Thanks in advance.

Regards,
Shri Prakash C
0
Eyup
Telerik team
answered on 23 Nov 2012, 11:03 AM
Hello Shri,

1. and 2. -Yes, both sorting and filtering are supported with programmatically created grid.

3. You could check out various help topics to find the answer to any question related to RadControls:
 http://www.telerik.com/help/aspnet-ajax/grid-distinguish-differences-between-itemcreated-itemdatabound.html
or our forums and support resources:
http://www.telerik.com/support.aspx

Additionally, you can look through the controls API:
http://www.telerik.com/help/aspnet-ajax/allmembers_t_telerik_web_ui_griddataitem.html

I hope this helps.

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Shri Prakash
Top achievements
Rank 1
answered on 26 Nov 2012, 11:53 AM
Hi Eyup,
Thanks for the help. I am able to complete 50-60% of my requirements with your guidance and all are working fine.

I have left with the below items.

1. "Excel-Like" Filtering
I have gone through the links below. But, couldn't achieve this.
http://www.telerik.com/help/aspnet/grid/grdfilteringwithdropdownlist.html 
http://www.telerik.com/help/aspnet-ajax/grid-filtering-with-dropdownlist.html 
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filteringtemplatecolumns/defaultcs.aspx 

http://dotnetslackers.com/Ajax/re-59329_Excel_like_filtering_with_RadGrid_RadMenu_and_RadAjax.aspx (Not able to get the datasource by referencing the RadGrid in the Ajax method)

http://www.telerik.com/community/code-library/aspnet-ajax/general/excel-like-auto-filter-with-radgrid-radmenu-and-radajax.aspx (Not able to get the datasource by referencing the RadGrid in the Ajax method)

http://www.telerik.com/community/forums/aspnet-ajax/grid/grid-w-custom-paging-and-combobox-filtering.aspx

http://www.telerik.com/community/code-library/aspnet-ajax/grid/multi-selection-radcombobox-for-filtering-grid.aspx

http://www.telerik.com/community/forums/aspnet-ajax/grid/programmatically-created-columns-and-dropdown-filters.aspx

Design Code:

 

<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0">
</telerik:RadGrid>

  

Code-Behind:
Page_Init()
- Programmatic Generation of all columns for the Grid 

RadGrid1_PreRender() - Making the whole grid Editable 

RadGrid1_NeedDataSource() - Used to fetch the data for the grid from DB

 

Could you please provide some help in this regard.

2. Javascript 
Not able to register Javascript onchange of Dropdown value in one of the grid columns  - For every row in the grid.

Not able to register Javascript onchange of Start Date and End Date in one of the grid columns - For every row in the grid.

However, I was able to register a Javascript onclick of a GridButtonColumn as Image to open a pop. Worked perfectly fine.

 See below code:

 

<script type="text/javascript"
function OpenPersonalisationPopUp() { 
window.showModalDialog("../Estimation/Personalisation/PersonalisationPopUp.aspx", "Personalisation Page", "center:yes; resizable:no; scrollbar:no; dialogHeight:550px; dialogWidth:990px; status:no");  
</script>


protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
{  
if (e.Item is GridDataItem)  
GridDataItem griddataitem = (GridDataItem)e.Item;  
//Registering JavaScript to Open Personalisation Pop Up  
griddataitem["EDIT"].Attributes.Add("onclick", "OpenPersonalisationPopUp();");  
}
}

Thanks.

Regards,
Shri Prakash C
0
Eyup
Telerik team
answered on 28 Nov 2012, 01:53 PM
Hello Shri,

I am afraid it is difficult to determine the cause of the issues without replicating the problem. Please try using a RadComboBox and its provided client side events as demonstrated in the demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx

Please open a support ticket to send us a sample runnable application demonstrating the problematic behavior or provide us the exact steps to reproduce the issue. Thus, we will be able to further analyze the project and provide a proper solution.

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Shri Prakash
Top achievements
Rank 1
answered on 29 Nov 2012, 08:55 AM
Hi Eyup,

Thanks for the help.

1. I was able to achieve the Filtering partially. Basically my code worked for Single column filter. I want to make work the filter for multiple columns (AND Clause). Say Description & Department.
2. Subscribing Javascripts  On change of Start Date and End Date columns
3. Maximum number of columns that the grid can hold/render without hampering performance - Any benchmarks available.

I tested with 30, 60, 70, 80, 100, 120, 200, 500, 1000 columns with NO data for these columns. The page was NOT able to render with 1000 columns. The grid/page rendering time gradually increases w.r.t the increase in column count.
Also, the horizontal scrolling suffers w.r.t the increase in column count. For column count > 200, exception/warning is displayed to stop the script in order to stop the browser from not responding (occasionally).

Total code is shared below.

Designer file:

<script type="text/javascript">
function DEPARTMENTChanged(sender, args) {
var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView(); 
masterTable.filter("DEPARTMENT", args.get_item().get_text(), "EqualTo");
}
  
function DESCRIPTIONChanged(sender, args) { 
var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
masterTable.filter("DESCRIPTION", args.get_item().get_text(), "EqualTo");
}
</script>

 

 

 

<div style="padding-left: 5px">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
</asp:ScriptReference>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
</asp:ScriptReference>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
</asp:ScriptReference>
</Scripts>
</telerik:RadScriptManager>
  
<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" Skin="WebBlue">
<ItemStyle BackColor="AliceBlue" /> 
<AlternatingItemStyle BackColor="AliceBlue" /> 
</telerik:RadGrid>
</div>

Code Behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data;
using System.Globalization;
  
namespace AET_POCs.Pages.Estimation
{
    public partial class ResourcePlan : System.Web.UI.Page
    {
        DataSet dsResources = new DataSet();
        DataTable dtResourcePlan = new DataTable("RESOURCEPLANS");
  
        protected void Page_Init(object source, System.EventArgs e)
        {
            //To Generate Columns dynamically for a telerik grid, we need to define the structure in the Page_Init            
            DefineGridStructure();
        }
  
        protected void Page_Load(object sender, EventArgs e)
        {
  
        }
  
        /* To make the Entire Grid Editable */
        protected void RadGrid1_PreRender(object sender, System.EventArgs e)
        {
            //Removed IsNotPostBack to make the grid editable during pagination
            foreach (GridItem item in RadGrid1.MasterTableView.Items)
            {
                if (item is GridEditableItem)
                {
                    GridEditableItem editableItem = item as GridDataItem;
                    editableItem.Edit = true;                                                                
                }
            }
            RadGrid1.Rebind();
        }
  
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
            
        }
  
        private void DefineGridStructure()
        {
            //Generic Settings    
            RadGrid1.Width = Unit.Percentage(99);
            RadGrid1.HorizontalAlign = HorizontalAlign.Center;
            RadGrid1.AllowPaging = true;
            RadGrid1.PageSize = 5;
            RadGrid1.AllowSorting = true;            
            RadGrid1.AllowFilteringByColumn = true;            
            RadGrid1.AutoGenerateColumns = false;
            RadGrid1.GridLines = GridLines.None;
            RadGrid1.BorderWidth = Unit.Pixel(1);            
  
            //Event Handlers
            RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(this.RadGrid1_NeedDataSource);
            RadGrid1.PreRender += new EventHandler(this.RadGrid1_PreRender);
            RadGrid1.ItemDataBound += new GridItemEventHandler(this.RadGrid1_ItemDataBound);
  
            //Scrolling with Frozen Column and Static Headers
            RadGrid1.ClientSettings.Scrolling.AllowScroll = true;
            RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = true;
            RadGrid1.ClientSettings.Scrolling.FrozenColumnsCount = 3;
  
            //Setting to Save the Scroll Position
            //RadGrid1.ClientSettings.Scrolling.SaveScrollPosition = false;
  
            //Basic Setting to make the ViewState, Sorting, Paging work properly
            RadGrid1.MasterTableView.EnableColumnsViewState = false;
            //RadGrid1.MasterTableView.Width = Unit.Percentage(99);
  
            //Basic Settings to make the Total Grid Editable
            RadGrid1.AllowMultiRowEdit = true;
            RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace;
  
            //Check Box Column
            GridCheckBoxColumn checkBoxColumn = new GridCheckBoxColumn();
            checkBoxColumn.HeaderText = "Select";
            checkBoxColumn.AllowFiltering = false;
            RadGrid1.MasterTableView.Columns.Add(checkBoxColumn);
  
            //Bound Column - SlNo
            GridBoundColumn boundColumnSlNo = new GridBoundColumn();
            boundColumnSlNo.HeaderText = "Sl.No";
            boundColumnSlNo.UniqueName = "SlNo";
            boundColumnSlNo.ReadOnly = true;
            boundColumnSlNo.AllowFiltering = false;
            boundColumnSlNo.DataField = "SlNo";
            RadGrid1.MasterTableView.Columns.Add(boundColumnSlNo);
  
            //Button Column As Image - Edit
            GridButtonColumn buttonColumnEdit = new GridButtonColumn();
  
            //Used to Identify the Control in ItemDataBound. Can use this as well "buttonColumnEdit.CommandName = "EDIT";"
            buttonColumnEdit.UniqueName = "EDIT";
            buttonColumnEdit.ImageUrl = "~/Images/search-icon.gif";            
            buttonColumnEdit.ButtonType = GridButtonColumnType.ImageButton;
  
            //Only after the below property is set to true, the Images are Displayed in Multi-Row Edit Grid
            buttonColumnEdit.ShowInEditForm = true;
            RadGrid1.MasterTableView.Columns.Add(buttonColumnEdit);
                
            //Bound Column - Department
            GridBoundColumn boundColumnDept = new GridBoundColumn();
            boundColumnDept.DataField = "Department";
            boundColumnDept.HeaderText = "Department";
            boundColumnDept.UniqueName = "DEPARTMENT";
            boundColumnDept.ReadOnly = true;
            boundColumnDept.FilterTemplate = new FilterTemplate(boundColumnDept);
            RadGrid1.MasterTableView.Columns.Add(boundColumnDept);
  
            //Bound Column - Description
            GridBoundColumn boundColumnDesc = new GridBoundColumn();
            boundColumnDesc.DataField = "Description";
            boundColumnDesc.UniqueName = "DESCRIPTION";
            boundColumnDesc.HeaderText = "Description";
            boundColumnDesc.FilterTemplate = new FilterTemplate(boundColumnDesc);
            RadGrid1.MasterTableView.Columns.Add(boundColumnDesc);
  
            //Assume the Tenure spans from Sep 2012 to Feb 2013
            DateTime dtStartDate = Convert.ToDateTime("09/01/2012");
            DateTime dtEndDate = Convert.ToDateTime("02/28/2013");
  
            //DateTime Column - Start Date
            GridDateTimeColumn dateTimeColumnStartDate = new GridDateTimeColumn();
            dateTimeColumnStartDate.HeaderText = "Start Date";
            dateTimeColumnStartDate.DataField = "Start Date";
  
            //May be required in Edit Scenario
            dateTimeColumnStartDate.PickerType = GridDateTimeColumnPickerType.DatePicker;
  
            //Restricting the Date Selection based on the Start & End Dates
            dateTimeColumnStartDate.MaxDate = dtEndDate;
            dateTimeColumnStartDate.MinDate = dtStartDate;
       
            RadGrid1.MasterTableView.Columns.Add(dateTimeColumnStartDate);
  
            //DateTime Column - End Date
            GridDateTimeColumn dateTimeColumnEndDate = new GridDateTimeColumn();
            dateTimeColumnEndDate.DataField = "End Date";
            dateTimeColumnEndDate.HeaderText = "End Date";
  
            //May be required in Edit Scenario
            dateTimeColumnEndDate.PickerType = GridDateTimeColumnPickerType.DatePicker;
  
            //Restricting the Date Selection based on the Start & End Dates
            dateTimeColumnEndDate.MaxDate = dtEndDate;
            dateTimeColumnEndDate.MinDate = dtStartDate;
           RadGrid1.MasterTableView.Columns.Add(dateTimeColumnEndDate);
  
            //Assume the tenure spans from Sep 2012 to Feb 2013 (See Above)            
            int iStartMonth = 0;
            int iEndMonth = 0;
            int FirstYearRemainingMonths = 0;
            int LastYearRemainingMonths = 0;
  
            //Year Difference
            int year = dtEndDate.Year - dtStartDate.Year;
  
            //Time Being Code - Need to re-write
            if (year == 1)
            {
                //Find the remaining months in a year for the start date
                iStartMonth = dtStartDate.Month;
                FirstYearRemainingMonths = 12 - (iStartMonth - 1);
  
                //Find the remaining months in a year for the end date
                iEndMonth = dtEndDate.Month;
                LastYearRemainingMonths = 12 - (iEndMonth - 1);
            }
  
            //Generate the column for the FirstYearRemainingMonths Count
            for (int i = iStartMonth; i <= 12; i++)
                                           
                GridBoundColumn boundColumnForMonthEffort = new GridBoundColumn();
                boundColumnForMonthEffort.HeaderText = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(i).Substring(0, 3) + " " + dtStartDate.Year.ToString().Substring(2);
                boundColumnForMonthEffort.DataField = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(i).Substring(0, 3) + " " + dtStartDate.Year.ToString();
                boundColumnForMonthEffort.ReadOnly = true;
                boundColumnForMonthEffort.HeaderStyle.Wrap = false;
                boundColumnForMonthEffort.AllowFiltering = false;
                RadGrid1.MasterTableView.Columns.Add(boundColumnForMonthEffort);                  
            }
  
            //Generate the column for the LastYearRemainingMonths Count
            for (int i = 1; i <= iEndMonth; i++)
                              
                GridBoundColumn boundColumnForMonthEffort = new GridBoundColumn();
                boundColumnForMonthEffort.HeaderText = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(i).Substring(0, 3) + " " + dtEndDate.Year.ToString().Substring(2);
                boundColumnForMonthEffort.DataField = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(i).Substring(0, 3) + " " + dtEndDate.Year.ToString();
                boundColumnForMonthEffort.ReadOnly = true;
                boundColumnForMonthEffort.HeaderStyle.Wrap = false;
                boundColumnForMonthEffort.AllowFiltering = false;
                RadGrid1.MasterTableView.Columns.Add(boundColumnForMonthEffort);  
            }
        }
  
        protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = CreateTestData();
        }
  
        private DataSet CreateTestData()
        {
  
            #region "Data for Grid"
  
            DataColumn dcSlNo = new DataColumn("SlNo");
            DataColumn dcDepartment = new DataColumn("Department");
            DataColumn dcDescription = new DataColumn("Description");
            DataColumn dcStartDate = new DataColumn("Start Date");
            DataColumn dcEndDate = new DataColumn("End Date");
            DataColumn dcSep = new DataColumn("Sep 2012");
            DataColumn dcOct = new DataColumn("Oct 2012");
            DataColumn dcNov = new DataColumn("Nov 2012");
            DataColumn dcDec = new DataColumn("Dec 2012");
            DataColumn dcJan = new DataColumn("Jan 2013");
            DataColumn dcFeb = new DataColumn("Feb 2013");
  
            dtResourcePlan.Columns.Add(dcSlNo);
            dtResourcePlan.Columns.Add(dcDepartment);
            dtResourcePlan.Columns.Add(dcDescription);
            dtResourcePlan.Columns.Add(dcStartDate);
            dtResourcePlan.Columns.Add(dcEndDate);
            dtResourcePlan.Columns.Add(dcSep);
            dtResourcePlan.Columns.Add(dcOct);
            dtResourcePlan.Columns.Add(dcNov);
            dtResourcePlan.Columns.Add(dcDec);
            dtResourcePlan.Columns.Add(dcJan);
            dtResourcePlan.Columns.Add(dcFeb);
  
            DataRow drRow1 = dtResourcePlan.NewRow();
            drRow1["SlNo"] = "1";
            drRow1["Department"] = "Technical";
            drRow1["Description"] = "Writer";
            drRow1["Start Date"] = "9/13/2012";
            drRow1["End Date"] = "2/13/2013";
            drRow1["Sep 2012"] = "80.0";
            drRow1["Oct 2012"] = "80.0";
            drRow1["Nov 2012"] = "80.0";
            drRow1["Dec 2012"] = "80.0";
            drRow1["Jan 2013"] = "80.0";
            drRow1["Feb 2013"] = "80.0";
  
            dtResourcePlan.Rows.Add(drRow1);
  
            DataRow drRow2 = dtResourcePlan.NewRow();
            drRow2["SlNo"] = "2";
            drRow2["Department"] = "Functional";
            drRow2["Description"] = "Business";
            drRow2["Start Date"] = "9/24/2012";
            drRow2["End Date"] = "2/23/2013";
            drRow2["Sep 2012"] = "16.0";
            drRow2["Oct 2012"] = "16.0";
            drRow2["Nov 2012"] = "16.0";
            drRow2["Dec 2012"] = "16.0";
            drRow2["Jan 2013"] = "16.0";
            drRow2["Feb 2013"] = "16.0";
  
            dtResourcePlan.Rows.Add(drRow2);             
  
            dsResources.Tables.Add(dtResourcePlan);
  
            #endregion "Data for Grid"   
            
            return dsResources;
          
    }   
    
    public class FilterTemplate : ITemplate
    {
        GridBoundColumn boundColumn;
        GridDropDownColumn ddlColumn;
  
        public FilterTemplate(GridBoundColumn column)
        {
            this.boundColumn = column;
        }
  
        public FilterTemplate(GridDropDownColumn column)  
        {
            this.ddlColumn = column;
        }
  
        public void InstantiateIn(System.Web.UI.Control container)
        {
            /* Container -> FilteringItem -> THead -> GridTableView -> RadGrid */
            RadGrid rdg = (RadGrid)(container.NamingContainer.NamingContainer.NamingContainer.NamingContainer);
            DataSet dsd = (DataSet) rdg.DataSource;
  
            if (dsd != null)
            {
                DataTable distinctValues;
                DataView view;
                RadComboBox combo = new RadComboBox();
                RadComboBoxItem item = null;
  
                view = new DataView(dsd.Tables[0]);
                    distinctValues = view.ToTable(true, this.boundColumn.UniqueName);
  
                    for (int i = 0; i < distinctValues.Rows.Count; i++)
                        combo.Items.Add(new RadComboBoxItem(distinctValues.Rows[i][this.boundColumn.UniqueName].ToString()));
  
                    combo.Items.Insert(0, new RadComboBoxItem("All"));
  
                    item = combo.FindItemByText(this.boundColumn.CurrentFilterValue);
  
                    //Check Designer code for the Client Side Javascript Function
                    combo.OnClientSelectedIndexChanged = this.boundColumn.UniqueName + "Changed"; 
  
                if (item != null)
                    item.Selected = true;
                  
                container.Controls.Add(combo);
            }
        }
    }
}

Please provide me suggestion to address the three issues.
Thanks in advance.

Regards,
Shri Prakash C
0
Shri Prakash
Top achievements
Rank 1
answered on 03 Dec 2012, 10:37 AM
Any updates Eyup?
0
Eyup
Telerik team
answered on 04 Dec 2012, 07:37 AM
Hi Shri,

1. RadGrid filtering works as described - with multiple applied filter expressions using AND statement:
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultvb.aspx?#qsf-demo-source
You could check the filter template demo provided in my previous posts. If you have issues, please try isolating the problem to a smaller application in order to determine the cause of the problem.

2. You could use the following approach to attach client side events to the auto-generated pickers in the filtering item:
 - define a UniqueName for the column:
GridDateTimeColumn dateTimeColumnStartDate = new GridDateTimeColumn();
dateTimeColumnStartDate.UniqueName = "ColumnStartDate";
 - hook up the event:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridFilteringItem)
    {
        GridFilteringItem filterItem = e.Item as GridFilteringItem;
        RadDatePicker startPicker = filterItem["ColumnStartDate"].Controls[0] as RadDatePicker;
        startPicker.ClientEvents.OnDateSelected = "dateSelected";
    }
}
JavaScript:
function dateSelected(sender, args) {
    // execute custom logic
}

3. Although RadGrid functions with great performance, it highly depends on the row and column count and on the binded data content. Generally, the performance optimization process entirely depends on the grid configuration and binding specifications. There are no predefined count limits for columns or rows, however, for better usability we suggest that they should be kept as less as possible.

Additionally, you could check out the following optimizations which enable the grid to generate only the current page, thus maximizing its rendering and performance speed:
RadGrid Custom Paging
Virtual Scrolling and Paging

You can also look through the following articles which demonstrate how to improve your grid's performance and responsiveness:
Grid performance optimizations
Performance Optimization Controls
Telerik Support ( Performance Section )

I hope this will help.

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Shri Prakash
Top achievements
Rank 1
Answers by
Shri Prakash
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or