Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Go top a specified row in a table
Message
From
05/11/2004 12:49:10
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00957940
Message ID:
00958582
Views:
15
>Cetin,
>
>Thanks for the additional info. I was able to reproduce it (the issue of count-1), so I'll address it. Thanks.
>
>I think you'd agree that bringing down 100,000 rows from the back-end is a high amount and maybe not necessary. However, I bumped it from 1,000 rows to 100,000 rows. Yes, filters will take longer, but I didn't have to wait 35 minutes. There is the option (checkedbox list) to scope the filter to only certain columns.
>
>The issue with rowfilter is that it's not applicable to columns that are coming from parent tables. But I will certainly look into this to see if there's something that can be done to improve it.
>
>Thanks for your input!
>Kevin

I don't know. Probably this is better:
public void SetTextFilter(bool lValue,string cSearchText)
{
	if(lValue==false) 
	{
		System.Text.StringBuilder sb = new System.Text.StringBuilder();
		for(int col=0;col < this.TableStyles[0].GridColumnStyles.Count;col++)
		{
		DataGridColumnStyle oCol = 
    this.TableStyles[0].GridColumnStyles[col];  // grab column object for current column #
		string cColumnName = oCol.MappingName.ToString();
		DataRow DrColumn = this.DtGridDef.Rows.Find(cColumnName); 
   // make sure column is defined in DtGridDef where SEARCH is TRUE  
		if ( bool.Parse(DrColumn["Search"].ToString()))
		  {
			if (sb.ToString().Length > 0)
				sb.Append(" or ");
			sb.AppendFormat("Convert({0},'System.String') like '%{1}%'",
                            cColumnName,cSearchText);
		  }
	        }
	        this.dvGrid.RowFilter =  sb.ToString();
	}
	else	// reset the filter
	this.dvGrid.RowFilter = "";
	}
This one took 1-2 secs with 100K rows.
PS:Casing missing.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform