Implementing Custom Delete By Adding To My ASPxGridView GridViewColumnCustomButton?

Sep 2, 2010

Im implementing custrom delete by adding to my ASPxGridView GridViewColumnCustomButton.

Then on my GridView I handle ClientSideEvent

<ClientSideEvents CustomButtonClick="function(s, e) { customButton_OnClick(s, e); }" />

JS:function customButton_OnClick(s, e) {
if (e.buttonID == "customButtonId") {
e.processOnServer = confirm("Really want to delete?");[code]....

now on the server side I user linq to delete specified row and then submit changes to my DataContext and then DataBind() on my grid.

Problem is that sometimes standard ASPxGridView loading panel is shown for about 1 second ant then my row dissapears so it behaves properly but sometimes loading panel stops mooving. and I need to move mouse over my grid or click button so that my Grid is updated(row dissapears).

View 2 Replies


Similar Messages:

Implementing A Red Cross - Check Box In The Selection Column Of The ASPxGridView Or General GridView

Mar 18, 2011

I am currently using DevExpress ASPxGridView and want the selection check box to show a redcross image on selection or empty when unselected. Is there any javascript library to do such a thing. If so can you provide me an example.

View 1 Replies

ASPxGridView -Custom Controls In DetailRow?

Feb 12, 2010

try to have custom controls in a DevExpress grids detail row. When ever a row is expanded I would like to load data into those custom controls based on the Masters Key.I am using the detailrow expended method.

protected void grid_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e)
if (e.Expanded)
{
int id = Convert.ToInt32(grd.GetRowValues(e.VisibleIndex, "ID"));
...
}

The problem is I don't know how to access the custom controls in the expended detail row. I don't see any Row or Items properties on the grid, which would have been with a FindControl().

View 1 Replies

Custom Sort In ASPXGridView Not Working With Paging?

Nov 2, 2010

I've implemented a custom sort for a aspxgridview, following the steps mentioned here: [URL]

However, I've noticed that it only sorts the current active page, so whenever I go to another page I have to click again on the column to sort it.

Is this behavior correct, or am I missing something? How can I solve it?

PS: I thought about capturing the PageIndexChanged event and manually sort the active page, but that seems too hackish...

View 3 Replies

Custom Server Controls :: Implementing An Interface From A Class Library In A Custom Control?

Jul 8, 2010

I'm building an n-tier application, with the web client and the class library separate. I'm also using the factory pattern of development, using interfaces to act as containers for different objects they are associated with. The problem I'm expreriencing is that I declared a public interface class in the class library and I can create an instance of it in in my aspx pages but whenever I declare it in my custom control code-side, i get an error, like so:

Error 20 The type or namespace name 'IContentMaker' could not be found (are you missing a using directive or an assembly reference?)

notge that I have inherited the class library namespace using the 'using' keyword just in case you are wondering. My code is like so:

using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using TQO_Classes ; //importing the class library project
public partial class PageContentMgr : System.Web.UI.UserControl
{
private IContentMaker _data; //this line throws the error, it works fine on aspx pages

View 1 Replies

JQuery :: Implementing The Listview Control With Delete Link And Lightbox?

Nov 8, 2010

[Code]....

Implementing the listview control with delete link and lightbox?

View 1 Replies

Custom Server Controls :: Implementing PostBackUrl Feature In A Custom Server Control?

Dec 20, 2010

I've build a custom server control inheriting from WebControl. Basically it is a kind of button. All is working perfectly except one thing: the PostBackUrl is inoperative.

I probably forgot to implement something. Actually I just added the property PostBackUrl. Probably I should also implement an interface of call something.

View 4 Replies

Implementing Custom MappingSource?

Mar 18, 2010

I am looking at implementing a custom MappingSource as side project. It needs to be something along the lines of AttributeMappingSource and XmlMappingSource, except that it won't be using attributes or xml. This has been a problem so far. All the documentation I've seen uses these two, and only these two. I know how to define the new classes and implement the abstract methods, but there are a few problem. Let's take a look at the mapping source first:

public class CustomMappingSource : MappingSource
{
protected override MetaModel CreateModel(Type dataContextType)
{
// it is suggested to create a new metamodel and pass in
// the current metamodel held in the datacontext.
return new CustomMetaModel(GetModel(dataContextType));
}
}

Ok so far, except that it's a new generic context, and no model exists yet. For example, I want to be able to do this:

DataContext = new DataContext(connectionString, new CustomMappingSource());

Now let's look at one of the CustomMetaModel's overriden methods:

public override MetaTable GetTable(Type rowType)
{
// there are no methods or collection exposed in 'this' to
// add, remove or alter the table mappings.
}

How do I do this? as you might be guessing at this point, I am looking into building a FluentMappingSource. NO! Don't point me to FluentLinqToSql. I have it and their mapping source isn't even derived from MappingSource.

View 1 Replies

C# - Implementing A Custom Section In The Web.config File?

Jun 19, 2010

I've been working on implementing a custom section in the web.config file for a little something I'm working for the past few hours, but I can't seem to get it working. The following is what I'd like to use as my XML structure:

[code]....

View 1 Replies

Web Config - Implementing A Custom Error Page On An .Net Website?

Jan 29, 2010

I have an ASP.Net website and I want to use a custom error page. I put the following code in my web.config

<customErrors mode="On" defaultRedirect="~/error.aspx">
<error statusCode="404" redirect="~/error.aspx" />
</customErrors>

The problem is when i go to a URL that does not exist is still uses the 404 error page specified in IIS Manager.Question: How can I make it use the error.aspx page I have created? Why do the settings in IIS Manager override the web.config?

View 1 Replies

Implementing OpenId In Custom Application Where Users Are Created By Administrator Only?

Feb 16, 2011

In my asp.net application, users are created by the administrators & those users need to log-in into the system using their own email/password or openid. So what is the best option to implement in this scenario?

I mean, as users can't register them self,do administrator required to associate each openid with the users & what kind of table structure do I need?

And do I also need the log-in interface like that of [URL] showing multiple types of authentication(default & openid from various providers)?

View 1 Replies

Forms Data Controls :: Implementing A Datagrid With Custom Scroll Bar?

Oct 27, 2010

I am implementing a Datagrid with custom scroll bar(tiny scroller using Javascript).

Here the problem is the Header also scrolls.So how can I make it fixed.

I have one solution like following.

function s()
{
var t = document.getElementById("");
var t2 = t.cloneNode(true)
for(i = t2.rows.length -1;i > 0;i--)
t2.deleteRow(i)
t.deleteRow(0)
Headerdiv.appendChild(t2)
}

Here the header is Fixed(almost problem solved).But the Header columns are not in Correct position corresponding to data columns.

View 9 Replies

Forms Data Controls :: Implementing A Custom GridView To Find A Cell By Its Header Name

Feb 9, 2011

I'm trying to implement a custom GridView to find a cell by its name. Here is my class:

[Code]....

how I can implement the SET part of property?

View 3 Replies

State Management :: Adding A Custom Object In Custom Principal?

Dec 27, 2010

I have Create a Custom Principal and a Custom Identiy for my Web Application and upon forms authentication

1 Create a profile of type object

2 Assign it to the Principal profile

3 assign the principal to the Http.Current.User (this now has the complete profile information )

As i understand upon redirection the principal is recreated and i loose the information i had stored in the profile.

I there a way to persist the profile information ?

I though can achieve persisting some information using FormsAuthenticationTicket in userData but that wouldent solve my purpose ..

View 7 Replies

Adding Checkbox In Listview Control To Allow Multiple Delete?

Mar 5, 2010

I am trying to display checkboxes in front of every row in list view. So that after selecting the desired checkboxes user clicks on delete button and we should delete that records.

but how can it be done?

View 3 Replies

Forms Data Controls :: Adding Delete Command Btn To Gridview

Jan 10, 2010

I have some simple shopping cart using DataTable and Session, all data are in datalist after user click "Add" the record go to gridview. how can i add delete button to delete row from the gridview?

aspx.cs:

[Code]....

aspx (gridview):

[Code]....

View 4 Replies

Custom Server Controls :: Adding Controls To Custom Extended Gridview?

Oct 20, 2010

I have custom gridview that inherit from the regular gridview.

On of the features is that is has a built in page size dropdown in an extra header row.

Another feature is that this extra header row has a place holder where aditional controls can be added but here is where I have some problems.

When I add a control that is created outside the gridview to the gridviews builtin placeholder and tries to do anything that performs a postback the gridview dissepears, but appears again on a new post back.

Here is the code for the gridview:

[Code]....

And this is the way it is used in a usercontrol on page, the gridview is called gvList and the control that I try to add to its placeholder is the phrExtraHeaderControls:

[Code]....

What can be wrong, is the viewstate messed up in the postback so that the gridview can't be rendered?

View 1 Replies

.net - Custom GridView Delete Button

Mar 16, 2010

How can I customize automatically generated command button, e.g. Delete?

I want to add a client confirmation on deleting and in the same moment I want this button would be generated on setting AutoGenerateDeleteButton="true". Is it possible??

I can add a custom button this way:

<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton runat="server" CommandName="Delete" OnClientClick="return confirm('Delete?')">Delete</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>

but it will be not automatically localized and will be not generated on setting AutoGenerateDeleteButton="true"!

View 3 Replies

How To Delete IIS Custom Headers Like X-Powered-By: ASP.NET From Response

Nov 2, 2010

In IIS 7.0 integrated mode after deleting all headers with Response.ClearHeaders() IIS would add some other headers like Server and X-Powered-By which reveals good information to hackers. How can I stop this behavior (consider I still need to add my custom headers) ?

View 2 Replies

Custom Validation Not Working With Delete Buttons?

Oct 11, 2010

In a ListView, I have a CustomValidator set up to validate a field whenever a button with CommandName="Delete" is clicked.

<ItemTemplate>
<asp:TextBox ID="NameTextBox" Text=<%# Eval("Name") %> runat="server" />
<asp:Button ID="DeleteButton" Text="Delete" CommandName="Delete" ValidationGroup="Delete" runat="server" />
<asp:CustomValidator ValidationGroup="Delete" SetFocusOnError="true" Display="Dynamic" OnServerValidate="CustomValidator_ServerValidate" runat="server">You can't delete this.</asp:CustomValidator>
</ItemTemplate>

However, the error message is never displayed and the processing continues. What's strange is that the custom validation method is called, finds the field, and properly sets up e.IsValid to false. It does not matter whether I check Page.IsValid or not, because the error message is not displayed anyway. It works if I remove the CommandName="Delete" from the button.

With Google I found the following solution, which seems to indicate someone has had a similar issue:

[URL]

But I want to make sure that this solution is the way to go. I mean, is custom validation really not supposed to work with a delete button in a databound control, seriously?

View 1 Replies

Custom Server Controls :: Adding Validators To Custom Controls?

Jan 14, 2010

I'm attempting to create a custom control that extends the Table class. Inside of the table will be rendered a number of different controls based on a specified identifying property. On some of these controls, however, I need to specify validation for data types and requirement.To me, the most logical way of doing so is to add validators to the table and set their appropriate properties to specify which controls to validate. In doing so, however, I've discovered that none of the validators added will even render on the page in which the control is added. So is this a valid construct?Here's an example of what I mean:

[Code]....

View 1 Replies

C# - Delete Files When Custom Control Is No Longer Used Any Event?

Mar 24, 2011

I have created a custom control which uploaded files to the server . These uploaded files list that is the name of the file and the file path i save in a session and the files i save to a temp directory .

Now, I want to delete these files as well as clear the session when this control is no longer used .How do i find whether the control is no longer used in the page . I should be doing this from the Custom control and not from the Page ?

View 1 Replies

Custom Password Control To Confirm Update / Delete?

Aug 17, 2010

I have been trying find a way, where whan a basic user wants to reset a record due to a typo. The use has to get a admin to enter there user password to confirm the update. this is based on a sql server 2008 DB that will execute a stored procedure to perfom the reset update. I am coding in c# working on a 3.5 framwork. I have seen thare a many confirm popup message box options but none for a password to confirm.

View 2 Replies

C# - Gridview Insert Delete With Custom Objects In Viewstate?

Dec 10, 2010

I want to design a nested gridview with insert, update, delete functionality through custom business objects dynamically inside viewstate.

(Master Gridview)
EmployeeID EmployeeName
1 Ted
(Child Gridview)
ItemID ItemName
1 Keyboard
2 Mouse
2 John
(Child Gridview)
ItemID ItemName
1 PSU
2 GPU
3 Printer

I have done this in the past with datatable/dataviews but they are a real memory hog.

How do I implement Master/Detail functionality with business objects ? What is the alternate to Dataview in master detail/business objects.

I know its a rather broad question but its worth getting started on something =)

View 2 Replies

DataSource Controls :: Using Dataadapter For Custom Add / Delete Of Database Table

Feb 12, 2010

My code is not updating the sql database. I am definately passing the correct information in to this function, and it runs without errors. If I exec the procedure with the passed in data, it works great. Can someone tell me what is missing?

public DataTable UpdateEmailList(int listId, string connectionString, DataTable EmailList)
{
//DataTable dt = new DataTable();
SqlConnection conn = new SqlConnection(connectionString);
conn.Open();
SqlDataAdapter da = new SqlDataAdapter(null, conn);
SqlCommand cmd = null;
//add
cmd = new SqlCommand("dbo.fp_ServiceAwards_AddEmailToList", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@emailList_id", SqlDbType.Int)).Value = listId;
cmd.Parameters.Add(new SqlParameter("@email_address", SqlDbType.NVarChar, 255, "email_address"));
cmd.Connection = conn;
da.InsertCommand = cmd;
//delete
cmd = new SqlCommand("dbo.fp_ServiceAwards_DeleteEmailFromList", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@emailList_id", SqlDbType.Int)).Value = listId;
cmd.Parameters.Add(new SqlParameter("@email_address", SqlDbType.NVarChar, 255, "email_address"));
cmd.Connection = conn;
da.DeleteCommand = cmd;
try
{
da.Update(EmailList);
}
catch (Exception ex)
{
string msg = ex.Message;
}
conn.Close();
conn.Dispose();
return EmailList;
}

View 3 Replies







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