C# .NET - bindingsource.filter
Asked By shan pitt
09-Sep-10 05:54 AM
i am using bindsource to filter the records.my requirement is filtering the record of the same column which contains multiple rows.Here is the snippet:
bindingsource.filter="code='01','02'";
It throws an error.
what is the perfect syntax?
Thnx in advance
Sagar P replied to shan pitt
Try something like this;
bindingsource.filter="code='01' OR code='02'";
shan pitt replied to Sagar P
i want to show both 01 and 02 records.But yours only show either one
Super Man replied to shan pitt
i think it should work with the OR.
try to use like this:
bindingsource.filter = "code in ('01','02')";
Sagar P replied to shan pitt
I am not sure but can u give try for some of the following;
bindingsource.filter="code IN ('01','02')";
Or
bindingsource.filter="code ='01';'02')";
[ Kirtan ] replied to shan pitt
Write it like below
source1.Filter = "artist = 'Dave Matthews' OR cd = 'Tigerlily'";
shan pitt replied to Sagar P
shan pitt replied to Sagar P
Also I want to know how to filter the unique records throught this binding source
shan pitt replied to Super Man
| Also I want to know how to filter the unique records throught this binding source |
to convert an HTML page to a word document using the clipboard, without any import filter, File Name : html2word.vbs Requirement : IE5, Word Author : Jean-Luc Antoine Submitted : 19 / 12 / 2001 it is downloaded as Print ' instead of the default Web Layout strBody.Append( " <!- -[if gte mso 9]> " & _ " <xml> " & _ " <w:WordDocument> " & _ " <w:View> Print< / w:View> " & _ " <w:Zoom 8.5in 11.0in; " & _ " margin:1.0in 1.25in 1.0in 1.25in ; " & _ " mso-header-margin:.5in; " & _ " mso-footer-margin:.5in; mso-paper-source:0;}" & _ " div.Section1" & _ " {page:Section1;}" & _ " - -> " & _ " < / style> < / head> " ) strBody.Append
dg) { ExportDataGrid(dg); } public static void ExportDataGrid(DataGrid dGrid) { SaveFileDialog objSFD = new SaveFileDialog() { DefaultExt = "csv" , Filter = "CSV Files (*.csv) | *.csv | Excel XML (*.xml) | *.xml | All files (*.*) | *.*" , FilterIndex = 1 }; if (objSFD.ShowDialog for the Excel XML sw.WriteLine( "<?xml version = \ "1.0 \ " " + "encoding = \ "utf-8 \ "?> " ); sw.WriteLine( "<?mso-application progid" + " = \ "Excel.Sheet \ "?> " ); sw.WriteLine( "<Workbook xmlns = \ "urn:" + "schemas-microsoft-com:office:spreadsheet \ "> " ); sw
would serve the same purpose, because when an user type something on textbox, it will filter the data and bind it to gridview. and this can be done using AJAX ENABLED with, simple, xmlhttprequest description: 1. binding gridview from database. 2. design one textbox, !- -[if gte mso 9]xml w:WordDocument w:ViewNormal / w:View w:Zoom0 / w:Zoom w:
NOTEPAD At the top of the file you will see two tags that start with <?mso On the first tag find the attribute href = " Modify the link to point to the s it. You could also use this PowerShell command to move sites based on any filter you choose. http: / / www.sharepointjohn.com / sharepoint-2010-powershell-move-all-my-sites-personal-sites
dg) { ExportDataGrid(dg); } public static void ExportDataGrid(DataGrid dGrid) { SaveFileDialog objSFD = new SaveFileDialog() { DefaultExt = "csv" , Filter = "CSV Files (*.csv) | *.csv | Excel XML (*.xml) | *.xml | All files (*.*) | *.*" , FilterIndex = 1 }; if (objSFD.ShowDialog for the Excel XML sw.WriteLine( "<?xml version = \ "1.0 \ " " + "encoding = \ "utf-8 \ "?> " ); sw.WriteLine( "<?mso-application progid" + " = \ "Excel.Sheet \ "?> " ); sw.WriteLine( "<Workbook xmlns = \ "urn:" + "schemas-microsoft-com:office:spreadsheet \ "> " ); sw