AJAX :: How To Update Reorderlist When Using DataSource Instead Of DataSourceID

Jan 27, 2010

Instead of using DataSourceID I have a DataSource built up in codebehind that I bind to the reorderlist. I have set "PostBackOnReorder=True" but how do I update the database on that postback? How do I collect the new order and then save it to the database?

View 1 Replies


Similar Messages:

AJAX :: ReorderList: No Error But Not Update?

Sep 13, 2010

i want to reorder my products. and my table is like below:Products:

id,ProductName,ProductImage,PositionNumber,IsActive,AddedDate

and my aspx page is like below:

[Code]....

i can drag and drop the products but when i come to this page again i saw that there is nothing change there is no error however no update my positionnumber and i dont know why?

View 1 Replies

AJAX :: ReorderList Not Triggering Update Oracle?

Nov 15, 2010

I have been strugling with this for a while and not gettting anywhere fast.I am trying to make a reorderable list using the AjaxtoolKit control ReorderList.It compiles fine and the select works, the problems come with the updates. When I try and reorder I get the following javascript warning: "Reorder failed, see details below.Couldn't find sort field 'ItemPos' in bound data."On investigating I can see that the update command it not being triggered. I can even remove it from the file code and nothing changes.So anyone any ideas what I do? I feel I need a handler in place but I cant seem to get that one figured out.The base code was taken from the toolkit examples and there is no code behind.Code Below:::::

[Code]....

View 4 Replies

AJAX :: ReorderList Doesn't Fire Update Event?

Jan 12, 2011

I have my ReorderList setup, and it seems to work. It doesn't give me any errors, and it allows drag/drop of the entries.

BUT, it never updates my datasource. I have tried putting breakpoints on the update events, both on the reorder list, but also on the datasource, none fires.

What could i possibly do wrong, to achieve this?

Here's my code, just in case:

[Code]....

[Code]....

View 3 Replies

C# - Both DataSource And DataSourceID Are Defined Error Using With GridView

Jan 26, 2011

But it's different situation on gridview.

<asp:GridView ID="Grid_Goster" runat="server" AutoGenerateColumns="False" CellPadding="4"
DataSourceID="SqlDataSource3" ForeColor="#333333" GridLines="None"
Height="144px" Width="316px">
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>"
SelectCommand="SELECT * FROM [AVUKAT]"></asp:SqlDataSource>

And i get error like this: Both DataSource and DataSourceID are defined on 'Grid_Goster'. Remove one definition. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Both DataSource and DataSourceID are defined on 'Grid_Goster'. Remove one definition. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using And in my .cs file there is code like this.

SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
Grid_Goster.DataSource = dr;
Grid_Goster.Visible = true;

i think this code works correctly. How can i solve this DataSource and DataSourceID problem?

View 3 Replies

Get The DatasourceID Of The Datasource That's Firing The OnSelecting Event?

Mar 11, 2011

I have a couple different sqldatasources on an asp.net page that all fire the same onSelecting Event Handler. The reason for this is because the same code in the event handler can be applied to all datasources (which essentially generates filters in the queries dynamically). However, now I have another datasource that can still use most of the code, but needs to be handled slightly differenty. I could do this very easily if I could reference the datasource's ID that is firing the event (which I've tried), but this doesn't seem to be possible. Here is what I initially attempted to do:

protected void sdsTable_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
SqlDataSource sds = sender as SqlDataSource;
string dsID = sds == null ? "" : sds.ID;
if (dsID == "aDataSourceID")
{
//do this
}
else
{
//do that
}
//more code
}

This didn't work because sender is of type SqlDataSourceView and trying to cast sender as SqlDataSource returns null. So, I changed it to SqlDataSourceView:

protected void sdsTable_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
SqlDataSourceView sds = sender as SqlDataSourceView;
string dsID = sds == null ? "" : sds.Name; //Tried Name property because ID isn't available
if (dsID == "aDataSourceID")
{
//do this
}
else
{
//do that
}
//more code
}

But this still doesn't work. SqlDataSourceView doesn't seem to have a property available that gives the datasourceID of the datasource that is currently firing the event. There is a SqlDataSourceView.Name property, but this is something different. Does anyone know if it is possible to get the ID of the DataSource firing the Selecting event when that event is being handled? If so, can you provide an example on how to do this?

View 1 Replies

Forms Data Controls :: Remove Either DataSource Or DataSourceID?

Nov 5, 2010

How do we remove either DataSource or DataSourceID from FormView2?

Code behind reads:

[Code]....

View 3 Replies

C# - Both DataSource And DataSourceID Are Defined On Listview, Remove One Source?

Jan 26, 2011

I'm getting the following error, ever since I moved my DataTable to a different function. Both DataSource and DataSourceID are defined on 'TestView'. Remove one definition.By all means if you have tips on style / standards, I welcome that as well, I am very new to aspx coding. Any idea what could be causing this? It wasn't happening before when it wasn't its own function. Is it a local variable problem?

Here's the code for the code that binds and is highlighted in the error:

testDAO tda = new testDAO();
DataTable testTable = new DataTable("TestView");
testTable = tda.GetTestTable();
TestView.DataSource = testTable;
TestView.DataBind();

Here's the code for the GetTestTable():

public DataTable GetTestTable()
{
DataTable testTable = new DataTable("TestView");[code]....

List view in aspx file:

<asp:ListView ID="TestView" runat="server">
<ItemTemplate>
<tr id="row" runat="server" class='<%# Container.DataItemIndex % 2 == 0 ? "row" : "altrow" %>'> [code]....

View 2 Replies

Forms Data Controls :: Both DataSource And DataSourceID Are Defined On 'DataList1'?

Nov 9, 2010

I receive the error (Both DataSource and DataSourceID are defined on 'DataList1'. Remove one definition) in the following code. Could anyone help me sort this out. I do not have anything named DatasourceID that I can find.
[code]...

View 2 Replies

Data Controls :: Both DataSource And DataSourceID Are Defined On GridView1 - Remove One Definition

May 7, 2015

When i click for bug an aplication.

it's always show this a notification

{"Both DataSource and DataSourceID are defined on 'GridView1'.  Remove one definition."}

view on browser application

Line 33: Line 34: GridView1.DataSource = dtLine 35: GridView1.DataBind()Line 36: End SubLine 37:

This is an my vb code

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
Me.BindGrid()
End If
End Sub
Private Sub BindGrid()

[Code] .....

View 1 Replies

Forms Data Controls :: DataSource And DataSourceID Are Defined On 'GridView1'. Remove One Definition?

Jul 23, 2010

I'm working on two gridviews , each one binded to an sqldatasource object,when I want to modify the 2nd gridview (DataSource=DataTable) an error fired !Both DataSource and DataSourceID are defined on 'GridView1'. Remove one definition.

View 4 Replies

Data Controls :: ListView Already Bind With DatasourceID - Cannot Bind It With Datasource

Oct 13, 2013

I have connected listview by using datasourceid that means by using "sqldatasource1" now i want to change value of listview at run time according to search so for that i am using datasource at codebehind. but it give an error 

"listview have already bind with datasourceid you can not bind it with datasource"

what should i do for solving my requirement.

View 1 Replies

AJAX :: ReOrderList Not Dragging?

Mar 29, 2010

Trying out the reorderlist AJAX control and having little satisfaction. I followed the Joe Stagner tutorial [URL]

<ajaxToolkit:ReorderList ID="ReorderList1" runat="server"

View 1 Replies

AJAX :: Reorderlist Not Reordering?

Aug 29, 2010

[Code]....


Reorderlist not reordering

View 3 Replies

AJAX :: ReorderList Is Not Updating?

Mar 27, 2011

Im using LINQ2SQL

I have a reorder list that does not throw exeptions. But when i reorder the items the changes are not saved.

Im publishing the reorder asp tags and 2 methods that take care of the saving.

Maybe im not thinking straight with the LINQ 2 SQL?

ASP tags

[Code]....

******* CODE BEHIND METHOD **************

[Code]....

************ Database management method **************

public static void UpdateLinks()
{
db.SubmitChanges();
}

View 1 Replies

AJAX :: Add Item To Reorderlist?

Feb 25, 2011

I'm trying to add an item to the Reorderlist dynamically using the following code but nothing gets displayed.

Server Side Code: FieldInfo field = new FieldInfo(); field.FieldId = 1; field.Alias = "Text"; _selectedFieldsListBox.Items.Add(new ReorderListItem(field,_selectedFieldsListBox.Items.Count,ListItemType.Item));
Client Side Code: :

what I'm doing wrong? Or has anyone done this before?

View 2 Replies

AJAX :: Number Of ItemTemplate In Reorderlist?

Apr 2, 2010

Is there any way to get the number of ItemTemplate(rows) in Ajax Reorderlist by javascript?

View 1 Replies

AJAX :: Creating Reorderlist Programmatically?

Aug 18, 2010

I hope to get some guidance on how to create reorder lists programmatically because of the situation described below.I have a page where I want to have a toDo Iist for each of several (typically 10) milestone categories. I can think of 3 options.I don't know in advance how many 'active' categories there will be but I there is a known fixed total of about 20 categories, of which from 1 to 20 may be 'active'1. Have one Master ReOrderList And Then Nest the Category ReorderLists Inside 2. Create the reorderlists programmatically.3. Brute force approach. Hardcode all 20 reorderlists and their associated sqldatasources, and then set visibilitydepending on which category is active. This approach is the simplest but has the disadvantage of too muchrepetitive code and the reorder lists would be in a fixed order, when I really want them to match the category order.

View 3 Replies

AJAX :: Enter New Value Into ReOrderList From A Dropdownlist?

Aug 8, 2010

[Code]....

enter new value into ReOrderList from a dropdownlist?

View 1 Replies

AJAX :: ReorderList Reordering On Click?

Jul 12, 2010

I am having an issue where if I simply click the draghandle (no mouse movement) the list is reordering itself by swapping the row I clicked on with the row below it. The sample site doesn't behave this way at all so I am at a loss. One thing I also noted that's different is that when i click the drag handle, the draghandle temple (dashed box) appears on the row below the clicked row. In the samples the dashed box appears on the clicked row.

The ReorderList:

[Code]....

The CSS:

[Code]....

Edit: Using VS 2008, .NET 3.5 and the ToolControlKit dll version: 3.0.30930.0

View 4 Replies

AJAX :: Checkbox In Reorderlist Can't Be Checked In IE?

Feb 6, 2010

I am using the AJAX ReorderList, and inside the ItemTemplate I have a label and a checkbox. Now when in firefox I am able to change the checkbox checked state, but in IE it won't allow me to do anything with it. Its weird because the checkbox becomes that blue colour like when it gets focus, but it won't put the check in it or call the postback. The ReorderList is inside an UpdatePanel, so that I can monitor when the check changes on its postback. Below is the code:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table>
<tr>
<td colspan="2">

[Code]....

View 2 Replies

AJAX :: ReorderList Can't Be Saved To Database?

Jan 16, 2010

I followed the following linkhttp://weblogs.asp.net/justinsaraceno/archive/2008/02/22/reorderlist-with-objectdatasource.aspxand manged to make the orderlist work fine except one thing and probably the most importent thingwhich is saving the reorder back to the databasewhat I changedfirst I'm using it as a c# web form inside a visual basic.net website. Is this OK?second I changed the connectionString to point to my database wich is in SQLEXPRESS ( NOT ATTACHED in App_Data inside the website as the example shows)third I changed the select and update statements and parameters to my needsafter all that it works but without saving the reorder back to databaseReorderClass.cs

[Code]....

View 2 Replies

AJAX :: DataList Not Being Refreshed When ReOrderList Changes?

Aug 8, 2010

[Code]....

DataList Not Being Refreshed When ReOrderList Changes


View 1 Replies

AJAX :: Drag Item From ReorderList A And Drop On B

Apr 21, 2010

I need to create a table where every item in the cell can be drag and drop among themselves and and also drag and drop to other cell. I am thinking to create a ReorderList for every table cell but it come to a problem where I need to drag item from 1 ReOrderList to another ReOrderList when I need to drag the item in the cell to another cell. I have find through the internet but find no solution.

View 4 Replies

AJAX :: Reorderlist And The Horrible 'compatibility Mode' In IE8?

Jan 18, 2011

I have created an intranet site that has a reorder list.IE8 defaults to running intranet sites in compatibility mode. My reorderlist does not like this. Basically the drag/drop function goes away.

Now, i have tried adding the <meta
http-equiv="X-UA-Compatible" content="IE=8" /> but it does not fix it. It fixes most of my issues, but not the drag/drop.If i tell the browser to NOT use compatibility mode, everything seems to work as intended, but there is no way i can force all the users to disable it.

View 2 Replies







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