Jump to content
Xtreme .Net Talk

phamkn

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by phamkn

  1. 1. Try with Integrated Security in the connection string 2. Make sure the SP return data when you run in QRY Analyzer with the crudential in the strcon.
  2. Please Help to convert this code into C#. Thank you so much Private Sub dgPhoto_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgPhoto.ItemCreated If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then Dim _butDelete As Button = CType(e.Item.Cells(3).Controls(1), Button) _butDelete.Attributes.Add("onClick", "return(confirm('Are you sure to delete this photo?'));") End If End Sub or Sub dgPopularFAQs_ItemDataBound(sender as Object, e as DataGridItemEventArgs) ' First, make sure we're NOT dealing with a Header or Footer row If e.Item.ItemType <> ListItemType.Header AND _ e.Item.ItemType <> ListItemType.Footer then 'Now, reference the LinkButton control that the Delete ButtonColumn 'has been rendered to Dim deleteButton as PushButton = e.Item.Cells(0).Controls(0) 'We can now add the onclick event handler deleteButton.Attributes("onclick") = "javascript:return " & _ "confirm('Are you sure you want to delete FAQ #" & _ DataBinder.Eval(e.Item.DataItem, "FAQID") & "?')" End If End Sub
  3. Delete Validation Datgrid We don't create row by row, but use SQL Tables to bind data to the datagrid. Therefore, I can't find the itemcareated event. Here is how we load the data //Load the data into DataGrid dgTCDetail.DataSource = GetData(int ID); dgTCDetail.DataBind();
  4. Please help I have a web form which has a datagrid contain whole bunch of textboxes and dropdownlists and a delete column bellow: <asp:ButtonColumn Text="Delete" ButtonType="PushButton" CommandName="Delete"></asp:ButtonColumn> Can you show me how to write something in C# or Javascript to confirm users that they really want to delete that row in the datagrid. Any help would appreciate.
×
×
  • Create New...