Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by stonehead

  1. stonehead

    set selected value for dropdown list in gridview template

    All, This is what I currently have; and the error I got is "Object reference not set to an instance of object" for line myDDL.Items.FindByValue("strStatus").Selected = True Please help me. Protected Sub btnEditRecord(ByVal sender As Object, ByVal e As System.EventArgs)...
  2. stonehead

    how to fire a button in template field

    Never mind. I figured it out. Thank you.
  3. stonehead

    how to fire a button in template field

    All, I'm trying to find a way to fire a my btnEdit with no luck. I need some help. Thank you. <asp:TemplateField> <ItemTemplate> <asp:Button runat="server" ID="btnEdit" Text="Edit" OnClick ="btnEditRecord"/> </ItemTemplate>...
  4. stonehead

    Cannot have multiple items selected in a DropDownList.

    Never mind. I found out why I had that error. It's because after submit I set the dropdownlists back to default by ddApp.item(0).selected = true by changing it to ddMap.SelectedIndex = 0 it works just fine. Thank you all for your help
  5. stonehead

    Cannot have multiple items selected in a DropDownList.

    I've never done the html markup before. Could you please give me more details. Sample codes are appreciated. Thanks.
  6. stonehead

    Cannot have multiple items selected in a DropDownList.

    Thank you. I already moved it out of for loop but still same error.
  7. stonehead

    Cannot have multiple items selected in a DropDownList.

    Thanks so much for your prompt response. I set viewstate = false (or do ddNum.Items.Clear()) and got error "System.NullReferenceException: Object reference not set to an instance of an object." cmdInsert.Parameters.AddWithValue("@name", ddApp.SelectedItem.Text) Any idea? Thank you.
  8. stonehead

    Cannot have multiple items selected in a DropDownList.

    All, Below is what I have and when I click submit button I got the error "Cannot have multiple items selected in a DropDownList" Any help is appreciated. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then...
  9. stonehead

    Unable to cast object of type 'System.Data.DataView' to type 'System.D

    Thank you for your prompt response. I found out why I got the error. It's because I put Session("myTable") = New Data.DataView() before Page.IsPostBack
  10. stonehead

    Unable to cast object of type 'System.Data.DataView' to type 'System.D

    Hi all, I'm trying to do sorting for my gridview. This is the error I got Unable to cast object of type 'System.Data.DataView' to type 'System.Data.DataTable' for this line gvDetail.DataSource = SortDataTable(Session("myTable"), False) Please help. Protected Sub...
  11. stonehead

    if statement in eval binding

    Below is what I currently have. I'd like to put a if statement there to make my column show "N/A" if the field has null value. Please help me with the syntax. Thank you. <ItemTemplate> <asp:hyperlink navigateurl='<%#string.Concat ("\\serverName\FileRequest\" ...
  12. stonehead

    gridview - show only 1st couple words of the data field

    I wrote a little function for it and it worked. Thank you.
  13. stonehead

    gridview - show only 1st couple words of the data field

    Hi all, I use gridview to show my data. There's one field called description. It's very long so it looks really ugly if I have everything shown. Is there a way for me to show just 1st couple words the field & (make it hyperlink) so users can click on those words of that one record to expand...
  14. stonehead

    display file path hyperlink in gridview

    It's for user to edit it. Thank you. For the file path. It works. It was my false.
  15. stonehead

    display file path hyperlink in gridview

    Question for jeeckley, I did as you said. When I hover the link text the url appears as file:///c:/temp but nothing opens. Do I miss anything ? And since this is a editable field, how should I fix the code in EditItemTemplate. Much appreciated. <asp:TemplateField HeaderText=".pdf file...

Part and Inventory Search

Back
Top