Only Allow One Edit Or Insert In A RadGrid?
Jul 22, 2010
I'm using the Telerik rad grid and I'm allow the user to enter data directly to the grid.
I am using the "EditForms" edit mode and I also allow inserts using the same.
If the user edits a row, then I don't want to allow any other edits or inserts until the current one is complete or cancelled.
View 1 Replies
Similar Messages:
Oct 26, 2010
I'm having a wired problem with Radgrid.. Im using a Radgrid to display some results where the user can edit/update/delete them. I'm using a single SQL Server 2000 table to fetch the results... Not sure why the events are not firing in radgrid. But I am able to do it successfully using the Gridview control... Im using .NET framework 4
Radgrid code
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AutoGenerateDeleteColumn="True"
AutoGenerateEditColumn="True" DataSourceID="SSDS" GridLines="None" Width="844px"
DataMember="DefaultView">[code]....
View 1 Replies
Dec 7, 2010
I have a checkbox column in a RadGrid that I want the user to be able to check/uncheck it and set the attached property. When the grid renders however, the checkboxes are disabled, because the grid is not in "edit mode". All the examples I'm finding want me to go through a lengthy process of selecting the record, putting it into edit mode, changing the value, saving the value.... yada yada yada...I just want the whole grid to be in edit mode (or the column, or whatever works) from the get-go, so the end user can make a one-click change to the data value. I know there must be a way to do this, I just can't seem to find it.
View 1 Replies
May 20, 2010
I have a rad grid where I can insert/update and delete items of data. i have set up a CommandItemTemplate with a button that, when clicked will put the grid in edit mode. What I would like to do is have the same functionality but from an external asp.net button. If I can get this button to trigger the adGrid_ItemCommand event then I could get it working. But how do I pass the relevant GridCommandEventArgs from a asp.net button ?
View 1 Replies
Aug 16, 2010
I have Telerik RadGrid with a custom edit form. In my edit form there is a RadDatePicker to which I have added a custom footer template containing a 'Today' button. In the OnClick event of the button I call a Javascript function which takes the control ID to set the selected date. However, because the control is inside the edit form there is no variable created for it and the compiler throws an error when I try getting the client ID. The RadDatePicker is declared with:
<telerik:RadDatePicker ID="ControlName" runat="server" SelectedDate='<%# Bind("Field") %>'>
<Calendar ID="Calendar1" runat="server">
<FooterTemplate>
<div style="width: 100%; text-align: center; background-color: Gray;">
<input id="Button1" type="button" value="Today" class="button"
onclick="GoToToday('<%= ControlName.ClientID %>')" />
</div>
</FooterTemplate>
</Calendar>
</telerik:RadDatePicker>
The error I get is CS0103: The name 'ControlName' does not exist in the current context on the line referencing the ClientID. Is there another way in which to get the ID to pass to the Javascript function?
View 3 Replies
Mar 30, 2011
I want to take an already existing row in a RadGrid and instead of open an edit template I want to open the Insert template with that data.
I have a requirement to allow the user to make edits to the rows on their "key" values, the result being a new row that they didnt have to type everything over again.
My guess is to put an insert button on the row, but I'm not sure how to open the insert template and still have it bind that rows data to it.
View 1 Replies
May 23, 2010
Using VS2008, and Telerik radGrid version 2010.1.519.35
I have a about 50 DNN modules using telerik radgrid and I need to display my dates in dd/mm/yy format. It is possible to do this easily in view mode, but when I switch to edit mode, it is more of a struggle. I can write a snippit of code to reformat the displayed date values to dd/mm/yy, but for inserts the user must enter mm/dd/yy.
IOW, I need to change the culture of the form to en-GB culture.
In my DotnetNuke App, I have made a change to the web.config, but it still assumes en-US format.
I am not sure whether I need to set this at web.config level, page level or at the column within the control.
View 3 Replies
Mar 11, 2011
accessing the currently edited existing row in the Radgrid, as as well as the index of the Edit form when trying to add a new record to the table/
function OnClientSelectedIndexChanged(sender, eventArgs) {
var item = eventArgs.get_item();
// alert(item.get_value());
grid = $find("<%= rgSecurity.ClientID %>");
[Code]....
View 1 Replies
Jul 23, 2010
I have a radGrid on the page with the "Add New Record" button. When I click the "Add New Record" button, a textbox appears above each column that allows me to enter values. I want to limit the number of characters that can be entered in the textbox. How do I set the MaxLength of those textboxes
View 1 Replies
Nov 6, 2010
I have a RadGrid which has a column like:
<telerik:GridTemplateColumn HeaderText="Car" >
<ItemTemplate>
<asp:Label ID="MakeLabel" runat="Server" Text='<%# Eval("Make") %> />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="MakeTextBox" runat="Server" Text='<%# Bind("Make") %> />
</EditItemTemplate>
</telerik:GridTemplateColumn >
and I'm wanting to set it up so that this column will allow input when inserting new values but won't when updating values.
View 2 Replies
Mar 22, 2010
After I use FormView in InsertMode and the record is added, I want it to switch directly to EditMode.
I assume I would place this command in this action:
protected
void FormView1_ItemInserted(object sender,
FormViewInsertedEventArgs e)
However, I can't find the correct command to issue.
View 3 Replies
Oct 29, 2010
I added a RequiredFieldValidator to my InsertItemTemplate, and it seems to be working fine. The problem I am having, however, is that now I cannot do anything else in the ListView (like edit or delete items) UNLESS the required field has a value. Is there some way I can manually do the validation when the user clicks the 'Insert' button on the InsertItemTemplate, or some other little trick I can perform so the user doesn't have to first type in a value just to delete something else in the list?
View 1 Replies
Feb 26, 2010
I have a DetailsView with several fields. On the same page, I have both LinkButton that enables to go in edit or insert mode for the DetailsView.
When I click on a button, linked code-behind is doing the following :
switch (buttonCmd.ID)
{
case "cmdEdit":
DetailsView1.ChangeMode(DetailsViewMode.Edit);
break;
case "cmdInsert":
DetailsView1.ChangeMode(DetailsViewMode.Insert);
break;
This kind is working fine in another page from the site website but not on this one... Probably a bad copy-paste
View 1 Replies
Dec 23, 2010
I would like to change the layout of the edit and insert templates to show multiple columns (instead of the default 1), and make the required fields show in the first column. Please point me in the direction I need to go.
View 1 Replies
May 26, 2010
How can I get the login username to be passed to a field in a gridview on edit or insert? Do I need to convert the gridview field to a template? I have been able to pass the login name to the database in a form by using "AddWithValue("UserId", Data.SqlDbType.VarChar).Value = User.Identity.Name" but I can't figure how to bind the login name to a template field.
InsertCommand="INSERT INTO [Address] (AssocId, [AddrType], [PreAddr1], [PreAddr2], [Address1], [Address2], [City], [State], [Zip], [Country], [PreferredAddr], [ActiveStatus], [EditDate], [Editor]) VALUES (@AssocId, @AddrType, @PreAddr1, @PreAddr2, @Address1, @Address2, @City, @State, @Zip, @Country, @PreferredAddr, @ActiveStatus, GETDATE(), @Editor)"
[code]...
View 11 Replies
Aug 17, 2010
I would like to set the one template for edit/insert and view in my custom FormView control . But i got these odd exception Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.Table'.
public class CustomFormView : FormView
{
[PersistenceMode(PersistenceMode.InnerProperty), TemplateContainer(typeof(FormView), BindingDirection.TwoWay)]
public IBindableTemplate FormTemplate { get; set; }
protected override void OnInit(EventArgs e)
{
ChangeMode(FormViewMode.Edit);
if (FormTemplate != null)
{
if (CurrentMode == FormViewMode.Edit)
{
FormTemplate.InstantiateIn(this);
}
}
base.OnInit(e);
}
}
edited :
in the first step , I created the new user control and added a formview ("FV")
public partial class Form : UserControl
{
private IBindableTemplate _template = null;
[PersistenceMode(PersistenceMode.InnerProperty),
TemplateContainer(typeof(FormView), System.ComponentModel.BindingDirection.TwoWay)]
public IBindableTemplate FormTemplate { set;get }
protected void Page_Init()
{
if (FormTemplate != null)
{
FV.InsertItemTemplate = FV.EditItemTemplate = FormTemplate;
if (!IsPostBack) FormTemplate.InstantiateIn(FV);
}
}
}
Now , I want to convert this user control to web control.
View 1 Replies
Jan 29, 2010
Lot of times I did edit, delete, insert in my webproject in different pages but I am very surprised that why I am not remembering the technique to do these task. Actualy I never take any course on asp.net/vb.net, what I did in my project just to take help from forum or asp.net website etc. I get a task again to make a web interface having functionality to view data and provide Edit functionality also. The other task is to click a link in the same page to open a new page with the fields of the same table to insert new record.
Q1: Is it necessary to take a dataset or I simply do it using sqlDatasource?
Q2: Could anyone give me a very basic and simple vb.net/asp.net project with all above tasks so that I will do a practice project and never miss it?
View 2 Replies
Mar 9, 2011
I am trying to add insert Anchor component to the FreeTextBox editor.Also, I see in the .net cpmponet there is a Microsoft Office Component BookmarK. How can I add it and use it.Either of the two will work for me.
View 2 Replies
Jul 18, 2010
For ASP.NET, I'm using a DetailsView for insert and edit of a record. For edit mode I don't want to display the primary key field because it should not be changed. For insert mode, I want to display the primary key field because it doesn't exist and the user can specify it via a DropDownList that insures they will pick an unique value. A TemplateField is used in the DetailsView markup for the primary key field (hence the DropDownList for insert mode).
My problem is that I cannot get the primary key field to not display for edit mode and to display for insert mode. In the markup I have:
<asp:TemplateField HeaderText="name" InsertVisible="True" Visible="True">
<InsertItemTemplate>
<asp:DropDownList ID="ddl2NonMembers" runat="server"
Width="155px"
Sourceless="sqlNonMembers"
DataTextField="name"
DataValueField="id_adm"
SelectedValue='<%# Bind("member_grp") %>'>
</asp:DropDownList>
</InsertItemTemplate>
</asp:TemplateField>
With the TemplateField Visible="True", the HeaderText="name" always displays which I don't want for edit mode. With the TemplateField Visible="False", the field never displays which I don't want for insert mode.How can I achieve the display behavior I want for insert verses edit mode. I'm fine with changing some property programmatically rather than relying an a pure markup approach,
View 1 Replies
Nov 30, 2010
I want to hide some fields, so that the user can't put value for them on insert and edit pages, and I will give these fields default values on code behind later.
I want to hide these fields just in insert pages but want to see them on the list pages, such as the createdAt column.
View 1 Replies
Jan 5, 2010
I have a ListView Which displays Customer, product, price, Quantity and comments from database.The User can either edit it or Insert new items. In Edit Item template and Insert item template, i need to add a image button next to the textbox, which when clicked, will display a pop up window with list of customers or products.I have been doing it with the normal aspx page with textboxes. I use click handler to pop up the windows.i'm not able to do with listview Please help to give a solution to it.How else can i add an image icon and click it and get the values back to the textboxes?i will post what i'm doing without listview first and then the part of the relavant code of Listview.
View 2 Replies
Jan 13, 2010
I have placed an AJAX Control Toolkit (version 3.0.30512.1) HTMLEditor inside a ModalPopup. Everything works fine except when you click the 'Insert/Edit URL Link' button. The resulting 'add a link' popup moves to the extreme bottom right of the ModalPopup - and drastically shifts the HTML Editor. This happens in Firefox, IE8 and Chrome so far. A screenshot to illustrate this is shown at the bottom of this message.
Secondly, as you can also see on this screenshot, there is a lot of white space below the HTML Editor before the Horizontal Rule - there are no other HTML tags between the HTML Editor and the Horizontal Rule. This space only 'closes up' if I increase the height of the HTML Editor - it does not reduce automatically.
View 4 Replies
Oct 11, 2010
I got a problem about finding controls in Edit/Insert Itemtemplate inside a DetailsView.Here is the code.I put a Label (id= "Label6") to test whether the findcontrol method works or not. Unfortunately, I almost tried every means but still coudn't find it.
[Code]....
View 2 Replies
Apr 12, 2010
I did the data access tutorials on this site.They used validation controls for the insert and the edit template fields. Each of these used their own validation summary control. The markup for them is below. Can I use the same validation summary control for both the insert and the edit validation controls? It seems redundant if i can set the Validation Group property to the same value then I would only need to use one validation summary.I don't know if this is allowed, or a good idea though.
[Code...]
View 1 Replies
Mar 26, 2010
Is there a way to create only the InsertItemTemplate in the FormView and then assign it to EditItemTemplate. Something like
Page_Load
{
FormView.EditItemTemplate = FormView.InsertItemTemplate;
}
View 4 Replies