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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
vivianoPosted Oct 19, 2011, 4:56 AM
Schema database is into ado.net (file dbmx) with relactions.
Must i repeat relactions in the query linq o no?
thanks
Prabhu RajaPosted Oct 19, 2011, 4:16 AM
gridview1.DataSource = q;
gridview2.DataBind();
vivianoPosted Oct 19, 2011, 4:02 AM
vivianoPosted Oct 19, 2011, 3:58 AM
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
Dhaval PatelPosted Oct 19, 2011, 2:53 AM
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
NarayanPosted Oct 19, 2011, 2:29 AM
Prabhu RajaPosted Oct 19, 2011, 1:50 AM