.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How to use GetActionPath to get child list,please?

Posted By:      Posted Date: September 26, 2010    Points: 0   Category :ASP.Net


How to use method:public string GetActionPath(string action,Object row)?

what is data struct of Object row ? Should I do how to new the row? Who can give me a example?


How to use GetActionPath to get url of child list ,please?



View Complete Post

More Related Resource Links

Binding to child list

I have a wpf datagrid that is bound to my business object, Caregivers, which is a custom list of Caregiver.  The Caregiver object contains a child list, ScheduleList, which is a custom list of Schedule. I have successfully bound the datagrid to the Caregivers object using a collectionviewsource and setting the source to my custom object.  I now want to bind the datagrids row details to the child list but I am having trouble.  Here is what I'm trying: My Datagrid is:      <DataGrid Name="DataGridSummary" ItemsSource="{Binding}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" > <DataGridTextColumn Header="Name" Binding="{Binding Name}"/> <DataGrid.RowDetailsTemplate> <DataTemplate> <Border Margin="5" Padding="2" BorderBrush="DimGray" BorderThickness="0" CornerRadius="3"> <DataGrid Name="DataGridDetails" ItemsSource="{Binding ScheduleList}" HorizontalGridLinesBrush="LightGray" VerticalGridLinesBrush="LightGray" AutoGenerateColumns="True" CanUserAddRows="False" CanUserDeleteRows="False"> <!--<DataGridTextColumn Header="Clie

Disable child links in list.aspx : gridView based on some row condations


In the list.aspx page , Datagridview


I want to disable the links to the child table based on condition ,

let say if filed OrderDate is empty at row in table Orders I want to disable link to OrderDetailes for that specific row

Best design option for multiple parent / multiple child list?


I made 2 lists.  "User Groups" and "Resource Groups".  In User Groups, I setup a column to do a multi-select lookup to the Resource Groups lists title column.  Obviously as this gets built, groupings will form in the other direction as well... Is there a way to programatically do that, so I don't have to complete a multi-select colum in the Resource Groups list that does a lookup to the User Groups list to get info I logically already have.

I tried to do it with a workflow, but was only able to update 1 item so the multi-select concept was pointless. 

I want to have the multi-select information displayed regardless of which list your looking in.  If you look in a User Groups list item, you can see all the resources the users have access to... if you look at a Resource Group list item, you can see what User Groups have access to it (linked by multi-select lookup), and i'd like to only have to populate the lookup in 1 direction and build the reverse relationships on automatically.

Hope that makes sense.  You'd think you could auto import this info but I can't get Domain Local groups to show up, seems to be a limitation of the WSDL for connecting to AD (forget the correct term for that piece), so I'll add them manually..



SSRS 2008 R2 - Parent Child Hierarchy - Searchable Parameter List


Hi dear,

I'm, workin at the moment on a report for my company. I have a problem with searching in a parameter list which is based upon a parent child hierarchy. The users asked me for type in the first few characters to search the parameter faster (like in this post ) , because it's a large hierarchy with about 1700 values. In a "normal" list ("linear" without  a hierarchy) this feature is available.

So my question:

Isn't it possible to search in the parameter list in general if this is based upon a hierarchy?

Are there any possibilities or suggestions to get this feature?

Or is this the only way to do this:



Thanks in advance!


Add Related/Child List Item? - How to automatically set the relationship?




I've got a parent/child relationship between two lists.  I have the parent form set to automatically include child records.

The problem I'm having is that when I "Add new item," it is not associating the new record with the parent record automatically.

How do I have it automatically set the key field?

Thanks in advance for any suggestions,




custom field type works in view properties, but not in list view: 3 parent fields filter child list,


My situation:

A) odd thing is that no matter where I put a stop point in my custom field type, it is NEVER hit when the items are displayed in list view.  Event with <Field Name="CAMLRendering">TRUE</Field> which causes the list to error out, but again no stop point to help me know why.

B) the value of the column in question will be different for every user who views the list, I'm querying a secondary list based on the user's loginName, and two of the fields from the list we're in. 

C) the display is customized based on whether any records were returned and the current DateTime, so possible displays would be "", "! 12/1/2010", and "7/7/2011"

D) and the text displayed links over to a form for them to do their assignment. the link url would be a config setting url + "?[one of the fields form the list we're in]"

My questions:

1) Is it possible for fieldtype code to execute while a list view is being rendered?

2) If not, then should I chase down the path of a content query webpart?  Will it be able to filter on the current users login name?

3) If not on 1 or 2, can you think of any other way to do this beyond creating a custom application page? (need to having filtering and sorting on this page)

GridView Parent Child View with JQuery Effects

I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.

GridView control to show master-child or master-slave data, written in c#, asp.net

I previously made a master slave datagrid using Visual Studio 2003 .Net (original article) that would allow users to show data to clients using collapse and expand features. These features however did not carry over to gridview for many users. This tutorial will explaing how to create a collapsable/expandable gridview in frameworks 2.0 and higher

Ready made List Types provided by SharePoint

SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

Dropdown list in ASP.NET - How to get value selected

am sure this must be very simple, but unforunately I can't figure it out.
I have the following code which populates the dropdown lists from the database. This works fine. Now, when the user selects a particular employee name from the list, I want to get the Employee Id of the selected employee. i.e. I need to get the "Eid" value. I can do this if the EId is loaded in the dropdown list, but in this case only the employee name is displayed. Please let me know howI can get the Eid value even though it is not loaded in the dropdown list.
I would really appreciate your help

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code

Get pixel format, raw format, property id list and property items image in VB.net - C#.net.

n this simple article you will learn that how we can get pixel format, raw format, property id list and property items image in VB and C#.net.

Get Pixel Format:

Image consists of pixels to get the format of the pixel we have a property named pixel format. This property returns an enumeration of pixel format. This enumeration tells the pixel format.

To demonstrate make a window application. Drag one button and a picture box on form.

Now write the following code on Button click event:

Binding an array to dropdown list


I have the following string which is a list of urls. How do I get this to work so the url shows for the selection and also is the value?      


allLinks = newAllLinks
        Me.DropDownList1.DataTextField = "Link"
        Me.DropDownList1.DataValueField = "LinkURL"
        Me.DropDownList1.Items.Insert(0, New ListItem(" - Select - ", 0))
        Me.DropDownList1.DataSource = allLinks


 ArgumentNullException: Value cannot be null.
Parameter name: container]
   System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +121
   System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName, String format) +8

Compare List


i have got two list<string> containing datas

i would like to compare the both list and the result to new list whch does not contains the same data.(basically unique data)

eg shown below..

list A       list b          list c

a             a                 d

b           d                    c

c            f                   e

f            e

plz let me knw..

Gridview with a dropdown list for editing


Hello. I am working through Scott Mitchell's ASP.Net in 24 hours book. I am finishing the photo album project.

I have a GridView that retrieves a list of uploaded photo rows for the logged-in user.
The GridView is for editing and deleting rows.

The photo Category field in the Gridview is a dropdown list. The text entry field was deleted after converting this field to a Template.

Like the uploaded photos, these Categories are user-specific. They are created in another web page.

Users also have the option to select "none" for the category when they upload an image.

For the GridView:  The Category ID field's ItemTemplate and EditItemTemplate both have a " - None - " choice added to them.

I am getting this error:

'pictureReadOnlyCategories' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value


Note: The ID for the ItemTemplate for that dropdown list is the ID listed above in the error: "pictureReadOnlyCategories".


Am I missing some step in this process of changing a GridViews text field to a dropdown that can be used for editing? I went through the book's instructions three times.

Here is my code for the dropdown list and a screenshot of the Design

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend