|
This isn't a complete solution but hopefully it will get you started....
This is a brief sample of a datagrid I created in v1.1 that had a "View Details" image button in the 1st column of the datagrid. This image was the same for each row with an image filepath that I hardcoded:
1) datagrid id="dgrdSample"
2) Add OnItemCommand="dgrdSample_ItemCommand" to the datagrid tag
3) First column was a "ButtonColumn":
<asp:ButtonColumn ButtonType="LinkButton" HeaderText="Sample" Text="<img src='../images/viewDetails.jpg' border='0'>" CommandName="select"></asp:ButtonColumn>
4) Add this to your codebehind:
protected void dgrdSample_ItemCommand(Object s, DataGridCommandEventArgs e)
{
//Add your code here for whatever you wish to happen
}
Hope this helps get you started.
-Goalie35
|
|
|
|
|
thank u Goalie35
it is so helpful
but i want to make the imagebutton fetch the image url from the database
can u tell me how
thanks
rony
|
|
|
|
|
How to get the display of Datagrid in runtime.(C#+Asp.net)
i m not able to view the Grid.
Regards
Shriya
|
|
|
|
|
Hi,
This LINK[^] may help you out.
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
R u getting values from a database.
|
|
|
|
|
hi
give autogeneratecolumns=true in datagrid html form
regards
saravanan
|
|
|
|
|
Dear All
i'm using the query string to hold values between webforms but i'm facing a problem with special characters ther become something else
the % becomes / and some other code...
how can i get the query string varaibles through javascript and return them as they are?
tried the escape and unescape function but it also didn't work
here's a sample of the key i'm sending in the query string:
chvVXMSF1BzwcdoDe899FfSxnhSrmxrr219T6Uvjv7MjryZE5QSx69RqVW7LmyFVyGucC9iV%252FVFVTW830hbjoYEO0U%252BHQXDaf5txVcKGAWcr6a7Wo3ZSyFMF%252FxHXbjO5uWFScCM%252Bs8X57ihH5nanC9KeLTErLX3VopuPpNcK%252BLivM4mA9%252FVJ9aqYvuBS%252F4NsfLVZtFIsQbv0EOqkT4%252BLpv8Cej%252F%252F9zt7S3fW%252F1wLJ8gO0h%252BNdQTHiFq%252BSjXwtO9s7hcxzz1Gxr2OQV0%252BwO9zAJLLL5mkVLIXx2uaPXLhAbFLNMOxNPAlQpDFPFXJLfiYwfV7ucSPgqlU%252Fy3wjN2QKzyMVWj8%252BZ8GYuPGOndBsQ3SeCYrButJIMOMIGxWLRvs
i can't move it as is
Best Regards
3ala2
|
|
|
|
|
|
hi all.....
can anybody give some idea to display an hourglass until the pages get loaded into the frames of page.
in my page i have 4 frames and m displaying each frame with an aspx page.
i want to display an hourglass until the last page get loaded.
one thing there is no order of pages loading in.
so pls give me some idea
thanks in advance
|
|
|
|
|
Dear,
you can use the javascript setTimeOut function which will check the frames if loaded every specific time ( you set the specific time) below is an example
window.onload = function() {setTimeout(\"if(self.parent.frames['FRAME3'].document.readyState!='complete'){document.body.style.cursor = 'Wait';}else{document.body.style.cursor = 'default'}",100)}
Repeat this for each frame you have.
Happy Coding
http://dotnetslackers.com/community/blogs/haissam/default.aspx
Best Regards,
Haissam Abdul Malak
|
|
|
|
|
thanks for quick reply.
m not clear can u pls explain me where should i need to write this.
thank you
|
|
|
|
|
Dear,
first create a function in javascript
function checkloaded(id1,id2,id3,id4)
{
setTimeout("if(self.parent.frames[id1].document.readyState!='complete' | self.parent.frames[id2].document.readyState!='complete'| self.parent.frames[id3].document.readyState!='complete' |self.parent.frames[id4].document.readyState!='complete'){document.body.style.cursor = 'Wait';}else{document.body.style.cursor = 'default'}",100)}
}
now onload in your tag, call this function and send your 4 frames id as parameters
Happy Coding
http://dotnetslackers.com/community/blogs/haissam/default.aspx
Best Regards,
Haissam Abdul Malak
|
|
|
|
|
thank u very much
but i dont have body tag.
thank you
|
|
|
|
|
my page is like this
where should i call onload ?
thank you
|
|
|
|
|
what is the difference between codebehind and src in @page directive.
Thanks in advance,
Regards,
Prya
|
|
|
|
|
Dear,
if you are using Visual studio you have to use the codebehind directive because VS precompiles your application. if you use src, it means that you want to compile it straight away. if you using another developement suite u are required to use the src directive
Happy Coding
http://dotnetslackers.com/community/blogs/haissam/default.aspx[^]
Best Regards,
Haissam Abdul Malak
|
|
|
|
|
How Can I access the contrl of one page in another page.
|
|
|
|
|
You can create a public property for that control on the page in question, but this is not a great way of accessing data (for a web application).
|
|
|
|
|
If you are using cross postback in 2.0, use the "PreviousPage" object and type cast it to the called page and access it controls.
Arun
|
|
|
|
|
Hello everybody, i am a rookie for ASP.net, just got a problem now, when i wanna close a webpage through a button, i type
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.closeBut.Attributes.Add("onclick", "window.close();");
}
}
but i dont know y i can not close it. can anybody help me to solve this question, thanks a lot~~
Calvin
|
|
|
|
|
there's nothing wrong with the code.
Button1.Attributes.Add("onclick", "window.close();");
try changing the case of onclick to onClick.maybe some case-sensitivity issue.
|
|
|
|
|
ok, i will try, thanks a lot;)
|
|
|
|
|
Dear,
first check if your page_load event is working. i mean if the code in this event is getting compiled by putting a breakpoint at the beginning to this event.
if yes, the code seems working. put the button id as it is because it's case sensitive.
urbuttonid.Attributes.Add("OnClick", "self.close()");
Happy Coding
http://dotnetslackers.com/community/blogs/haissam/default.aspx
Best Regards,
Haissam Abdul Malak
|
|
|
|
|
Hi!
I have a DB table that references it self to create a hierarky. If the ParentRoleId column is null then the Role represents a top level role:
Database columns:<br />
RoleId PK (Identity)<br />
ParentRoleId FK (Allow null)<br />
RoleValue
Now to the question: I'm using typed datasets as database access, but the generated code for the ParentRoleId column is of the type int and thus doesn't support null.
How should I create a workaround for this?
|
|
|
|
|
Aloha,
We have a datagrid with some templatecolumns that show datetime data in an European format (day/month-year).
Everything looks great, but they don't sort correctly. It looks like they are sorted like normal text strings, so day is considered before month and year:
11-05-2006 - should appear last, since it's later than all the other dates
12-04-2006
13-04-2006
14-04-2003 - should appear first
Any idea how to fix this?
Thank you,
|
|
|
|