linqdatasource

Devexpress LinqServerModeDataSource vs LinqDataSource

I need to access the returned results of a LinqServerModeDataSource. When using the normal Linqdatasource you can access this information in the "Selected" event e.Result, but the devexpress object does not have this event. Now that I think about it there are no "ed" events "Updated", "Inserted" only "ing" events on the devexpress data ...

How can I prevent the LinqDataSource Where clause from resetting on postback?

I'm trying to set the where clause on a LinqDataSource object bound to a GridView programmatically on a button click, but when the GridView rebinds data (for instance, when the user sorts) the Where clause resets back to the empty string. Is there a way to prevent this, or is there a better way to filter my results? ...

Trying to rearrange my listview, but not sure how to get the property I need to edit

So, I have a ListView that contains a steps in a process. On the left there is a Label simply stating which step it is, and on the right is a TextBox with the instructions. Then to the right of that TextBox is the usual edit and delete buttons, but I also have an up-arrow and a down-arrow. If clicked, I would like the current set of item...

Asp.net Listview server side pagination

Hi, My scenario is i will get some data uploads in csv format in my server, that will have more than 60k records. and the column numbers might change file to file, now my problem is i want to display the contents of this in a listview, with pagination. and i don't want to download entire data to client side, i want the data to be retr...

No parameterless constructer defined for this object when putting EnabledDelete=true on LinqDataSource

If I have a LinqDataSource without EnabledDelete, EnabledUpdate, EnabledInsert, it works fine, but as soon as I add those properties to the data source, I get the error: No parameterless constructor defined for this object. ...

Updating gridview row with a combobox edit template

The title may be a little unclear, I wasn't sure how exactly to describe the problem. I have a gridview displaying a list of notes on particular customers. It uses a linqdatasource to retrive the notes to display from an SQL database. One of the columns in the gridview is an 'Assign To' column, where you can select a user to assign that...

.net - altering ListView runtime item values from a LinqDataSource

I need to programatically test and modify a ListView's column values at run time. The data is coming from a LinqDataSource ("LDS") and the LDS is declared to return an ordered subset of the target SQL table's columns. My inclination was to do this using the ListView's OnItemDataBound event, but at that time the ListViewDataItem is an an...

Pass Parameter to LinqDataSource "OnSelecting" for Stored Procedure

I'm building a semi-elaborate RadGrid where within my NestedViewTemplate I want to have a LinqDataSource that uses a Stored Procedure to get data from the database. Here's what I have so far <asp:HiddenField runat="server" ID="HiddenID" Value='<%#DataBinder.Eval(Container.DataItem, "ID")%>' /> <asp:LinqDataSourc...

Can't "Enable Editing" on my gridview

I'm trying to connect my gridview to a LinqDataSource to select, update, insert and delete records. I am able to get into edit mode and cancel out of edit mode but when I click update nothing happens. I've found a few things online that say to check the "Enable Editing" box in the gridview smart tag but when I go into the smart tag t...

How to update Child grid in asp.net using LINQ

Hi I have an asp.net page where i am using LINQdatasource to bind grid. Now whenever, if some one changes something in grid I want to update a history table. which is also shown as child grid for each row Let say I have a grid with two column Name and Age. it also has a child row with column field and datetime. so when ever if some on...

How to get record value from LinqDataSource via Code Behind

I've got a LinqDataSource that retrieves a single record. Protected Sub LinqDataSource1_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.LinqDataSourceSelectEventArgs) Handles LinqDataSource1.Selecting Dim BizForSaleDC As New DAL.BizForSaleDataContext e.Result = BizForSaleDC.bt_BizForSale_GetByID(e.WherePar...

LinqDataSource question

Is it legal to define a default value for a parameter the way I am in the code below? It keeps throwing an "Input string was not in a correct format." error for me. Is there a different way I should be doing this? <asp:LinqDataSource ID="lds_numbers" runat="server" ContextTypeName="nrm.prop.myDataContext" TableName=...

LINQDataSource and private columns

Hey, I was trying to use a ListView bound to a LinqDataSource to insert to a table where I had a few columns private to the table class (Specifically password columns - only access I want to give outside the class is methods that generate the salt and encrypt the password to store it in 1 go). I gave this a few shots, but I didn't come...

RadGrid does not display filtered data when except when on Page 1.

I have a Telerik RadGrid that is bound to a Linq Datasource. On the intial page load, the data shows up fine in the RadGrid. If I remain on Page 1 and filter the data, it shows correctly. However, if I go to page 2 or 3 or any page but the first 1 and filter the data, it does not display in the RadGrid. I examined the sql that linq i...

LINQDataSource - Query Multiple Tables?

I have a database and I've created a DBML Linq-to-SQL file to represent this database. I've created a new aspx page and dropped a linqdatasource and a formview control onto it. When I configure the linqdatasource it gives me the choice only to select * from one table...but I want to pull from multiple tables. e.g. I have tables like simp...

ASP.NET GridView Sort?

I'm performing a query with a sort in the Selecting event of the LinqDataSource. I'm then casting my query to a list and assigning it to the result. I'm using this data source in an ASP.NET gridview. I can see the list is sorted but when the ASP.NET gridview does not seem to be respecting the sort order. How can I get the gridview to r...

Databinding multiple tables linq query to gridview?

My question is how can I display a linq query in a gridview that has data from multiple tables AND allow the user to edit some of the fields or delete the data from a single table? I'd like to do this with either a linqdatasource or a linq query. I'm aware I can set the e.Result to the query on the selecting event. I've also been able t...

Gridview with linqdatasource refreshing view?

I've a gridview bound to linqdatasource1 and a details bound to linqdatasource2 (for searching). When I update the data on detailsview, my gridview is not updating. I've tried handling various gridview events and databinding the gridview in code but it doesn't seem to work. ...

On ASP.NET ListView with LinqDataSource, display the data when the search button clicked.

Hi all, I have a ListView setup with LinqDataSource and a button that triggers search function. To avoid display data on page_load, I set ListView's DataSourceID in the Click event of the search button, bind it and set result data in LinqDataSource's Selecting event. It works as I expected but It does't look pretty to set DataSourceId i...

When rebinding Repeater for 2nd time (1st in Page_Load, 2nd in Page_Prerender) duplicate rows appear

I have designed a user control to present a list of questions to the user. This "question list" control just contains a repeater. There are a wide range of types of question and form fields that must be used to answer the question, so they are implemented as a range of "question input" controls which are dynamically loaded into the ItemT...