Click here to Skip to main content
15,902,635 members
Home / Discussions / C#
   

C#

 
QuestionAutoscaling dynamically created controls Pin
CuePhoenix28-Jun-06 7:07
CuePhoenix28-Jun-06 7:07 
QuestionRe: Autoscaling dynamically created controls Pin
CuePhoenix28-Jun-06 7:36
CuePhoenix28-Jun-06 7:36 
Questionsvd(singular value decomposition) Pin
haytham_mohammad28-Jun-06 6:46
haytham_mohammad28-Jun-06 6:46 
AnswerRe: svd(singular value decomposition) Pin
Kythen30-Jun-06 8:57
Kythen30-Jun-06 8:57 
QuestionHow to set index of drop-down box Pin
leckey28-Jun-06 6:44
leckey28-Jun-06 6:44 
AnswerRe: How to set index of drop-down box Pin
Gonzalo Brusella28-Jun-06 6:57
Gonzalo Brusella28-Jun-06 6:57 
AnswerRe: How to set index of drop-down box Pin
Not Active28-Jun-06 8:14
mentorNot Active28-Jun-06 8:14 
GeneralRe: How to set index of drop-down box [modified] Pin
leckey29-Jun-06 5:44
leckey29-Jun-06 5:44 
Mark, thank you for the article. However, I'm doing things a bit differently and am still confused.

I don't do the EditItemTemplates. With the use of this application, there is the assumption that once it's populated it's editable.

Here is the asp code to populate the column:
<asp:TemplateColumn HeaderText="Part Type"><br />
						<ItemTemplate><br />
							<asp:DropDownList ID="PartType" Runat="server" DataSource = '<%# getDescriptions2 ((string)DataBinder.Eval(Container.DataItem, "PartNumber"))%>' DataTextField = "Description"><br />
							</asp:DropDownList><br />
						</ItemTemplate><br />
					</asp:TemplateColumn>


And this is the getDescriptions2
public object getDescriptions2 (string _PartNumber)<br />
		{<br />
						string SQLString = "SELECT pt.Id, pt.Description, p.ID FROM PartTypes pt INNER JOIN Parts p on pt.ID = p.PartTypeID WHERE p.PartNumber = _PartNumber ORDER by Description";<br />
SqlCommand cmd = new SqlCommand();<br />
			cmd.Connection = new SqlConnection(strConnectSQL);<br />
			cmd.CommandText = SQLString;<br />
			SqlDataAdapter adapter = new SqlDataAdapter(cmd);<br />
			DataSet ds = new DataSet();<br />
			adapter.Fill(ds);<br />
			//Returns entire dataset<br />
			return ds;<br />
//What goes here to say 'this is what is stored in the db?<br />
<br />
		}


How do I within this function set the index?

-- modified at 12:17 Thursday 29th June, 2006
Questiondatagridview paging Pin
adamoz28-Jun-06 4:49
adamoz28-Jun-06 4:49 
AnswerRe: datagridview paging Pin
Not Active28-Jun-06 5:05
mentorNot Active28-Jun-06 5:05 
GeneralRe: datagridview paging Pin
adamoz28-Jun-06 5:25
adamoz28-Jun-06 5:25 
GeneralRe: datagridview paging Pin
Not Active28-Jun-06 5:36
mentorNot Active28-Jun-06 5:36 
GeneralRe: datagridview paging Pin
Mairaaj Khan28-Jun-06 20:22
professionalMairaaj Khan28-Jun-06 20:22 
Questionduplicate file problem Pin
SomeGuyThatIsMe28-Jun-06 4:47
SomeGuyThatIsMe28-Jun-06 4:47 
AnswerRe: duplicate file problem Pin
Robert Rohde28-Jun-06 4:57
Robert Rohde28-Jun-06 4:57 
GeneralRe: duplicate file problem Pin
SomeGuyThatIsMe28-Jun-06 5:21
SomeGuyThatIsMe28-Jun-06 5:21 
QuestionAccessing .Net Web Service using Java as a client Pin
chinky singh28-Jun-06 4:29
chinky singh28-Jun-06 4:29 
QuestionUsing TLS with IMAP, POP3 [modified] Pin
uhs28-Jun-06 4:05
uhs28-Jun-06 4:05 
QuestionSimple: XmlDocument locked after calling Save? Pin
matthias s.28-Jun-06 4:00
matthias s.28-Jun-06 4:00 
AnswerRe: Simple: XmlDocument locked after calling Save? Pin
J4amieC28-Jun-06 4:07
J4amieC28-Jun-06 4:07 
GeneralRe: Simple: XmlDocument locked after calling Save? Pin
matthias s.28-Jun-06 4:11
matthias s.28-Jun-06 4:11 
GeneralRe: Simple: XmlDocument locked after calling Save? Pin
J4amieC28-Jun-06 4:30
J4amieC28-Jun-06 4:30 
AnswerRe: Simple: XmlDocument locked after calling Save? Pin
chinky singh28-Jun-06 5:02
chinky singh28-Jun-06 5:02 
AnswerRe: Simple: XmlDocument locked after calling Save? Pin
engsrini28-Jun-06 7:28
engsrini28-Jun-06 7:28 
GeneralThank you all! Pin
matthias s.28-Jun-06 9:36
matthias s.28-Jun-06 9:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.