Gridview shows both Edit hyperlink and Commandfield Edit button

I'm a little puzzled why my ASP.NET page continues to show 2 edit options in my Gridview.   I've included a Commandfield Edit Button in the last column of the gridview yet at run time I continue to see the Edit link in the first column.  Note: the link isn't there in Design Mode. 

What's even more puzzling is that this webpage has several AJAX panels within a tab Container (the aforementioned gridview is the first tab) and there are other Gridviews in other tabs that aren't displaying the edit link in the 1st column.

Here is my code ... sorry it is rather lengthy if you wish to look at all the tab panels.

Can anyone see why there is an edit link and edit button for the gridview named grdControl?

PS:  The update works fine using either Edit option.

<%@ Page Language="VB" MasterPageFile="~/Securitization.master" AutoEventWireup="false"

CodeFile="TabDataControls.aspx.vb" Inherits="TabDataControls" Title="Data Controls"

StylesheetTheme="GT" EnableEventValidation="false" MaintainScrollPositionOnPostback="True" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

 

 

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceholder1" runat="Server">

<div>

<fieldset id="headerFieldSet" runat="server">

<legend id="headerLegend" runat="server">Select Controls</legend>

<asp:Label ID="lblControl" runat="server" Text="Data Control:" Width="125px"></asp:Label>

<asp:DropDownList ID="cboControl" runat="server" Width="258px" DataTextField="description"

DataSourceID="objControl" DataValueField="data_control_id" AutoPostBack="True">

</asp:DropDownList>

<asp:DropDownList ID="cboPostDate" runat="server" AutoPostBack="True" Width="258px" DataSourceID="objLogDate" DataTextField="source_system_extract_dt"

DataValueField="source_system_extract_dt">

</asp:DropDownList>

<asp:ObjectDataSource ID="objLogDate" runat="server" SelectMethod="getLogDates"

TypeName="clsDataControl"></asp:ObjectDataSource>

<asp:ObjectDataSource ID="objControl" runat="server" TypeName="clsDataControl" SelectMethod="getAllControls">

</asp:ObjectDataSource>

</fieldset>

</div>

<div>

<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" AutoPostBack="False" >

<cc1:TabPanel ID="TabControl" runat="server" HeaderText="Data Control" >

<ContentTemplate>

<asp:GridView runat="server" ID="grdControl" AutoGenerateColumns="False"

DataSourceID="objDataControl" DataKeyNames="data_control_id,data_control_system_id">

<Columns>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHControlDesc" runat="Server" Text="Control Desc">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblControlDesc" runat="Server" Text='<%#eval("data_control_desc") %>'>

</asp:Label>

</ItemTemplate>

<ItemStyle Wrap="False"></ItemStyle>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHCreatedDate" runat="Server" Text="Created Date">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblCreatedDate" runat="Server" Text='<%#eval("created_dt") %>'>

</asp:Label>

</ItemTemplate>

<ItemStyle Wrap="False"></ItemStyle>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHActivateDate" runat="Server" Text="Activate Date">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblActivateDate" runat="Server" Text='<%#eval("activate_dt") %>'>

</asp:Label>

</ItemTemplate>

<ItemStyle Wrap="False"></ItemStyle>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHInactivateDate" runat="Server" Text="Inactivated Date">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblInactiveDate" runat="Server" Text='<%#eval("inactivate_dt") %>'>

</asp:Label>

</ItemTemplate>

<ItemStyle Wrap="False"></ItemStyle>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHSystem" runat="Server" Text="System">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblSystem" runat="Server" Text='<%#eval("data_control_system_desc") %>'>

</asp:Label>

</ItemTemplate>

<ItemStyle Wrap="False"></ItemStyle>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHSystem" runat="Server" Text="Primary Contact">

</asp:Label>

</HeaderTemplate>

<ItemTemplate>

<asp:Label ID="lblContact" runat="server" Text='<%#eval("full_name") %>'>

</asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:DropDownList ID="cboPrimaryContact" runat="server"

SelectedValue='<%# bind("party_id") %>' DataSourceID="objParty"

DataTextField="full_name" DataValueField="party_id"

Width="216px">

</asp:DropDownList>

<asp:ObjectDataSource ID="objParty" runat="server" SelectMethod="getPrimaryContacts"

TypeName="clsDataControl">

</asp:ObjectDataSource>

</EditItemTemplate>

<ItemStyle Wrap="False" />

</asp:TemplateField>

<asp:CommandField ButtonType="Button" ShowEditButton="True"

Updatetext="Save" HeaderText="Edit Primary" />

</Columns>

</asp:GridView>

<asp:ObjectDataSource ID="objDataControl" runat="server" TypeName="clsDataControl"

SelectMethod="getDataControl" UpdateMethod="updateDataControl">

<SelectParameters>

<asp:ControlParameter ControlID="cboControl" Name="DataControlId"

PropertyName="SelectedValue" Type="Int64" />

</SelectParameters>

<UpdateParameters>

<asp:ControlParameter ControlID="grdControl" Name="data_control_id"

PropertyName="SelectedDataKey(0)" Type="Int64" />

<asp:ControlParameter ControlID="grdControl" Name="data_control_system_id"

PropertyName="SelectedDataKey(1)" Type="Int64" />

<asp:Parameter Name="party_id" Type="Int64" />

</UpdateParameters>

</asp:ObjectDataSource>

</ContentTemplate>

</cc1:TabPanel>

<cc1:TabPanel ID="TabResult" runat="server" HeaderText="Results">

<ContentTemplate>

<asp:Button ID="cmdExport" runat="server" Text="Export to Excel" OnClick="cmdExport_Click" />

<asp:GridView runat="server" ID="grdControlResult">

</asp:GridView>

</ContentTemplate>

</cc1:TabPanel>

<cc1:TabPanel ID="TabTodaysLog" runat="server" HeaderText="Today's Log">

<ContentTemplate>

<asp:GridView runat="server" ID="grdToday" AutoGenerateColumns="False" DataSourceID="objToday"

DataKeyNames="data_control_id,log_activity_id" >

<Columns>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHControlDesc" runat="Server" Text="Control Desc">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblControlDesc" runat="Server" Text='<%#eval("data_control_desc") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHSeverityDesc" runat="Server" Text="Severity Desc">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblSeverityDesc" runat="Server" Text='<%#eval("severity_desc") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHFailureCnt" runat="Server" Text="Failure Count">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblFailureCnt" runat="Server" Text='<%#eval("failure_cnt") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField HeaderText="Log Message">

<ItemTemplate>

<asp:LinkButton ID="linkLogMessage" runat="server" Text='<%#eval("log_msg") %>'

CommandName="Select"></asp:LinkButton>

<asp:Label ID="lblLogMessage" runat="server" Text='<%#eval("log_msg") %>'></asp:Label>

</ItemTemplate>

<ItemStyle Wrap="False" />

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHElapsed" runat="Server" Text="Last Run Time">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblElapsed" runat="Server" Text='<%#eval("elapsed_seconds") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHAvgSeconds" runat="Server" Text="Average Run Time">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblAvgSeconds" runat="Server" Text='<%#eval("avg_seconds") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHReviewedBy" runat="Server" Text="Reviewed By">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblReviewedBy" runat="Server" Text='<%#eval("reviewer_name") %>'>

</asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID ="txtReviewedBy" runat="Server" Text='<%#eval("reviewer_name") %>'>

</asp:TextBox>

</EditItemTemplate>

</asp:TemplateField>

<asp:BoundField DataField="resolution_comment" HeaderText="Resolution" />

<asp:CommandField ButtonType="Button" ShowEditButton="True" Updatetext="Save"

HeaderText="Maintain Resolution" />

</Columns>

</asp:GridView>

<asp:ObjectDataSource ID="objToday" runat="server" TypeName="clsDataControl"

SelectMethod="getTodaysLog" UpdateMethod="updateResolutionComment">

<SelectParameters>

<asp:ControlParameter ControlID="cboPostDate" Name="PostDate"

PropertyName="SelectedValue" Type="DateTime" />

</SelectParameters>

<UpdateParameters>

<asp:ControlParameter ControlID="grdToday" Name="data_control_id"

PropertyName="SelectedDataKey(0)" Type="Int64" />

<asp:ControlParameter ControlID="grdToday" Name="log_activity_id"

PropertyName="SelectedDataKey(1)" Type="Int64" />

<asp:Parameter Name="resolution_comment" Type="String" />

</UpdateParameters>

</asp:ObjectDataSource>

</ContentTemplate>

</cc1:TabPanel>

<cc1:TabPanel ID="TabThreshold" runat="server" HeaderText="Threshold">

<ContentTemplate>

<asp:GridView ID="grdThreshold" runat="server" DataSourceID="objThreshold"

DataKeyNames="data_control_id,severity_id" AutoGenerateColumns="False">

<Columns>

<asp:TemplateField HeaderText="Severity">

<EditItemTemplate>

<asp:Label ID="lblESeverityId" runat="server" Text='<%#eval("severity_desc") %>'></asp:Label>

</EditItemTemplate>

<ItemTemplate>

<asp:Label ID="lblSeverityId" runat="server" Text='<%#eval("severity_desc") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField HeaderText="Min. Threshold Daily">

<EditItemTemplate>

<asp:TextBox ID="txtMinThreshold" runat="server" Text='<%#bind("min_threshold_daily") %>'></asp:TextBox>

</EditItemTemplate>

<ItemTemplate>

<asp:Label ID="lblMinThreshold" runat="server" Text='<%#eval("min_threshold_daily") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField HeaderText="Min. Threshold Cutoff">

<EditItemTemplate>

<asp:TextBox ID="txtMinThresholdCutoff" runat="server" Text='<%#bind("min_threshold_cutoff") %>'></asp:TextBox>

</EditItemTemplate>

<ItemTemplate>

<asp:Label ID="lblMinThresholdCutoff" runat="server" Text='<%#eval("min_threshold_cutoff") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField HeaderText="Contact Mechanism">

<EditItemTemplate>

<asp:DropDownList ID="cboContact" runat="server" SelectedValue='<%# bind("party_cont_mech_type_id") %>'

DataSourceID="objContact" DataTextField="sec_code_desc" DataValueField="sec_code_id"

Width="167px">

</asp:DropDownList>

<asp:ObjectDataSource ID="objContact" runat="server" SelectMethod="getSecCodes" TypeName="Maintenance">

<SelectParameters>

<asp:Parameter DefaultValue="76" Name="SecCodeTypeId" Type="Int32" />

</SelectParameters>

</asp:ObjectDataSource>

</EditItemTemplate>

<ItemTemplate>

<asp:Label runat="server" ID="lblContact" Text='<%#eval("party_cont_mech_desc") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

</Columns>

</asp:GridView>

<asp:ObjectDataSource ID="objThreshold" runat="server" TypeName="clsDataControl"

SelectMethod="getDataControlThreshold" UpdateMethod="updateThreshold">

<SelectParameters>

<asp:ControlParameter ControlID="cboControl" Name="DataControlId" PropertyName="SelectedValue"

Type="Int64" />

</SelectParameters>

<UpdateParameters>

<asp:Parameter Name="data_control_id" Type="Int64" />

<asp:Parameter Name="severity_id" Type="Int64" />

<asp:Parameter Name="min_threshold_daily" Type="Int64" />

<asp:Parameter Name="min_threshold_cutoff" Type="Int64" />

<asp:Parameter Name="party_cont_mech_type_id" Type="Int16" />

</UpdateParameters>

</asp:ObjectDataSource>

</ContentTemplate>

</cc1:TabPanel>

<cc1:TabPanel ID="TabPanel4" runat="server" HeaderText="Log">

<ContentTemplate>

<asp:GridView ID="grdLog" runat="server" DataSourceID="objControlLog"

DataKeyNames="data_control_id,log_activity_id" AutoGenerateColumns="False">

<Columns>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHSSExtractDt" runat="Server" Text="Source System Extract Date">

</asp:Label>

</HeaderTemplate>

<ItemStyle Wrap="False" />

<ItemTemplate >

<asp:Label ID="lblSSExtractDt" runat="Server" Text='<%#eval("source_system_extract_dt") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHSeverityDesc" runat="Server" Text="Severity Desc">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblSeverityDesc" runat="Server" Text='<%#eval("severity_desc") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHFailureCnt" runat="Server" Text="Failure Count">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblFailureCnt" runat="Server" Text='<%#eval("failure_cnt") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField HeaderText="Log Message">

<ItemTemplate>

<asp:LinkButton ID="linkLogMessage" runat="server" Text='<%#eval("log_msg") %>' CommandName="Select"></asp:LinkButton>

<asp:label ID="lblLogMessage" runat="server" Text='<%#eval("log_msg") %>'></asp:label>

</ItemTemplate>

<ItemStyle Wrap="False" />

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHStartDt" runat="Server" Text="Control Start">

</asp:Label>

</HeaderTemplate>

<ItemStyle Wrap="False" />

<ItemTemplate >

<asp:Label ID="lblStartDt" runat="Server" Text='<%#eval("control_start_dt") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHEndDt" runat="Server" Text="Control End">

</asp:Label>

</HeaderTemplate>

<ItemStyle Wrap="False" />

<ItemTemplate >

<asp:Label ID="lblEndDt" runat="Server" Text='<%#eval("control_end_dt") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHElapsed" runat="Server" Text="Last Run Time">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblElapsed" runat="Server" Text='<%#eval("elapsed_seconds") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField>

<HeaderTemplate>

<asp:Label ID="lblHReviewedBy" runat="Server" Text="Reviewed By">

</asp:Label>

</HeaderTemplate>

<ItemTemplate >

<asp:Label ID="lblReviewedBy" runat="Server" Text='<%#eval("reviewer_name") %>'>

</asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:BoundField DataField="resolution_comment" HeaderText="Resolution" />

<asp:CommandField ButtonType="Button" ShowEditButton="True" Updatetext="Save"

HeaderText="Maintain Resolution" />

</Columns>

</asp:GridView>

<asp:ObjectDataSource ID="objControlLog" runat="server" TypeName="clsDataControl"

SelectMethod="getDataControlLog" UpdateMethod="updateResolutionComment">

<SelectParameters>

<asp:ControlParameter ControlID="cboControl" Name="DataControlId" PropertyName="selectedvalue"

Type="Int64" />

</SelectParameters>

<UpdateParameters>

<asp:ControlParameter ControlID="grdLog" Name="data_control_id"

PropertyName="SelectedDataKey(0)" Type="Int64" />

<asp:ControlParameter ControlID="grdLog" Name="log_activity_id"

PropertyName="SelectedDataKey(1)" Type="Int64" />

<asp:Parameter Name="resolution_comment" Type="String" />

</UpdateParameters>

</asp:ObjectDataSource>

</ContentTemplate>

</cc1:TabPanel>

<cc1:TabPanel ID="TabSQL" runat="server" HeaderText="SQL">

<ContentTemplate>

<asp:TextBox ID="txtSql" ReadOnly="True" runat="server" TextMode="MultiLine" ></asp:TextBox>

</ContentTemplate>

</cc1:TabPanel>

<cc1:TabPanel ID="TabDescription" runat="server" HeaderText="Description">

<ContentTemplate>

<asp:FormView ID="frmDescription" runat="server" DefaultMode="Edit" DataSourceID="objDescription"

Height="159px">

<EditItemTemplate>

<asp:TextBox ID="txtDescription" runat="server" Text='<%#bind("data_control_desc_long") %>'

TextMode="MultiLine" Height="89px" Width="686px"></asp:TextBox>

<br />

<asp:LinkButton ID="saveLink" runat="server" Text="Save" CommandName="Update"></asp:LinkButton>

</EditItemTemplate>

</asp:FormView>

<asp:ObjectDataSource ID="objDescription" runat="server" SelectMethod="getDescription"

TypeName="clsDataControl" UpdateMethod="updateDescription">

<SelectParameters>

<asp:ControlParameter ControlID="cboControl" Name="DataControlId" PropertyName="SelectedValue"

Type="Int64" />

</SelectParameters>

<UpdateParameters>

<asp:ControlParameter ControlID="cboControl" Name="DataControlId" Type="Int64" PropertyName="SelectedValue" />

<asp:Parameter Name="data_control_desc_long" Type="String" />

</UpdateParameters>

</asp:ObjectDataSource>

</ContentTemplate>

</cc1:TabPanel>

</cc1:TabContainer>

 

</div>

</asp:Content>

0
GT_Atlas
3/24/2008 5:21:21 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

2 Replies
1048 Views

Similar Articles

[PageSpeed] 3
Get it on Google Play
Get it on Apple App Store

Interesting.

I rebuilt this page in a new AJAX enabled web site and brought over the necessary support files.  By removing the master page inheritance and use of any CSS or Skins the gridview works fine.

Would anyone know if this is affiliated with master pages or could it be an issue with a CSS/Skin resetting defaults?

0
GT_Atlas
3/24/2008 6:03:11 PM

The markup  is correct. You can try to create a new page and copy paste the whole page to the new page and see whether the issue will be gone.


Limno

0
limno
3/24/2008 6:10:31 PM
Reply:

Similar Artilces:

using javascript getting value from textbox when edit button is clicked and both controls are present in gridview control
Hi All using javascript I want to get value  from textbox when edit button is clicked and both controls that is texbox and button are present in gridview control .Alok Hi aloksinha83, Please see this post: http://forums.asp.net/t/1069245.aspx Thanks,Qin Dian TangMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help....

Add new controls to a gridview row; when editing that row using the edit row feature in the gridview control.
Hi all  I have a questions that looks hard / complex to me, and i know you can help me in this. Q {  I have row in a Gridview and i have an edit option to it. I press the edit button, to edit the values in that row and update data all the way back to the database. Now when i press the edit button, i want a drop down list to be displayed that contain values for a particular field in my grid view. (for now only plain text boxes appear.) } I hope you understand my question, all i need to do is replace the text box controls with a dropdown list when i am editing a row in ...

Dynamically show Edit and Delete buttons in a CommandField in a GridView
 Hello,I have the following columns in a GridView...<Columns>    <asp:CommandField />     <asp:BoundField DataField="LookupID" InsertVisible="False" ReadOnly="True" Visible="False" />        <asp:BoundField DataField="LookupName" HeaderText="Lookup Name" ReadOnly="False"  Visible="True" /></Columns>... how would i dynamically show the Edit and Delete buttons based on a value from a database? I'm assuming I use the RowDataBound Event but I'm not sure how to access the CommandField.Thanks in advance,Lee You can do gridview.findcontrol("") likeButton btnDelete= (TextBox)(gvDepartment.Rows[e.RowIndex].FindControl("Button"));BtnDelete.Visible = false;.FindControl() is on many classes.  It's very useful. hope that helps RKASPNET = Convert.toDOTNET(Domino); Thanks rkaspnet,but the  <asp:CommandField /> does not let me assign an ID to it. anyone know of another way?   You can go through the .Controls through a loop like foreach... find System.Web.UI.WebControls.CommandField each <asp:CommandField ..>you can cast it CommandField CommandField1 = (CommandField)X; this class has Show____Button= True | False Properties.  _______ is Insert, Cancel, Edit, ect....RKASPNET = Convert.toDOTNET(Domino); Have you trie...

Edit Commands do not show up when edit button pressed
I have a .aspx page I have created, and I am having problems.  I have an editable datagrid created and also a filtering drop down menu as well.  The datagrid shows up fine first, shows all the columns and the entries from the database, and has the edit button next to the entry.  When I press the edit button, the datagrid disappears and there is nothing on the page.  The page is completely blank.  If I reload the page, the data comes back, and when I hit the edit button again, it disappears again.  Any help anyone can give me would be appreciated.  Here...

editable gridview when user click external edit button
Hi Friend, I have gridview with columns id, fname, lname and email. I have bound the gridview from the table. Now my requirement is: I need to have editable gridview with edit button external to gridview. I can do it, if the edit button is internal to gridview. But I want to achieve editable gridview when user click external edit button. Is it possible or any other control that have this future?  Thanks, FarooqMark as answer if this post helpfull to you.Don't be afraid to be wrong; otherwise you'll never be right.  Do you want to make a certain row editable or t...

Edit but no edit
I've Created a custom module and reuse the survey.dnn file to help with the install here it is. <?xml version="1.0" encoding="utf-8" ?> <dotnetnuke version="2.0" type="Module"> <folders> <folder> <name>CompanyName - Photos</name> <description>Photos allows you to add photo albums</description> <version>01.00.00</version> <modules> <module> <friendlyname>CompanyName - Photos</friendlyname> <controls> <c...

Editable/Not Editable
Hello All, I have some webform(.aspx page) in which i have some controls (for input) and i would like to make that screen editable/not editable based on some condition. how can i do that.  the whole intent is user can read the information but can't change.  shiva kumar If you want to make the controls editable/non-editable, you can set their ReadOnly property to true or false accordingly. What exactly do you imply by making the screen editable/non-editable?Thanks,MaxLet Me Google That For You! i mean to say i would like to show the current values but user should not modify them. ReadOnly property is the way to go...Thanks,MaxLet Me Google That For You! Thanks bullpit. You can do it with javascript:   document.getElementById('TextBox1').readOnly = true;  Hope this helps!  Don't forget to mark the most helpful post(s) as Answer for the sake of future readers.  Thanks!Josh Stodola ← Come check out my blog!...

show Conditional Edit button in Gridview
hi guies i have a asp:gridview   where user can edit and update the record in the GRidview. Is there a way to show the Edit buton only if a condition is met. example : gridview is showing date column and first name column , if the date is previous  date, i dont want the edit button to show up. Firstname        Service requestdate      Edit ***************************************************** john                ...

To edit or no to edit
Jon, Can I edit, whatever I've written so far, so that it doesn't look like I wrote utterly crap?-) -- Pieter "Linux is like living in a teepee. No Windows, no Gates, Apache in house." -- Usenet signature Pieter Zijlstra wrote: > Jon, > > Can I edit, whatever I've written so far, so that it doesn't look like > I wrote utterly crap?-) Oh boy, the edit button vanished from the web-forum ... ;-) -- Pieter "Humor is also a way of saying something serious." -- T. S. Eliot (1888 - 1965) Pieter Zijlstra wrote: ...

GridView edit mode Edit/Delete link become button
The standard Gridview edit mode provides "Edit" and "Delete" hyperlink (called linked button) for us to click and update record. How to make them buttons instead of hyperlik ? I could not find the codes for these 2 default hyperlinks to modify. ThanksThanks in advance for the help. I will try to credit the ones who helped but most important is we really do sincerely thanks to all who have helped. I found the solution. We can edit column and then change from link to button.  Thanks in advance for the help. I will try to credit the ones who helped but most import...

GridView control enters edit mode only when I click Edit link twice
Hi all..I have a GridView control in an ASP.NET 2.0 page. I added a column that contains edit, update, cancel buttons. Because I did that, I had to handle RowEditing event or an exception was thrown.Well... this is the body of the RowEditing event:protected void gvParametros_RowEditing(object sender, GridViewEditEventArgs e){      gvParametros.EditIndex = e.NewEditIndex;}The fact is that when page is loaded and I click the edit link, page is refreshed but GridView doesn't enter edit mode. When I press edit link again, GridView enters edit mode.Any help to solve this behavior w...

Direct editing of gridView or Ddatagrid controls without clicking on an EDIT link
I have an application where lots of data is presented to the user in a gridView control and the user needs the option to review and overwrite any values in the cells of the grid.  My users find it very annoying and time consuming to click on an edit link to turn a row of the gridView into edit mode.  Typically, they might jump around and edit a few values in several rows.  Is there any way to present the data in a gridView control, datagrid control or something that looks like a grid where the entire grid is already in edit mode?  Can you make a grid that cont...

GridView, Edit Row, user control button
I succesfully put a custom control inside a placeholder inside a cell when editing a row but when i click on a button or do anything which causes a postback the control disappears.protected void DropDownList1_OnSelectedIndexChanged(object sender, EventArgs e) { GridViewRow editrow = GridView1.Rows[GridView1.EditIndex]; PlaceHolder p1 = (PlaceHolder)editrow.FindControl("OptionsPlaceHolder"); DropDownList ddl1 = (DropDownList)sender; if (ddl1.SelectedItem.Text == "Combo") { Control uc1 = LoadControl("~/Us...

How to add the delete/edit buttons in GridView control ?
i have a GridView control that is bound dynamically to an AccessDataSource. the GridView control has the attribute 'AutoGenerateColumns' to be true. when i add a 'delete field' to the grid control (by code or by the edit columns feature), it gets added in the beginning of each row. however, i want it to be at the end of each row . how i can do it ? thanks  <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1">                <Columns...

Re: show Conditional Edit button in Gridview
Could you help me. If lbl_date_frozen is NOT NULL then i need to show the edit and delete buttons.How would i do this on the code behind?  Heres my code:  1 <asp:GridView ID="gv_wp_list" runat="server" 2 AllowPaging="True" 3 AllowSorting="True" 4 AutoGenerateColumns="False" 5 AutoGenerateEditButton ="False" 6 CellPadding="4" 7 DataKeyNames="id" 8 DataSourceID="d...

Gridview Edit go to new page and enter Edit mode on a formview control.
Okay, so far I have the edit button go to a page called update.aspx. And have the ID selected. However, I don't want it to be in selected view, I want it to go to the update.aspx page in edit mode not selected mode. Is this possible? You can add one hyperlink and set its path to update.aspx?Id=(selectedId)on update.aspx read Id's value from querystring and do updation - Hardik (Software Developer,Surat,India)Please remember to click "Mark as Answer" on this post if it helped you. You lost me at the "do updation part" so far I have a the EDIT link go to ...

Editable Child GridView inside editable parent gridview
Hi,  I need help writing a Paent/Child gridview combination. I need an editable parent gridview, inside templatefield of parent grid view I need an editable child gridview. Can any one post sample code. Hi jameston ,   <form id="form1" runat="server"> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" DeleteCommand="DELETE FROM [country] WHERE [countryid] = @countryid" InsertCommand="INSERT INTO [co...

IWDBEdit control set to IWDBGridColumn.Control not editable [Edit]
Hi folks. I'm relatively new to IntraWeb and am having trouble with my application. It is a simple app that is supposed to show a list of user accounts in a grid and allow the user to edit data in the accounts. I have a TADOQuery connecting to MS SQL, with 'Select * from UserAccounts' as the sql text. I have a TDataSource with the Dataset property pointing to my TADOQuery object. Both of these objects exist as part of the UserSession. On my main form, I have an IWDBGrid, IWDBNavigator, and an IWDBEdit control. They are all hooked up to the TDatasource in the UserSessi...

Trouble with Gridview's hyperlink and edit button
Dear All: I just came across a strange problem. My gridview has a hyperlink field and edit button, after I click the edit button, do something then click update, the content of the hyperlink filed all gone. Eventually I found out that if I change the hyperlink filed back to bound filed, it won't happen. Any thought or idea could fix it ? I really appreciate.      forestmax Can you post your code?  It could be related to how you've defined or created the hyperlink control. My code as follows, whenever I update the rows, the content of hyperlink field are deleted....

Changing the font colour of the Edit button on a GridView control
Does anybody know if it is possible to change the colour and style of the Edit tag that appears at the beginning of each row on a GridView control? This is the link that users click to turn on the Edit mode. Similarly I would like to change the colour of the Update and Cancel tags when the GridView is in Edit mode.Many thanks.  Define the links yourself within the ItemTemplate and EditItemTemplate and you can do whatever you want to the links. This example shows how to change the font color to red two different ways: <asp:templatefield> <itemtemplate> <asp:lin...

GridView show edit button if user owns the record
Hi I'm looking for help on showing labels and images on a Gridview but only showing the label if the logged in user was the person whom added that record.  The record has a field which holds the added by unique identifier. Something like this For each Record in Gridview      If Logged in user = Records memberId then          Label.Visible = True     Else         Label.Visible = False     End If Loop     Do something like this: ASPX ...

GridView and Javascript
Hey All, I need help from  you. I have a GridView. In the  Edit Item template of the first Column I have a textbox, an user control and hidden field. When I click on the user control it  opens a pop up from which I can choose the required value. The text value is populated in the textbox and Id in the hidden field. Here's the code for edit template.         <EditItemTemplate>                        <table cellpadding ="0" cellspacing ="0">                            <tr>                                <td>                                    <asp:TextBox id = "txtEditKnownBy" runat ="server" ReadOnly ="true"  Text='<%# DataBinder.Eval(Container.DataItem,"userName")%>'></asp:TextBox>                     ...

How do I fix a Edit GridView Error
Hello, I keep getting this error when I edit and update a gridview.   Server Error in '/Albers_website' Application. Updating is not supported by data source 'SqlHAPSource' unless UpdateCommand is specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NotSupportedException: Updating is not supported by data source 'SqlHAPSource' unless UpdateCommand is specified.Source Error: [NotSupporte...

Custom Control with JScript in GridView Edit button (AJAX Extension)
I am new in AJAX Extension and I am facing a problem. I have page in which I have taken a GridView control and I have a Custom Control DateBox (which read JScript file and register with the page in PreRender event of control). I have button in Grid (lets say btnExprienceEdit). When I edit the row it loads the DateBox control in normal aspx page (without AJAX) it works fine but as soon as I put <asp:UpdatePanel>GridView</asp:UpdatePanel> or enable AJAX, javascript doesn't work. protected override void OnPreRender(EventArgs e){ // methods load script...

Web resources about - Gridview shows both Edit hyperlink and Commandfield Edit button - asp.net.presentation-controls

Blog Archive
Blog Archive 2013 75 Essential Tools for iOS Developers Aug 15 2013 posted in iOS Speaking at Cocoa Conf PDX Jul 13 2013 posted in Speaking In ...

Resources last updated: 3/4/2016 11:25:33 AM