I have 1 parent table and 5 child tables.
how can source datagrid without using a view sqlserver?
grazie....thanks!!!
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Prabhu RajaRank #861 · 2.6K reputationPosted Oct 18, 2011, 9:50 PM EDT
NarayanRank #8,477 · 221 reputationPosted Oct 18, 2011, 10:29 PM EDT
Dhaval PatelRank #1,023 · 1.9K reputationPosted Oct 18, 2011, 10:53 PM EDT
Are you want to without using view make query for source display in gridview right
but i tell you one thing View is also Sql Query .
and also you can use join for one parent and five child to show all record
one parent table p1
five child table c1,c2,c3,c4,c5
select p1.name,c1.name,c2.name,c3.name,c4.name,c5.name
from p1
inner join c1 on p1.p_id =c1.c1_id
inner join c2 on p1.p_id =c2.c2_id
inner join c3 on p1.p_id =c3.c3_id
inner join c4 on p1.p_id =c4.c4_id
inner join c5 on p1.p_id =c5.c5_id
You are try to change this query regarding you want
and if you create view is not effect on this query
create view vwtemp as
select p1.name,c1.name,c2.name,c3.name,c4.name,c5.name
from p1
inner join c1 on p1.p_id =c1.c1_id
inner join c2 on p1.p_id =c2.c2_id
inner join c3 on p1.p_id =c3.c3_id
inner join c4 on p1.p_id =c4.c4_id
inner join c5 on p1.p_id =c5.c5_id
viviano28 reputationPosted Oct 18, 2011, 11:58 PM EDT
If I use to populate a viewsql unadatagrid, when I update the data, datagrid does not update.
The datagrid does not update either by forcing the refresh of the domain Contex by XAML.
i try with storedprocedure....
thankssss
viviano
viviano28 reputationPosted Oct 19, 2011, 12:02 AM EDT
Prabhu RajaRank #861 · 2.6K reputationPosted Oct 19, 2011, 12:16 AM EDT
gridview1.DataSource = q;
gridview2.DataBind();
viviano28 reputationPosted Oct 19, 2011, 12:56 AM EDT
Schema database is into ado.net (file dbmx) with relactions.
Must i repeat relactions in the query linq o no?
thanks