473,770 Members | 5,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Enabling Edit template in formview by program

Hello,

I want to enable the edit template in a FormView from program. How can I
do this?

The FormView bound to a table and I don't want that it do the
edit/add/delete but I control when it can do this.

It seems there is no method in FormView that force it to show its edit
template instead of item template.

Regards


Sep 28 '07 #1
1 1740
Set the GridView's EditIndex property to the index of the row to edit.

-Mike Placentra II

On Sep 28, 6:15 am, "mans" <(myname_here)_ 123...@yahoo.co mwrote:
Hello,

I want to enable the edit template in a FormView from program. How can I
do this?

The FormView bound to a table and I don't want that it do the
edit/add/delete but I control when it can do this.

It seems there is no method in FormView that force it to show its edit
template instead of item template.

Regards
Sep 29 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8743
by: P. Yanzick | last post by:
Hello, I am creating an edit template for a FormView control, changing one of the textboxes to a dropdown box. The dropdown will be populated from a simple table with the primary key, and a description (i.e. a colors table, so there is a colors ID and a color description). The data source the FormView is pulling data from stores (in this example) the primary key for the colors table. My ultimate goal is when the FormView goes into...
3
4474
by: Dabbler | last post by:
What is the best way to have a FormView page open on a specific row selected from a GridView? I'm passing the primary key in the url as in detailview.aspx?mode=edit&pk=42 I'm using an SqlDataSource to bind the FormView to the data. Thanks for any samples or links.
7
4353
by: Lorenzino | last post by:
Hi, I have a problem with bindings in a formview. I have a formview; in the insert template i've created a wizard control and inside it i have an HTML table with some textboxes bound to the sqldatasource of the formview. If i put this textboxes outside the table everything works well, but as soon as i put them inside the table (in order to organize the layout in the right way) they doesn't work. They works only as eval() and not bind()...
2
5588
by: WebBuilder451 | last post by:
I'm working through an example of a formview cortrol. I have bound the control to edit, update, insert, delete stored procs. I have a grid view with a button on it that sets the formview to a recod. It displays fine, except that there is no EDIT button? What could i have done wrong? Also how can you set the current mode to edit? I tried setting the default mode to edit, even but i still get view only. What's going on here? -- thanks (as...
0
1248
by: Chris | last post by:
I have treeview control I want to populate progamatically. It will sit in the edit and insert template of a formview. If I want to reference it with Formview1.FindControl("treeview1") and populate it, which formview event do I put the population code and how do I reference it. When I use the following code I keep getting an object not instantiated error. Dim tw As New Treeview tw = FormView1.FindControl("treeview1") Try to use the...
0
1117
by: Chris | last post by:
I am using the formview control. Within its edit template I have a treeview, which I populate programatically. Initially I had an item template in which I had a button, which triggered the edit template. The treeview was populated with the following code Protected Sub FormView1_ItemCreated(ByVal sender As Object, ByVal e As System.EventArgs) If FormView1.CurrentMode = FormViewMode.Edit Or FormView1.CurrentMode = FormViewMode.Insert Then...
1
6260
by: =?Utf-8?B?QW5u?= | last post by:
Hello, I am using ASP.net 2.0 and I am using templates in a formview control. After I insert a new record, I want the formview Edit template to display with the NEW record that I just inserted. Is this possible and can someone show me some example code in VB. Thanks for your time! Ann
1
1744
by: Chris | last post by:
I have a treeview control, which I use to select a row in a table which will be used to populate a formview. Depending on what node is selected in the treeview I want the formview to be either in update or insert mode. Protected Sub tvwmenu_SelectedNodeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tvwmenu.SelectedNodeChanged ViewState("menuid") = menuid ViewState("parentid") = parentid If menuid <0 Then
1
10274
by: SteveT | last post by:
Before I pull out what little hair I have left, I'm swallowing my pride and asking the Oracles of .Net: I'm trying to set a property in a dropdown list control in a FormView, based on a session parameter. The control is in the edit template of the FormView, which is not visible from the view template. I'm able to change properties of controls on the view template. However, when trying to set them on the edit template the control...
0
9432
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10232
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8891
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3974
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2822
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.