Click here to Skip to main content
16,010,918 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionLocal Server Pin
sanforjackass17-Dec-09 8:29
sanforjackass17-Dec-09 8:29 
AnswerRe: Local Server Pin
David Mujica17-Dec-09 8:38
David Mujica17-Dec-09 8:38 
GeneralRe: Local Server Pin
sanforjackass17-Dec-09 8:44
sanforjackass17-Dec-09 8:44 
GeneralRe: Local Server Pin
ESTAN17-Dec-09 13:08
ESTAN17-Dec-09 13:08 
GeneralRe: Local Server Pin
shiva.kore17-Dec-09 19:38
shiva.kore17-Dec-09 19:38 
Questionado.net - DataRelation Vs InnerJoin Pin
Hanzaplast17-Dec-09 4:33
Hanzaplast17-Dec-09 4:33 
AnswerRe: ado.net - DataRelation Vs InnerJoin Pin
Abhishek Sur17-Dec-09 5:16
professionalAbhishek Sur17-Dec-09 5:16 
GeneralRe: ado.net - DataRelation Vs InnerJoin Pin
Hanzaplast17-Dec-09 6:55
Hanzaplast17-Dec-09 6:55 
i will try to simplify as much as i can what i wrote ahead.

let's say i need WebControl that can manipulate data from database. WebControl should have 3 fields (columns). when editing or inserting data via this control, first field is plain text (TextBox), other two must be falling menus (DropDownList).

in database i have 3 tables

first table have this structure:
------------------------------------------
id | TextField | Foregin1_id | Foregin2_id
------------------------------------------
second and third have this structure:
---------
id | name
---------

i need to join first table with other two, then bind it to WebControl.

so this is my work:

1. i created custom control (class) "MyGird" inherited from the System.Web.UI.WebControls.DataGrid.

2. i created sql query
select
	TextField, t2.name, t3.name
from (
	table1 t1 inner join table2 t2 
	on t2.id=t1.Foregin1_id
)
inner join table3 t3
on t3.id=t1.Foregin2_id


3. i created some code in "MyGrid" that examines sql query, creates DataSet and fill it with all 3 tables, and finaly calls DataBind() function from it's base class System.Web.UI.WebControls.DataGrid.

After bind i have "custom datagird" MyGrid. i can edit MyGrid and manipulate (insert, delete, update) data from first table of database in many ways, depending on "some code i created".

so the "problem" is that this "some code i created" is not very "nice". some parts of code is hard to read. globaly this approach doesn't feels right.

so question is; can i use DataRelation for joining data from more tables instead of using sql join? DataRelation seems to me like thing i have been mising for creating "MyGrid" in right way....
Questionchart in crystalreport Pin
ptvce17-Dec-09 1:15
ptvce17-Dec-09 1:15 
AnswerRe: chart in crystalreport Pin
Abhishek Sur17-Dec-09 5:08
professionalAbhishek Sur17-Dec-09 5:08 
QuestionDynamic updation after publishing Pin
SreejithKumar M16-Dec-09 23:45
SreejithKumar M16-Dec-09 23:45 
AnswerRe: Dynamic updation after publishing Pin
Arindam Tewary17-Dec-09 0:12
professionalArindam Tewary17-Dec-09 0:12 
QuestionWeb to Desktop! Pin
Sr...Frank16-Dec-09 23:42
Sr...Frank16-Dec-09 23:42 
AnswerCross post Pin
dan!sh 17-Dec-09 0:38
professional dan!sh 17-Dec-09 0:38 
AnswerRe: Web to Desktop! Pin
Abhishek Sur17-Dec-09 1:37
professionalAbhishek Sur17-Dec-09 1:37 
QuestionDelete a file Pin
Abbas_here16-Dec-09 23:39
Abbas_here16-Dec-09 23:39 
AnswerRe: Delete a file Pin
Arindam Tewary17-Dec-09 0:44
professionalArindam Tewary17-Dec-09 0:44 
GeneralRe: Delete a file Pin
Abbas_here17-Dec-09 1:16
Abbas_here17-Dec-09 1:16 
GeneralRe: Delete a file Pin
Arindam Tewary17-Dec-09 1:55
professionalArindam Tewary17-Dec-09 1:55 
QuestionModelDialog Window Vs Normal pop up dialog window Pin
kyreddy16-Dec-09 22:46
kyreddy16-Dec-09 22:46 
QuestionCool Iris .... Pin
Subin Mavunkal16-Dec-09 20:54
Subin Mavunkal16-Dec-09 20:54 
AnswerRe: Cool Iris .... Pin
John Bracey16-Dec-09 21:29
John Bracey16-Dec-09 21:29 
Questionwhen page refresh happen Fileupload control get cleared. Pin
chakran16-Dec-09 20:27
chakran16-Dec-09 20:27 
AnswerRe: when page refresh happen Fileupload control get cleared. Pin
dan!sh 16-Dec-09 21:09
professional dan!sh 16-Dec-09 21:09 
GeneralRe: when page refresh happen Fileupload control get cleared. Pin
chakran16-Dec-09 21:46
chakran16-Dec-09 21:46 

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.