EditItemTemplate control = ItemTemplate control - DataGrid

Hi Friends!

I have a CheckBoxList inside a DataGrid template column (ItemTemplate). When ItemDataBound event is raised, this CheckBoxList is populated. As follow bellow:

Private Sub grdUsuarios_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles grdUsuarios.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
Dim chlFilaisUsuariosDGRow As CheckBoxList = e.Item.FindControl("chlFiliaisUsuario_EditItem")
chlFilaisUsuariosDGRow.DataSource = dtFiliais
chlFilaisUsuariosDGRow.DataValueField = dtFiliais.Columns(0).ColumnName
chlFilaisUsuariosDGRow.DataTextField = dtFiliais.Columns(1).ColumnName

I need to edit this DataGrid. When I click on edit button, I need to have THE SAME CheckBoxList in EditItemTemplate, with all data. How can I do it?

10/27/2004 5:29:18 PM
asp.net.mobile_devices 3052 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 51


Similar Artilces:

Custom Control within a Control Control
I am developing a custom controls that will render headers for different web sites. Within these controls, I want to place another custom control that will change the language. I created the language control and had it implement IPostBackDataHandler. This control works fine if I drag it on a new web form, but if I tell a header custom control to render it problems occur. The Language Selector custom control does not have a Page member anymore and the event handlers do not work. Does anyone have any experience with doing something similiar? Anyone have any suggestions? Thanks, ...

How do I control one control from another control?
I have a page page1.aspx which is within a master page. On page I have a table with two cells. Within each cell I have placed two controls (ascx) that I have developed. Now I'd like to be able to get these two controls to interact. One needs to update the other. One has some search criteria that the other one needs to update its gridview. One needs to make the other visible/not visible at certain times. Out of the box neither control can see each other at all. Is there a good article or someplace I can find some information on how to do this?  AllAboutFocus.com. Information Technolo...

Trouble controlling .net controlls with CSS
 I am trying to control the :hover css property on <asp: Button> controls. Basically the css is working correctly to set the initial look of the button, but nothing is happening when I hover over the button. Here is my code:CSS:.sidebarButton{    width: 168px;     height: 45px;     background-color: #666666;     text-align: left;    font-weight: bold;    font-family: Century Gothic;    font-size: 13pt;    color: White;    border-style: none;  ...

How do you control the placement of controls in a user define control
I have a user define control.  I put the control on the (C# Visual Studio 2008) page where I want them. When I run the program, the controls are all over the page.  How do I place them where they do not move form where I put them? You'll need to study the HTML output and see what it's producing, then start to look at how to do an HTML layout. hi, there are absolute and Relative position in html. I guess you must use relative position. For example, at design-time, you place a TextBox below an Image, at run-time, no matter what size is the image, the TextBox is alway bel...

Trying to load a control into a control from another control
Exactly as the subject states, I'm trying to load a control into another control from a control loaded into a page, I keep getting this error from the code I have below. I've also tried the findcontrol but it keeps coming up null. (67): 'System.Web.UI.UserControl' denotes a 'class' where a 'variable' was expected UserControl ut = ((webcontrols.BrowseItems)UserControl).LoadControl("BrowseItems"); ((webcontrols.BrowseItems)UserControl).pnl_browse_main.Controls.Add(ut); This is how we Load User controls into a content place holder. try { UserCont...

GridView ItemTemplate control as a Target control to PopUPControlExtender
Hi, I am trying to achieve the same user experience as  on Target.com. when user clicks on the Item photo "quick info" button a popup displays the item details in a decent way. Following is my code. I want to show a popup when user click on the Linkbutton which is configured as select command in GridView. I have popup panel is in another update panel. Popup panel contains a datalist. When user clicks on the Linkbutton in Gridview I am fetching the details from DB and showing in PopUp panel. The following code is working for me with few glitches. Since i have given...

What is the real difference between Server Controls and .NET controls?
This was a class discussion question and I'd like to know, what exactly are the differences? Is there a clear answer? .NET framework controls are server controls. The only difference that I can think of is that the .NET controls are part of the FCL (Framework Class Library). HTH,RyanRyan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question...

Making the .NET calendar control as a floating control
Hi, I need to implement the .NET calendar control as a floating control. Is it possible to do that? If so, can you let me know how to do that?With Regards,Saravana Kumar M R  You could use the calendar extender control in the AJAX control toolkit. You can download the toolkit here, and there is a sample here.My Blog...

Architecture: .Net Controls vs. Custom Controls
I'm interested in managing users. i.e. Logins and profiles, etc.My question is, should I be using things like the Login control or should I program these from scratch? I dont like the fact that .NET creates so many things for me. This level of abstraction terrifies me and it feels like I have no control over the code .I've done a few huge sites in Classic ASP (million-hits-per-day type sites) and I'm not sure how robust certain controls are, or when to use them.Is, for example, the Login control aimed at newbies to .NET? Should it be used for the larger projects with thousands of...

DW control in VB. NET custom control
Hi Just attempting to investigate some DW.NET aspects. In regards to building a ancestor object with VB.NET, why is when I create a datawindowcontrol custom control that any reference to it is like (assuming that u_dw is the name of the DW control): custom_control.u_dw.DatawindowObject = "myDW" instead of simply: u_dw.DatawindowObject = "myDW" If I create a .NET custom control with a button on it, I can directly reference the button's methods and properties without having to qualify it with the custom control's name. When I was developing with po...

Add .Net Control to Web Custom Control
 I want to add .NET Control (like: TextBox, Button...) to Web Custom Control.How i can do it? Alphavn That's called a composite control -- "Mark As Answer" if my reply helped you -- Hello Guys What gunteman said, that is one approach and in most cases the right one.But its also possible to add child controls to a Control thats inherit from WebControl itself. Be sure to implement INamingContainer to that inherited Control too, thats the important point of that approach.--Microsoft MVP - Visual Developer ASP / ASP.NET- http://www.aspnetzone.de/blogs/peterbuch...

Energy-Control out of control !
Hello there! Since a while,the energy-saver shuts down the screen after 10 minutes,some time ago,it happens after half an hour,but I didn�t set it up in that orders !It makes me nervous,short time away from the comp,and soon the screen is dark! And the screensaver will not appear any more,too.I tried to enlarge the times in the energy-manager,created a new profile,switched off the laptopmode-service, nothing helps!And it seems,if there is no possibility to set one of the profiles up, they can only be changed,deleted or newly created. Is there really no place to force it to the ...

Control In Control Problem
Hi, guys.I've written two web controls for reservation system.One is a Datepicker which alows user to pick a date (pretty obvious ) and another one is a Reservation which alows user to pick a location (hotel) and number of rooms and number of people in each room.Both of them inherit WebControl and implement ICallbackEventHandler and INamingContainerI bind to them list with available days... List of hotels and regions (if it's to be used for reservation in hotels chain) well... whatever...Both of them work great while I don't try to include the DatePicker in the Reservation... Her...

Upload control / color chart control / calendar control
Does anyone know of an advanced upload control with all the bells and whistles available? The same for a color chart and calendar control. Thank you, Steve About a chart control you can try one I wrote: WebChart Control It is free. Chart FX for .NET is the most advanced charting control for ASP.NET. You can check it out at www.softwarefx.com --- IG Software FX Yep. But Dundas isn't shabby either. DonDon Kiely, MCP, MCSDIn the Last Frontier, Interior AlaskaPlease post questions and replies to the forum! And remember to MARK AS ANSWER when someone defi...

Control as property in a control
 I'm building a pair of custom web server controls, one which extends GridView, and one that's a composite control that needs to be able to pull some information from the modified GridView.  I'd like to be able to create a property on the composite control that points it to the grid it will be manipulating so that the process can be relatively transparent and require minimal code on the page level. In other words, I want to define my controls something like this:  <myctls:ExtendedGrid id="grid" runat="server" blah blah blah /> ...

Web resources about - EditItemTemplate control = ItemTemplate control - DataGrid - asp.net.mobile_devices

Resources last updated: 12/7/2015 1:31:30 PM