Dear all
1)I have created Group Table (grp_id,Grp_Name) where iam storing group like 'Nokia,Samsung' etc
2)then i have created Product Master(pid,ProductName,grp_id,rate)
In Product Master form i have use Displaymemeber & valuemember property of combo box which display Grp_Name & grp_id in combobox from Group Master table.
When iam saving data to Product Master, it save like this:
Pid ProductName grp_id rate
1 Nokia1100 1 1200
2 Nokia1000 1 1500
3 Samsung3500 2 2000
Till it is ok.
My problem occurs when displaying record.
It doesn't fectch groupNam on form. i know that iam not saving Groupname.
But can i show groupname in Combobox at the time of editing record Same as when i loading form.
Plz help me out!!!!!!!
Loading

Javeed M ShaikhPosted Oct 27, 2011, 3:51 PM
Pravin GhadgePosted Oct 29, 2011, 4:58 AM
Pravin GhadgePosted Oct 29, 2011, 4:09 AM
Iam now using datagridview comboboxcell.
Here iam working with same scenario.
But here it is not showing name.
& how should i use Selectedvalue property of combobox same for Comboboxcell
Pravin GhadgePosted Oct 29, 2011, 1:47 AM
Javeed,
I have replaced selecteditem to selectedvalue. At that time it wasn't worked for mw.
Bt yesterday when i put debug to run code. The debug was not matching with that code. Then i have deleted the debug folder of my project. so it is working right now with same code only.
Thanx
Suthish NairPosted Oct 28, 2011, 3:03 PM
Pravin GhadgePosted Oct 27, 2011, 4:11 PM
no result
@Suthish
No iam not using combobox in datagridview
Thanx
Pravin GhadgePosted Oct 27, 2011, 3:09 PM
oDAL.Fill_Combo_Value_Display_ID(cmbGroupName, "Select grp_id,Grp_Name from tbl_Master_Group", "grp_id", "Grp_Name");
public void Fill_Combo_Value_Display_ID(ComboBox cmb, string Query,string Value,string Display)
I have use AddValue class For fetching values public class AddValue
Edit Record:
Suthish NairPosted Oct 27, 2011, 2:25 PM
Javeed M ShaikhPosted Oct 27, 2011, 1:57 PM
Pravin GhadgePosted Oct 27, 2011, 1:44 PM
it gives me null when i quickwatch the combobox bt in datareader it shows me the exact value.
Javeed M ShaikhPosted Oct 27, 2011, 1:36 PM
Pravin GhadgePosted Oct 27, 2011, 10:16 AM
I have Product Master form where i have Group name as combobox. In this combobox iam showing GroupName using Displaymember property which iam fetching from Group Master.
At the time of saving the form data iam only saving groupid not the group name in database.
So at the time of editing record, how should i show groupname in combobox without join.
Plz revert back....
Javeed M ShaikhPosted Oct 27, 2011, 9:40 AM
The question is not clear, do you want to show group name on the form than why dont you join the two tables and get the group name along with other details. Please if you can be more clear and specific in your requirements it will help us to try and provide some solution.