|
In the database , there are two tables.the second one has id of the first one. i mean there is primary-foreign key relationship.
Now i am comming back to the point , in the itemtemplate , the record are from first table and in the edit item template , there is a gridview, which contains the record from second table(second table contains the foreign key field), so there in the edit item template , how i should display the pertaiing records from second table.
records are currently appearing in item template.problem is in the edit item template.
Please help.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Can u be a bit more specific...
|
|
|
|
|
i have to put the grid view in the edit item template of the the grid view , the inner gridview will have thedata from different table and outer gridview will have data from another table.how to implement this thing. cueerntly the item template is working .
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
What you're looking for is called a master detail view. I would usually use nested repeaters to create such a view, because of the control you get when using them. However, there is a bunch of google[^] hits on doing it in a gridview, I'm not sure if they will help tho, because you want the edit template to show the detail view ? You may need to roll your own solution with a repeater, I'm not sure.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
this is the sort of thing i wanted to do
but i want the show button in the gridview which will show the pertaining records.it should not show the pertaining records directly
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: this is the sort of thing i wanted to do
wow,,,, what a link...
Hello miss.. please think twice before updating anything here
U have put link but Miss yr link is of yr localhost so how anyone else come to know that wt u want ?
Thanks,
Sun Rays
Rate this post if you like answer.
|
|
|
|
|
sir , i committed any mistake?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Click on the link... u vl find ur mistake...
But It will be good if we can see what exactly u want and how far u have done... Try if u can do something.
|
|
|
|
|
sir, i merely wanted to display a gridview in a gridview sample.it is showing the same.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Ok fine. Now go home open the codeproject and click on the link.
U are there so u can access yr localhost but we (other) cant do that...
Thanks,
Sun Rays
Rate this post if you like answer.
|
|
|
|
|
OK - to reiterate what I've said before: read your book. Giving me a link to your local machine won't work, localhost on my machine is MY file system. Not yours.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian , sorry for all the misunderstanding , actually the thing is , the link belongs to the sample , which i explored on the net.it's not my pogram link
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: this is the sort of thing i wanted to do
this sort of thing you can do only in your system.
Regards - J O H N -
<- Life is not measured by the number of breaths we take, but by the moments that take our breath away. ->
|
|
|
|
|
|
Have you any idea about DataRelation?
If yes follow following code
DataSet ds=
DataRelation dr = new DataRelation("new_relation",ds.Tables[0].Columns["PKey"],dst.Tables[1].Columns["Pkey"]);
ds.Relations.Add(dr);
parentGridView.DataSource=ds.Table[1];
parentGridView.DataBind();
Now onRowDataBound event of parent gridview
GridView rp = (GridView)(e.Row.FindControl("ChildGridViewID"));
rp.DataSource=((DataRowView)(e.Row.DataItem)).CreateChildView("new_relation");
rp.DataBind();
bEst regard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thank Sir
Let's try the code.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
hi frns
i have developed one application in that i have one gridview in that i have one column (filename)with hyperlink when i click on that link i am getting the filedownload window asking to save or open but i want the file to be displayed directly instead of asking in the browser.
any suggestions grately appreciated
regards
sunilwise
-- modified at 4:35 Thursday 15th November, 2007
|
|
|
|
|
Link to a page which takes the filename off the URL and does a Response.BinaryWrite to send the file into the browser to be displayed.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
its working in local system but if i try to open it in another system which is connected through lan again that filedownload window is opening sir
|
|
|
|
|
This is a sure sign that your overall design is broken, because it's working when your code can assume that the client is the server.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
If you are using Response.AppendHearder("Content-Disposition"........) remove it, it will be open in same window and will not give you any popup. Add all the content to Response.BinaryWrite(byte[],offset,count);
|
|
|
|
|
Mr.Prateek G could u please tell me how to use Response.BinaryWrite method what are the values i have to give for the attributes byte, offset and count
i have never used this Response.BinaryWrite method
i am getting only the path and filename
|
|
|
|
|
Try this
string sourceFile = "C:\\Documents and Settings\\PrateekGupta\\Desktop\\pref.xml";
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/octet-stream";
FileInputStream filIpStrm = null;
MemoryStream ms = new MemoryStream();
filIpStrm = new FileInputStream(sourceFile);
sbyte[] buffer = new sbyte[1024];
int len = 0;
while ((len = filIpStrm.read(buffer)) >= 0)
{
byte[] bbuffer = new byte[1024];
System.Buffer.BlockCopy(buffer,0,bbuffer,0,1024);
ms.Write(bbuffer,0,1024);
}
Response.OutputStream.Write(ms.ToArray(), 0, Convert.ToInt32(ms.Length));
filIpStrm.close();
Response.End();
let me know if it will work for u...
|
|
|
|
|
Hi,
I want to uploading a image and retrive, i uploaded but in database its storing like binary data, so iam not getting my image in output. Iam using mssql.
Can u pls help me
krishna
krishna
|
|
|
|
|
OK, you have a few problems here
1 - binary data is how you want to store it, you just need to turn that data back into an image, which you do by putting it into a memory stream and building an Image out of that.
2 - because you're using ASP.NET, any images you store in the database can only be served inside a page if you feed them out through a HTTPhandler. A far easier approach is to store the images in your file system and store the path to them in SQL Server.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|