Click here to Skip to main content
15,903,856 members

Comments by sharathrr (Top 2 by date)

sharathrr 3-Aug-12 3:07am View    
Hello,

In my Xaml page contains 1 combobox control (loading MainPurpose from MainPurposeTable) ,textbox control to insert Amount and Add button controls ,
For Add_Click event am inserting the MainPurpose Id and Amount into database and displaying in a datagrid.Its working fine

Am facing problem during editing a datagrid, am getting MainPurposeId and MainPurposeDesc on editing datagrid but not able to show in combobox (both DisplayMemberPath and SelectedValue)

<combobox height="23"
="" selectedvaluepath="MLnMnPurposeTId" displaymemberpath="MLnMnPurposeDesc" horizontalalignment="Left" margin="198,25,0,0" name="cmbMnPurpose" selectedvalue="{Binding MSubPurposeTId,Mode=TwoWay}" verticalalignment="Top" width="189">

<sdk:datagrid autogeneratecolumns="False" height="147" horizontalalignment="Left" margin="24,286,0,0" name="GrdGCA" loadingrow="GrdGCA_LoadingRow" verticalalignment="Top" width="682">

private void GrdGCA_LoadingRow(object sender, DataGridRowEventArgs e)
{
e.Row.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(Row_MouseLeftButtonUp);
}

void Row_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
MnSubPurpose Puropse = GrdGCA.SelectedItem as MnSubPurpose;
LoadGCAMainPurpose();
cmbMnPurpose.SelectedValue = Puropse.MLnMnPurposeTId;
cmbMnPurpose.DisplayMemberPath = Puropse.MLnMnPurposeDesc;
cmbSubPurpose.SelectedValue = Puropse.MLnSubPurposeTId;
}



Can any one help me in this please

Regards,
Sharath
sharathrr 3-Aug-12 3:05am View    
Deleted
Hai

In my Xaml page contains 1 combobox control (loading MainPurpose from MainPurposeTable) ,textbox control to insert Amount and Add button controls ,
For Add_Click event am inserting the MainPurpose Id and Amount into database and displaying in a datagrid.Its working fine

Am facing problem during editing a datagrid, am getting MainPurposeId and MainPurposeDesc on editing datagrid but not able to show in combobox (both DisplayMemberPath and SelectedValue)

<combobox height="23"
="" selectedvaluepath="MLnMnPurposeTId" displaymemberpath="MLnMnPurposeDesc" horizontalalignment="Left" margin="198,25,0,0" name="cmbMnPurpose" selectedvalue="{Binding MSubPurposeTId,Mode=TwoWay}" verticalalignment="Top" width="189">

<sdk:datagrid autogeneratecolumns="False" height="147" horizontalalignment="Left" margin="24,286,0,0" name="GrdGCA" loadingrow="GrdGCA_LoadingRow" verticalalignment="Top" width="682">

private void GrdGCA_LoadingRow(object sender, DataGridRowEventArgs e)
{
e.Row.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(Row_MouseLeftButtonUp);
}

void Row_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
MnSubPurpose Puropse = GrdGCA.SelectedItem as MnSubPurpose;
LoadGCAMainPurpose();
cmbMnPurpose.SelectedValue = Puropse.MLnMnPurposeTId;
cmbMnPurpose.DisplayMemberPath = Puropse.MLnMnPurposeDesc;
cmbSubPurpose.SelectedValue = Puropse.MLnSubPurposeTId;
}

Regards,
Sharath