Filtering GetExportedTypes() ?

Jan 11, 2011

I need to filter out only classes that derive from a given generic base type from an assembly. I will not know before hand what these will be.Assume base type of BaseThing<T>.

Here's what I currently have (after googling and banging my head). No matter what I do, it's either empty or throws an exception.

var types = assembly.GetExportedTypes().Where(x => typeof(BaseThing).IsAssignableFrom(x));

View 4 Replies


Similar Messages:

Forms Data Controls :: Filtering Records Returned Versus Filtering At The Datasource

Mar 14, 2010

I have a standard gridview, with the standard paging and sorting interface enabled.The application holds appointments for three organisational units, with a maximum of 3000 appointment records being returned across all three units. The appointment records are quite small.

The choice I am faced with is to:

1. Have an Org Unit dropdown which returns to the datasource on change of selection and at inital databind, and returns appointment records for one org unit at a time i.e. approx 1000 records.

2. Have the objectdatasource return all 3000 appointment records for all org units at initial databind, and filter the objectdatasource by org unit on change of selection, thereby saving a trip to the datasource.

I guess the question boils down to identifying the point at which querying the datasource by org unit is more efficient than filtering the records returned by org unit.

Is 3000 records a lot for a gridview to be paging and sorting etc.

View 3 Replies

.net Mvc Filtering Data?

Dec 18, 2010

i have i page where i use autocomplete jquery plugin. this might filter from database. but i do not want to make request to DB. so i have write it to session object as List. and every time i am filtering data from this session. what i am doing wrong or have there any other way to do it?

View 1 Replies

Complex Filtering In Web Application?

Sep 18, 2010

I need to estimate (and probably build later on) complex filter in ASP.NET WebForms application. The filter has to be mostly based on ASP.NET AJAX or jQuery for high interactivity. The filter has to allow filtering data with complex logical conditions (and, or, braces) and several operators. A user has to be able to save the filter's query and use it (load it) later on (server logic). Moreover there is still discussion about in operator.

Application should provide some graphical filter builder. I want to have full control on set of operands (filtering fields) and operators. The component will be used for all filtering actions in application. My problem is only how to do the UI part - translation of builded "query structure" is not a problem.

Have you ever did something like that? Can you share some experience how to best and fastest build such component? Do I need to develop component or is there any existing one which has at least some of the functionality and can be extended to provide other functionality? Because I'm not very experienced with client side development, I don't know how complex task is developing such component from scratch.

Another possiblity is to define some meta query language and allow users to write the query to some query text box with support for building logical expressions. I have already checked available controls in DevExpress and Telerik toolkits:

DevExpress:

Pros: Really nice visualization, fast. We probably have DevExpress licences. Cons: Tightly coupled with DevExpress grid. Based on documentation no extensibility and no control over operands and operators. It uses operands provided as columns for grid - I need much more. Probably not possible to save and load filters.

Telerik:

Pros: Not coupled with grid, it looks like separate control. Cons: I didn't find documentation - I'm not sure about extensibility but the code looks like it uses some databind control as source of operands = problem. I don't like the visualization. Demo is really slow. We don't have Telerik licences.

View 3 Replies

C# - Filtering DataGrid Using DropDown?

Feb 25, 2011

I am trying to filter my databound datagridview by CompanyID using an updatepanel. For some reason it's not working.

C#

string company_id;
protected void Page_Load(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand("SELECT CompanyName, CompanyID FROM Company ORDER BY CompanyName", conn);

[Code]....

View 2 Replies

Asp.net - Filtering Log4net On Method Name - Can't Quite Get It?

Apr 14, 2010

I'm using log4net to log my web app's progress, using Log4PostSharp to AOP-injectify all methods. This has the desired effect of logging (almost) everything and is fine.I now have a requirement to log JUST Page_Load methods to a file / console. I can obviously hamstring the log4postsharp class to do that, but then I'd be losing all the other logging.I've been looking at filters in log4net, starting with the StringMatch filter, but that only looks at the message being logged, and I'm after the method name. This put me onto the PropertyFilter, but still with no joy. My log4net.config snippet is thus:

[code]...

View 1 Replies

C# - Filtering On RadGrid Not Working?

Jan 15, 2010

I created a RadGrid with a couple of fields for filtering and I can't seem to get the filtering to work. I can see it clearly posting back (the ajax spinny circle thing) after typing something in the filter box, however my results are always the same. I am using the following definition in the aspx file:

<telerik:RadGrid PageSize="4" ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" OnNeedDataSource="RadGrid1_NeedDataSource"
OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged" Skin="Black" ShowFooter="True"
ShowStatusBar="True" AllowFilteringByColumn="True"

[Code]....

View 2 Replies

MVC :: Filtering Data Using CheckBox?

Mar 10, 2010

Can anyone provide a sample link for the equivalent MVC version of the ADO.NET tutorial "Filtering Data Using a CheckBoxList" by Scott Mitchell?

View 3 Replies

SQL Reporting :: Report Builder Row Filtering?

Feb 24, 2010

report builder row filtering?

View 3 Replies

Alphabetic Filtering With Special Characters

Nov 24, 2010

I have a requirment to filter out all users in the database by starting letter. so we will be having link buttons for A B C D E..... Z. If user clicks on A, all users whose name starts with A is retrieved Now the concern is, if there are users whose name starts with any special chars how they can be classified under any filters OR just copy pasting what the client asked me. In terms of filtering UTF characters, is there no way to set it up so that all 'A' (i.e. Ä, Á etc.) characters are assigned to A (i.e. some way of grouping together in an "if else" kind of rule)?

View 4 Replies

Search - Gridview Filtering Using Textbox?

Nov 12, 2010

i want to know as how to search or filter records in a gridview dynamically based on the character(s) entered on a textbox. What is the best way to achieve this?

View 4 Replies

ADO.NET :: Filtering And Copying Records From One Table To Another

Aug 6, 2010

I have two data tables and I need to compare the dataRows and insert all the unequals into a table. See the codes below. Goal: if the checkbox is true I loop through the ItemData table and store that data into x.Data. Next I look for all records that has row("ItemRandomize") = True and finally I add those records to xData table. There is an if statement in my for loop that checks for duplicate records -- This is were the application fails. How to compare both tables and store the unmatched rows.
[Code]....

View 1 Replies

Filtering SQL Table Data In Linq

Feb 9, 2011

I M New to Linq, I M Searching articles using

DBSearchDataContext db = new DBSearchDataContext();
object q = from b in db.Articles
where b.Tags.Contains(val) |
b.NewsTitle.Contains(val) |
b.EnglishContent.Contains(val)
select b;

I cannot exclude results where category = video or photos. H to exclude category where value is "videos" or "Photographs"

View 4 Replies

C# - Fluent NHibernate - Collections Not Filtering?

Aug 27, 2010

I have a session criteria statement (Fluent NHibernate) that does not seem to filter the child collection even though I have Expressions/Restrictions defined.

ICriteria criteria = session.CreateCriteria(typeof(MyClass));
criteria.CreateAlias("MyCollection", "MC");
criteria.Add(Restriction.Eq("MC.Property", value));
IList<MyClass> list = criteria.List<MyClass>();

This returns all the objects of type MyClass that have MyCollection.Property = value, however MyCollection is not filtered to MyCollection.Property = value

It seems like only the Root objects get filtered.

View 2 Replies

C# - How To Disable Filtering In Telerik Grid

Sep 3, 2010

Currently i am using Telerik grid which filters are applied to each column. I am binding the SQL result set to grid. If the result set is empty from the database while binding, I should disable the filter option in the grid.

How can i achive the same through ASPX or Code behind using C#. Does Telerik Grid have any property to disable the filtering option when thre are no records.

View 2 Replies

C# - Disable Filtering In Telerik Grid?

Nov 18, 2010

Currently i am using Telerik grid which filters are applied to each column. I am binding the SQL result set to grid. If the result set is empty from the database while binding, I should disable the filter option in the grid.

How can i achive the same through ASPX or Code behind using C#. Does Telerik Grid have any property to disable the filtering option when thre are no records.

View 1 Replies

C# - LinqDataSource - Filtering And Binding To Gridview?

Jul 28, 2010

the problem is not solved the way i wanted but i go ahead give the credit to : ŁukaszW.pl for his time and effort.

i am using gridview control and a linqdatasource and its all working fine and i have added the functionlity of searchingBySubject and i added WhereParameters and than binding my gridview (see the code below) but somehow its not returning any rows and i see i have number of rows based on what i am searching.

protected void btnSearch_Click(object sender, EventArgs e)
{
this.LinqDataSource1.WhereParameters["Subject"].DefaultValue = this.txtSubject.Text;

[ode]....

View 2 Replies

LinqDataSource - Filtering For Null Values?

Aug 19, 2010

I am writing an ASP.Net web application. I have listview, it's datasource is a LinqDataSource. In my database, I have a staff table and I am trying filter for records by their team using a dropdownlist. This works fine, until I select "All" in the dropdownlist. It returns all staff except for the ones where the teamID is null. How can I return the records where teamID is null?

This is my code:

<asp:ListView ID="ListView1" runat="server" DataSourceID="ldsStaff" DataKeyNames="staffID">
<LayoutTemplate>
<table>
<tr>
<th>Name</th>
<th>Team</th>
</tr>
<tr>
<td> </td>
<td><asp:DropDownList ID="ddlTeamFilter" runat="server" DataSourceID="ldsTeams" DataTextField="Team" DataValueField="TeamID" AppendDataBoundItems="true" AutoPostBack="true">

[Code]....

View 1 Replies

C# - Filtering Out Bad Characters Using A Regular Expression?

Sep 3, 2010

I have a string which has to be matching @"^[w*$][ws-$]*((d{1,})){0,1}$". If it doesn't match this regex i want the characters that do not match to be deleted from the string. How can i set this up?

View 2 Replies

C# - Filtering The Records In The Second Grid According To The Selection In The First?

Feb 14, 2011

i've header and detail rad grids. when i click a record from header rad grid, it must be filled detail grid.

how to do this?

View 2 Replies

Filtering Names On The Basis Of First Character Of The Name?

Jul 29, 2010

i have a page in which i am displaying the name of all the users i want to filter their names on the basis of first character for that i want to show A B C D ....X Y Z filters on the top on clicking of which it will filter the names accordingly my problem is not the query part but how to add these letters do i have to add 26 link buttons separately or there is some work around for example you might have seen such type of behavior in some music sites for filtering the songs with starting character.

View 2 Replies

Filtering A List View In MVC Application?

Jul 12, 2010

I would like to implement filtering in a List view based on the value in a DropDownList, in a sort of 'postback' call, where the user selects dropdown values and clicks a Refresh button. I have figured out that I should use my ViewData for the model being listed, but how do I pass the selected values back to the Index override that takes filter parameters?

View 3 Replies

C# - Filtering SqlDataSource With Multiple Dropdownlists?

Feb 4, 2011

I have an SqlDataSource at the moment, which I want to be able to be filtered using 3 DropDownList's. Basically, each DropDownList contains values for a certain column on the table, so when they choose one of the values, the SqlDataSource only shows values with that value in the relevant column.

So my table is somewhat like this:

ID (primary key)
ManufacturerID
ItemTypeID
UnitTypeID

And the 3 DropDownList's contain the following:

Manufacturers (value = ManufacturerID)
ItemTypes (value = ItemTypeID)
UnitTypes (value = UnitTypeID)

My filter expression for the datasource is currently like this, but it doesn't seem to work unless all 3 boxes have a value selected, which is not ideal. Any ideas guys? My filterexpression is below:

ItemTypeID = {0} OR ManufacturerID = {1} OR UnitTypeID = {2} OR (ItemTypeID = {0} AND ManufacturerID = {1}) OR (ItemTypeID = {1} AND UnitTypeID = {2}) OR (ManufacturerID = {1} AND UnitTypeID = {2}) OR (ItemTypeID = {0} AND ManufacturerID = {1} AND UnitTypeID = {2})

View 1 Replies

C# - Filtering The Data With Textbox Input?

Sep 16, 2010

How we can filter the results according with the input of of a textbox like Google search.i.e, If i enter "alaska airlines", then it filtered and showed result according with our input. How it possible.

View 2 Replies

GridView With Filtering In The Column Headers?

Aug 1, 2010

I need to use a grid that allows for filtering in the column headers. I know there are some third-party components out there that cost money. I am looking for something that is free / open-source that can be used on a project. Is anyone aware of a GridView that can do this?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved