Showing posts with label inserted. Show all posts
Showing posts with label inserted. Show all posts

Wednesday, March 28, 2012

change the mode of a DETAILSVIEW to INSERT mode as soon as a NEW RECORD is inserted in the

Hi, In ASP.NET 2.0 with AJAX, i have a fairly long-size form. I have lots of DETAILSVIEW on screem inside UPDATEPANELS from AJAX. The postbacks occur corrrectly without updating the entire page.

Now, i want to automatically change the mode of a DETAILSVIEW to INSERT mode as soon as a NEW RECORD is inserted in the DETAILSVIEW.

How can i accomplish this ?

Alex

assuming that detailsview will return to readonly mode, you can set following in load_complete (not load)

If DetailsView1.CurrentMode = DetailsViewMode.ReadOnly Then DetailsView1.ChangeMode(DetailsViewMode.Insert)End If

hope this helps.

Jae.

Change dropdown selectedvalue in usercontrol, in a page.aspx

Hello,

i have a usercontrol (reservas.ascx) with one dropdown list (dropHoteis) inserted in one masterPage.
In my default.aspx, that is a content page of that masterPage...
How can i change the selected value in the dropdown list (dropHoteis) from my default.aspx?

1. In reservas.ascx, i put the Class Public...
2. In Default.aspx.vb, how can i reference the reservas.ascx?? I tryed, but not appear in my @dotnet.itags.org.Imports... why?

Thanks for your help!

From the page you can useMe.Master.FindControl("IdOfUserControl") which will get you the reference to your user control.

-Damien


Hep, ok...

But in my UserControl how can i declare the "function/property" to change the selectedValue of the dropdownlist??

Example:

Public Property DropSelectedValue(ByVal hotelAs String)Set(ByVal value) dropHoteis.SelectedValue = valueEnd Set Get dropHoteis.SelectedValue = hotelReturn dropHoteis.SelectedIndexEnd Get End Property

This not work for me!! :(

throw: Object reference not set to an instance of an object!!


in the usercontrol's code behind write a public property in which you have to set the dropdown list's value. u can then access that property from your page.aspx using the usercontrol name and can set the value of the dropdown list.

Regards & have a nice day ahead