nicson
January 16, 2008, 8:23am
1
Hi Aspose Team,
I'm displaying a database table of 10,000 rows with the gridWeb, using a paging of 20.
Everything is fine, except when I use the AutoFilter function.
The Autofilter displays all the value in a column. But if I filter on a value that is not on the current page. The AutoFilter return nothing.
Is it normal? What should I do for the AutoFilter to return value not on the current page?
Hi,
Do you mean that you filter the data programmatically using FilterRows method with paging on and when you filter data which is not present on the current page, it does not display the filtered data. Yes that 's normal and we check and may consider to enhance autofiter feature.
Thank you.
nicson
January 16, 2008, 11:57am
3
Thanks for quick reply, you perfectly understand my issue. Is there any workaround? Can I attach my own filter method to the filter event? So that I can do the filetring in the datatable directly myself.
Hi,
Well, when you filter data programmatically, you may try to add a line first to off paging to show the results:
E.g.,
GridWeb1.EnablePaging = false; Aspose.Grid.Web.Data.RowFilterSettings rowFilter = GridWeb1.WebWorksheets[0].RowFilter; rowFilter.Criteria = "CELL0=\"" + TextBox1.Text + "\""; rowFilter.FilterRows(); . .
Thank you.
nicson
January 16, 2008, 3:32pm
5
Hi, I understand your suggestion, but I would like to rely on the grid filter. I mean, I don't want to use a textbox to set the filter criteria. I would like my user to still use the grid filter pop-up.
Is there a way to do this? Can I attach a event handler to the filter post-back?
nicson
January 21, 2008, 8:37am
6
Hi Aspose Team,
I realise that the way to do what i'm asking is to enable editing for the header, add a dropdown list box to them, and a cell change event handler. That's not too much work, but some work tough. When do you plan on enhancing the AutoFilter feature? Can you give me a time frame so that I can decide to wait or go on with this developpement.
Thanks
Hi,
Thanks for considering Aspose.
We will check the feasibility to enhance Autofilter feature of the grid. We will get back to you soon.
Thank you.
henry
January 23, 2008, 1:35am
8
Hi,
We will enhance the filter and paging feature in 2 or 3 weeks.
Thank you for considering Aspose.
nicson
April 17, 2008, 9:35am
9
Hi Aspose Team,
Any advance on this improvement?
nicson
July 15, 2008, 9:11am
11
Hi Aspose Team,
Any advance for this feature?
henry
July 17, 2008, 8:59am
12
Hi,
The new feature is still not available since it need more test and could affect other portion.
Thank you.
nicson
May 29, 2009, 1:01pm
13
Hi Aspose Team,
Any advanced on this issue? My user are craving for this features as they use it mostly yo analyze lots of datas.
thanks
Hi,
Please try the attached Aspose.Grid.Web version v2.0.1.2005.
We provide an interface named ICustomFilter to customize filter.
Please try the following code:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
// initialize
WebWorksheet sheet = GridWeb1.WebWorksheets[0];
int lintCounter = 0;
sheet.Cells[0, 0].StringValue = "Investor Name";
sheet.Cells[0, 1].StringValue = "Fund Name";
sheet.Cells[0, 2].StringValue = "ADR Register";
sheet.Cells[0, 3].StringValue = "City";
while (lintCounter < 1000)
{
sheet.Cells[lintCounter + 1, 0].StringValue = "Investor " + lintCounter % 10;
sheet.Cells[lintCounter + 1, 1].StringValue = "Fund " + lintCounter % 5;
sheet.Cells[lintCounter + 1, 2].PutValue(lintCounter % 2);
sheet.Cells[lintCounter + 1, 3].StringValue = "City " + lintCounter;
lintCounter++;
}
GridWeb1.WebWorksheets[0].RowFilter.CustomFilter(0, new CustomFilter());
}
}
public class CustomFilter : ICustomFilter
{
#region ICustomFilter Members
public IDictionary GetFilterValueList(WebWorksheet sheet, int columnIndex)
{
// specify the filter value list for each column.
IDictionary dt = new SortedList();
switch (columnIndex)
{
case 0:
dt.Add("Investor 0", 0);
dt.Add("Investor 1", 1);
dt.Add("Investor 2", 2);
dt.Add("Investor 3", 3);
break;
case 1:
dt.Add("Fund 0", 0);
dt.Add("Fund 1", 1);
dt.Add("Fund 2", 2);
dt.Add("Fund 3", 3);
break;
default:
break;
}
return dt;
}
public void FilterRows(WebWorksheet sheet, int columnIndex, int filterIndex)
{
// you must provide new data to the worksheet by column index and filter index.
sheet.Cells.Clear();
int lintCounter = 0;
int rowIndex = 1;
sheet.Cells[0, 0].StringValue = "Investor Name";
sheet.Cells[0, 1].StringValue = "Fund Name";
sheet.Cells[0, 2].StringValue = "ADR Register";
sheet.Cells[0, 3].StringValue = "City";
while (lintCounter < 1000)
{
if (columnIndex == 0 && lintCounter % 10 == filterIndex ||
columnIndex == 1 && lintCounter % 5 == filterIndex ||
filterIndex == -1)
{
sheet.Cells[rowIndex, 0].StringValue = "Investor " + lintCounter % 10;
sheet.Cells[rowIndex, 1].StringValue = "Fund " + lintCounter % 5;
sheet.Cells[rowIndex, 2].PutValue(lintCounter % 2);
sheet.Cells[rowIndex, 3].StringValue = "City " + lintCounter;
rowIndex++;
}
lintCounter++;
}
}
#endregion
}
Thank you.
The issues you have found earlier (filed as 9146) have been fixed in this update .
This message was posted using Notification2Forum from Downloads module by aspose.notifier .
The issues you have found earlier (filed as ) have been fixed in this update . This message was posted using BugNotificationTool from Downloads module by MuzammilKhan