Click here to Skip to main content
15,904,339 members
Home / Discussions / C#
   

C#

 
AnswerRe: transfering information from form to form Pin
Christian Graus19-Dec-06 18:27
protectorChristian Graus19-Dec-06 18:27 
QuestionHow to reference the dynamically generate textbox ID Pin
MyRunner19-Dec-06 12:22
MyRunner19-Dec-06 12:22 
AnswerRe: How to reference the dynamically generate textbox ID Pin
Guffa19-Dec-06 13:48
Guffa19-Dec-06 13:48 
GeneralRe: How to reference the dynamically generate textbox ID Pin
MyRunner20-Dec-06 4:52
MyRunner20-Dec-06 4:52 
AnswerRe: How to reference the dynamically generate textbox ID Pin
Guffa20-Dec-06 6:22
Guffa20-Dec-06 6:22 
QuestionSemi-Complicated Databinding Issue Pin
Drew McGhie19-Dec-06 11:22
Drew McGhie19-Dec-06 11:22 
AnswerRe: Semi-Complicated Databinding Issue Pin
GirishKB19-Dec-06 20:10
GirishKB19-Dec-06 20:10 
GeneralRe: Semi-Complicated Databinding Issue Pin
Drew McGhie20-Dec-06 7:58
Drew McGhie20-Dec-06 7:58 
prior to the form being shown, these two are called in this order, assume everything not declared is declared before.

<code>
public void LoadForm()
{
PlayerSource = new BindingSource();
//assign to prepopulated table
PlayerSource.DataSource = myClient.PlayerList;

TeamSource = new TeamSource();
//same deal
TeamSource.DataSource = myClient.TeamList;

//assigning of Player info to labels through databinding

//databind player combobox
uxcbPlayer.ValueMember = "PlayerID";
uxcbPlayer.DisplayMember = "PlayerFullName";
uxcbPlayer.DataSource = PlayerSource;

//databind team combobox
uxcbTeam.ValueMember = "TeamID";
uxcbTeam.DisplayMember = "TeamFullName";
uxcbTeam.DataSource = TeamSource;
}

public void LoadData()
{
CurrentPlayerSource = new BindingSource();
CurrentPlayerSource.DataSource = myClient.CurrentPlayer;
uxcbTeam.DataBindings.Add("SelectedValue", TeamSource, "Team", false, DataSourceUpdateMode.OnValidation, "");
uxcbPlayer.DataBindings.Add("SelectedValue", TeamSource, "PlayerName", false, DataSourceUpdateMode.OnValidation, "");
}
</code>

In the Team.SelectedValueChanged event I call this funciton:
<code>
public void FilterTeam ()
{
if (uxcbTeam.SelectedValue != null)
{
if (PlayerSource != null)
{
PlayerSource.Filter = "Team = '" + uxcbTeam.Text + "'";
//uxcbBuilding.SelectedIndex = -1;
//reset cbBuilding Selected Index
}
}
}
</code>

Upon needing to save, I call CurrentPlayerSource.EndEdit(), and then deal with the data. The problem is that upon .EndEdit, the new value of the Player dropdown is not committed back to the database. Say if team A and Player A2 are selected initially, and the team is changed to team C, players C1-Cwhatever populate the second dropdown, C1 is shown initially, but on EndEdit, A2's value is put back in the datatable. If the user opens the player dropdown, and then selected the programatically-selected C1, then upon .EndEdit(), C1 is sent back, but I'm looking for a way to somehow "catch" the change on the second set and have the databindingsource (in this case, CurrentPlayerSource) catch the change.
Questionn-tier design Pin
fmardani19-Dec-06 11:06
fmardani19-Dec-06 11:06 
AnswerRe: n-tier design Pin
Ravi Bhavnani19-Dec-06 11:33
professionalRavi Bhavnani19-Dec-06 11:33 
AnswerRe: n-tier design Pin
il_masacratore19-Dec-06 20:24
il_masacratore19-Dec-06 20:24 
AnswerRe: n-tier design Pin
jhwurmbach20-Dec-06 3:37
jhwurmbach20-Dec-06 3:37 
QuestionCreating an instance using late bindng Pin
Tom.sikes@hp.com19-Dec-06 11:01
Tom.sikes@hp.com19-Dec-06 11:01 
AnswerRe: Creating an instance using late bindng Pin
Pete O'Hanlon19-Dec-06 11:02
mvePete O'Hanlon19-Dec-06 11:02 
AnswerRe: Creating an instance using late bindng Pin
Tom.sikes@hp.com19-Dec-06 11:07
Tom.sikes@hp.com19-Dec-06 11:07 
GeneralRe: Creating an instance using late bindng Pin
Pete O'Hanlon21-Dec-06 5:15
mvePete O'Hanlon21-Dec-06 5:15 
QuestionHow can I acces a C++ library in C# Pin
ComCoderCsharp19-Dec-06 10:47
ComCoderCsharp19-Dec-06 10:47 
AnswerRe: How can I acces a C++ library in C# Pin
Ravi Bhavnani19-Dec-06 10:50
professionalRavi Bhavnani19-Dec-06 10:50 
Questionhow to Create Fade in/Fade out Menu for my asp.net WebSite ? Pin
hdv21219-Dec-06 9:41
hdv21219-Dec-06 9:41 
AnswerRe: how to Create Fade in/Fade out Menu for my asp.net WebSite ? Pin
Ravi Bhavnani19-Dec-06 10:52
professionalRavi Bhavnani19-Dec-06 10:52 
GeneralRe: how to Create Fade in/Fade out Menu for my asp.net WebSite ? Pin
hdv21219-Dec-06 11:05
hdv21219-Dec-06 11:05 
GeneralRe: how to Create Fade in/Fade out Menu for my asp.net WebSite ? Pin
Ravi Bhavnani19-Dec-06 11:12
professionalRavi Bhavnani19-Dec-06 11:12 
Questionstretch a character width horizontally in in rich text box - c# Pin
charlespratheepan19-Dec-06 8:43
charlespratheepan19-Dec-06 8:43 
AnswerRe: stretch a character width horizontally in in rich text box - c# Pin
Larantz19-Dec-06 9:55
Larantz19-Dec-06 9:55 
GeneralRe: stretch a character width horizontally in in rich text box - c# Pin
charlespratheepan19-Dec-06 18:33
charlespratheepan19-Dec-06 18:33 

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.