Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
O

Orion Buttigieg

@Orion Buttigieg
About
Posts
30
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Datagrid in edit mode
    O Orion Buttigieg

    hello Marcie, thanks for all your help today..! ok, maybe i'm going about this all wrong, as i fix one thing only to be not able to do something else. i implemented your suggestion and it worked. i set the DataKeyField with the field name from the table the data is coming from and that worked. it probably wasn't set since i just make a data connection, make a SQL query and populate the grid. now it doesn't like the next line of code which is supposed to pull the data from the cell\Textbox that's being edited. but i get 'arguement out of range'. so i think it can't find the text box. string newResValue; TextBox textBox; textBox = (TextBox)(e.Item.Cells[3].Controls[0]); maybe i should give a little background here as perhaps i'm doing this all wrong. i'm creating all the columns programatically except for the Edit column (property builder for that). they are all BoundColumns. as stated before i make a SQL query and get a dataset from a Data tier i have here and populate the columns with the BoundColumn.DataField property. i'm doing this all manually as that's the advice articles i've read give, plus i need the ability to control the width of the columns. see below for how i'm doing this. string strSQL = "SELECT RESOURCES.ResName,RESOURCES.ResValue,RESOURCES.ResComment FROM RESOURCES INNER JOIN PROJECTID ON RESOURCES.ProjectIdentifier = PROJECTID.ProjectIdentifier "+ "WHERE (PROJECTID.ProjectName = '"+strProjectName+"')"+ "ORDER BY RESOURCES.DateCreated"; dataSet = dataAccess.GetDataSet(strSQL,conn); DataTable dt = dataSet.Tables[0]; //populate datagrid this.DataGrid1.AutoGenerateColumns = false; System.Web.UI.WebControls.BoundColumn column1 = new BoundColumn(); column1.HeaderText = "Resource Name"; column1.DataField = "ResName"; column1.Visible= true; column1.ReadOnly = true; this.DataGrid1.Columns.Add(column1); i just repeat the code to create the other columns leaving the last column to be edited. however, doing it this way doesn't seem to allow me to create TemplateColumns and pass them data like i do with the BoundColumns as there's no DataField property. so i seem to be caught somewhere in the middle ground of doing things programmatically and letting VS do it by setting some properties..:( your thoughts are greatly welcomed. thanks, Orion ps. if you've gone home already, have a good weekend and happy valentines.. Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    ASP.NET question com announcement

  • Datagrid in edit mode
    O Orion Buttigieg

    i must be missing something obvious in regards to Updating. i found some code that gets the 'key' value but when i use the same code in the Update event method. string key = DataGrid1.DataKeys[e.Item.ItemIndex].ToString(); running this line throws an 'Index out of range' exception. i've seen examples to FindControl which would accordingly find the text box being used and then extract the string from it at that point. however, if i look at my html side there's no such control defined. so do i just add one straight into the html manually or something like that? thanks, Orion Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    ASP.NET question com announcement

  • Datagrid in edit mode
    O Orion Buttigieg

    cool, that works. thanks for the tip! and good site. i think i'll be frequenting there while i build this thing.. :) Orion Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    ASP.NET question com announcement

  • Datagrid in edit mode
    O Orion Buttigieg

    alright excellent...! that works. i should have gotten that one. something i've noticed. as i page over, it keeps putting the row i've selected to edit in edit mode. so basically if the user pages over i don't want that row to stay in edit mode as its a completely new record. is there a way to stop this? i'm new at this asp.net datagrid stuff. thanks, Orion Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    ASP.NET question com announcement

  • Datagrid in edit mode
    O Orion Buttigieg

    thanks, i'll give that a shot. figures it could be something so simple.. Orion Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    ASP.NET question com announcement

  • Datagrid in edit mode
    O Orion Buttigieg

    hello, i've been looking for ways to set a specific column to display an text box for edit mode. by default when in edit mode all columns in a row will show a text box to edit the data. i only want a specific row, not all of them to have the text box show up. how do i isolate the one column and then be able to find which record is being edited when i click the update link? thanks, Orion Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    ASP.NET question com announcement

  • Text as hyperlink in Text box
    O Orion Buttigieg

    i must always remind myself to keep things simple. on web forms you can use a listbox. a list box has both a text property and value. i set the url into the value property and set the text to whatever i want. the scroll bar is there. on the selected event i just have to grab the value from the selected item and throw that into a java script line to open that url in a new page. works like a charm and not much extra code. it doesn't show up as a hyper link but that's ok. i can always put a tool tip that tells them to click on an item. thanks for everyone's help and suggestions. :) Orion Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    ASP.NET com help question

  • Text as hyperlink in Text box
    O Orion Buttigieg

    thanks for that suggestion. i didn't know i could do that. but these are web forms i'm dealing with, and for reasons i won't get into i'm limited to the type of web controls i can use. a rich text box isn't one of them unfortunately. can i do it in a listcontrol?? thanks, Orion Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    ASP.NET com help question

  • Text as hyperlink in Text box
    O Orion Buttigieg

    ok fair enough. so in light of what i'm trying to do is there a suggestion from anyone out there on how i'd go about doing this..?? Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    ASP.NET com help question

  • Text as hyperlink in Text box
    O Orion Buttigieg

    hello, i'm trying to figure out a way to get my url's to show up as url hyperlinks when i put them in a text box. something like a word doc when you put in a url it becomes a hyperlink. or such as in hotmail when you switch to rtf mode. i can do it with a label control by setting some tags on either side of say a variable and then set the text as some value. this.label1.Text += "mylink"; this works as far is that it will display the word 'mylink' and when you click, it will take you to what ever url is sitting in the variable after the href. Problem. i can't do multi lines in label controls. however, when setting the above code into a textbox it shows the code as a string as opposed to a hyperlink. so is there a way to get a text box to display these links as hyperlinks ?? am i missing something? thanks, Orion Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    ASP.NET com help question

  • .NET and Mac OS
    O Orion Buttigieg

    ez2, thanks for the reply. i know i need the framework to run the .NET i just wasn't sure if the .NET would like the Mac OS. i didn't think it would but you never know there might have been a work around somewhere out on the net. it wasn't a big issue. i generally find any real company doing any real business are working on pc's. anyways i appreciate the response it confirms what i pretty well knew already. thanks. Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    .NET (Core and Framework) csharp com question

  • .NET and Mac OS
    O Orion Buttigieg

    hello, i've got an application totally developed using .NET, and i'm about to embark on see if it'll run on a Mac machine. is this possible?? has anyone out there attempted this? if so, and successfully, is there anything in particular i need to know or do?? thank you Orion orion.buttigieg@Teamplate.com www.Teamplate.com

    .NET (Core and Framework) csharp com question

  • Coping Files over the internet
    O Orion Buttigieg

    sorry.., yes just simply transfering a file over the internet from my client to my server. Absolutely nothing to do with a web pages. i'm sure i'm missing something obvious. although every example i look at is from web page to web page. i am trying to put the file in C:\Inetpub\wwwroot\SomeDirectory, but again has nothing to do with web sites. these files are dll's and source code files. Orion

    C# csharp asp-net sysadmin windows-admin help

  • Coping Files over the internet
    O Orion Buttigieg

    hello, i'm trying to do a File.Copy but over the wire. more specifically an UpLoad, since it's starting from a Client machine. Catch is this is via a WinForm/UserControl/ComponentModel object(s). so nothing to do with any kind of ASP, ASP.NET or otherwise. in the end i'm just trying to take a file of some type, be it a .jpg/.dll/.something and send/save it to a server over the net. i've been experimenting with a number of classes; WebClient, HttpWebRequest and HtmlInputFile/HttpPostedFile. the last 2 being specific to ASP.NET, as i thought i might be able to make the system think it was coming from as ASP.NET page or something like that. i've been using a WebServer(IIS) for the connection, specifically to a Virtual Directory. which is where the file(s) will need to be in the end anyways. but i'm having no luck passing the file to the virtual file path. any advice or help would be great. Thank you, Orion

    C# csharp asp-net sysadmin windows-admin help

  • UpLoading dll's or HttpWebRequest
    O Orion Buttigieg

    just to be clearer, sorry. presently the dll's are being saved on the client. i can get to them no problem. its sending them across the wire that's a problem. i keep thinking HttpWebRequest is the way to go because i can state the URI. and in this case the files are going to a virtual directory. although its the content type that's got me since these are not text files. thanks, Orion

    C# csharp asp-net question

  • UpLoading dll's or HttpWebRequest
    O Orion Buttigieg

    hello, i'm trying to Upload dll's being generated on a Client machine(not ASP.NET)but rather UserControls and ComponentModel's. i'm getting lost in all the HttpWebRequest 'Post' and HttpPostedFile stuff. the later looking like its almost purely for ASP.NET. any advice would be great? Orion

    C# csharp asp-net question

  • Remoting and Load balancing in Multi tier
    O Orion Buttigieg

    hello to all, not to long ago, there was an article on this site about Load balancing in a Mult tier scenario using remoting. http://www.codeproject.com/info/error404.asp?404;http://www.codeproject.com/useritems/Multitier.asp this no longer exists. i'm curious if anyone out there either kept a copy of the code from this article or has a method in doing this. i've got my ntier going (using Remoting) and would really like to balance the servers. thanks, Orion

    C# com question

  • ListView Control
    O Orion Buttigieg

    it sort of works, but now the value i'm adding to the sub item/second column doesn't go in... back to the drawing board and thanks:) Orion

    C# question database

  • ListView remove item problem!! Help please
    O Orion Buttigieg

    Brandon, have you tried instantiating the listView control. if your in the same class you should be able to use "this". if your in another class you should be able to get to the listView by creating a new instance of that class if you haven't already and get to the listView that way. MyClass cl = new MyClass() cl.MylistView.... when i add: here parameter is an ArrayList and this code sits in a foreach ListViewItem item = new ListViewItem(parameter); item.SubItems.Add(""); this.listView_Parameters.Items.Add(item); i'd expect Remove() would be the opposite. hope i didn't state the obvious Orion

    C# help database debugging question

  • ListView Control
    O Orion Buttigieg

    thanks Brandon, actually a few minutes after i posted it i did get the first part. i did it a little different though. listView.Items[0].SubItems[1].Text = this.textBox_Value.Text; as for showing the blue line, i want to show it before any sub item has been added. to let the user know the first row has been auto selected. i've got the FullRowSelect prop set to true, no problem. if i do this.listview.SelectedItems[0] = true;//it complains Orion

    C# question database
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups