Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

sameercodes

@sameercodes
About
Posts
13
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Resizing and realigning the contents of a WPF windows form
    S sameercodes

    Hi there, I am new to WPF. I have some 2 textboxes and a button on the form. Below these, there is a grid. My requirement is to resize the grid and realign the controls, according to the size of the window. Thanks and Regards - Sameer

    WPF csharp css wpf

  • Passing any object type to a function
    S sameercodes

    Hi Estys, Thanks for the reply. Actually the ChildEntity is just one example. The BaseEntity is a base class for many child entities, say ChildEntity1, ChildEntity2, ChildEntity3, etc. Thus, the list could be of any of these types and certain convert actions need to be taken on the same. Your solution seems to be great but if you take a look at the replies before, I have tried this and somehow this dint work. I'll reconstruct the scenario again, in detail. My ConvertList function belongs to a static class, say ListClassStatic Thus I am calling the function as:

    listChildList = ListClassStatic.ConvertList(ref listChildList);

    Thanks and Regards - Sameer

    C# help question regex

  • Passing any object type to a function
    S sameercodes

    Hi Estys, Thanks for the reply. Yeah, I need to pass a list. Can't help it! :sigh: Actually the ChildEntity is just one example. The BaseEntity is a base class for May child entities, say, ChildEntity1, ChildEntity2, ChildEntity3, etc. Thus, the list could be of any of these types and certain convert actions need to be taken on the same. Your solution seems to be great, but aint it a bit complicated. Is there a simpler one? Thanks and Regards - Sameer

    C# help question regex

  • Passing any object type to a function
    S sameercodes

    Hi Karsten, I did the exact way as u'd said but got the following error

    The best overloaded method match for ConvertList(List<BaseEntity>) has some invalid arguments.

    I'll reconstruct the scenario: My function definition is as follows:

    List<BaseEntity> ConvertList(List<BaseEntity>)
    {
    //My code
    }

    And I am passing a child object which is inherited from base entity:

    List<ChildEntity> listChildEntity = new List<ChildEntity>();

    listChildEntity = ConvertList(ref listChildEntity);

    Thanks - Sameer

    C# help question regex

  • Passing any object type to a function
    S sameercodes

    Hi there, I have a function

    List<BaseEntity> ConvertList(List<BaseEntity> listBaseEntity)
    {
    //My code
    }

    Now I am calling the function as follows:

    List<ChildEntity> listChild = new List<ChildEntity>();

    listChild = ConvertList(listChild);

    Here ChildEntity has base class as BaseEntity. On compiling I am getting error as :

    Cannot convert type List<ChildEntity> to List<BaseEntity> via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type conversion

    Then I tried defining the function as

    List<object> ConvertList(List<object> listObject)
    {
    //My Code
    }

    Again I am calling the function as follows:

    List<ChildEntity> listChild = new List<ChildEntity>();

    listChild = ConvertList(listChild);

    Then I got the compile time error as

    The best overloaded method match for ConvertList(List<object>)' has some invalid arguments

    How do I resolve this issue? The list that I am passing to the ConvertList function could be of any type. Thanks and Regards - Sameer

    C# help question regex

  • WPF: WPF Toolkit Datagrid. Capturing Key board events
    S sameercodes

    How can we capture the Keypress event and the pressed key, on a WPF toolkit datagrid? I need to capture the F9 key, when the user is focussed on a particular column. Plus, can anybody suggest a good site to study the WPF toolkit datagrid? The basic CRUD operations need to be implemented. I am totally new to .NET 3.5. Thanks Folks!!!

    WPF csharp wpf question

  • [Message Deleted]
    S sameercodes

    [Message Deleted]

    C#

  • cannot detect User Control
    S sameercodes

    Hi people, this is very very urgent. please help. I have a user control which is being loaded dynamically. This user control is being placed ina place holder. The code is as follows:

    UserControl ucUserControl = (UserControl)Page.LoadControl("../AM/UserControls/ucMyUserControl.ascx");

    ucUserControl.ID = "userControl_ID";

    phPlaceHolder.Controls.Add(ucUserControl);

    Now, I am trying to access the user control by using FindControl:

    UserControl ucUserControl = (UserControl)phPlaceHolder.FindControl("userControl_ID");

    The problem is the user control is not detected. That is, ucUserControl = null Please help guys. Thanks.

    ASP.NET help

  • Datalist: Display page
    S sameercodes

    I have a datalist having a dropdownlist control on each row. On selecting a particular item of this dropdown, I need to display a page in that particular row of the datalist. There are five different pages and the selection of the page to be displayed depends on the item selected in the drop down list. Actually, the controls on the pages is waht i need. So instead of the pages if you have any other option do let me know. Note : The number of rows in the datalist keeps on varying.

    ASP.NET

  • How to get Datalist ROW number?
    S sameercodes

    Yeah, but even for that I need to have the row id of that datalist control. This is needed while using FindControl. ddlDropdown= (DropDownList)dlDataList.Items[dlRowNumber].FindControl("ddlLinkRefObjectType");

    ASP.NET tutorial database help question

  • How to get Datalist ROW number?
    S sameercodes

    I have a dropdown control in a datalist. Suppose there are 10 Rows in this datalist. If, for example, I select a value from the dropdown of the fifth row of the datalist, I need to get the ID or INDEX of that particular row of the datalist. Remeber, dropdown doesnot have CommandName property. Please help in achieving this.

    modified on Thursday, April 30, 2009 8:39 AM

    ASP.NET tutorial database help question

  • Datalist New Row
    S sameercodes

    I have a datalist which is not bound to any table. There is one texbox and one dropdown in the of the datalist. There is a button "Add New Row" on the page. The requirement: When I click on the New Button, a new row which has the same textbox and the same dropdown, needs to be displayed. Every time the button is clicked, this should take place. I have been hunting for this since a long time. Please Help. Thanks.

    ASP.NET help

  • Add new row to a Datalist
    S sameercodes

    My datalist has two textboxes, one dropdown and one checkbox. There is also a button "Add" on the page. Every time the "Add" button is clicked, a new row should be added to the datalist, with all the controls on the row. Kindly help. Thanks in advance, for the solution. :)

    ASP.NET help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups