|
SreejithKumar M wrote: Then css or javascript wont work properly.
Why not ? What makes you think that ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I tried this in css
position:relative;
top:expression(this.offsetParent.scrollTop-5);
it is working in english
but not in arabic language
in arabic allignment direction is right to left
here gridview header is scrolling
|
|
|
|
|
Hi,
I got answer for this solution
I changed
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
to
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
in design page
Then i used follwing css
/* Div container to wrap the datagrid */
div#div-datagrid {
width: 420px;
height: 200px;
overflow: auto;
scrollbar-base-color:#ffeaff;
}
/* Locks the left column */
td.locked, th.locked {
font-size: 14px;
font-weight: bold;
text-align: center;
background-color: navy;
color: white;
border-right: 1px solid silver;
position:relative;
cursor: default;
left: expression(document.getElementById("div-datagrid").scrollLeft-2); /*IE5+ only*/
}
/* Locks table header */
th {
font-size: 14px;
font-weight: bold;
text-align: center;
background-color: navy;
color: white;
border-right: 1px solid silver;
position:relative;
cursor: default;
top: expression(document.getElementById("div-datagrid").scrollTop-2); /*IE5+ only*/
z-index: 10;
}
/* Keeps the header as the top most item. Important for top left item*/
th.locked {z-index: 99;}
/* DataGrid Item and AlternatingItem Style*/
.GridRow {font-size: 10pt; color: black; font-family: Arial; background-color:#ffffff; height:35px;}
.GridAltRow {font-size: 10pt; color: black; font-family: Arial; background-color:#eeeeee; height:35px;}
my aspx page is
<div id="div-datagrid">
<asp:GridView ID="gv5" Width="100%" runat="server" BorderStyle="Solid"
BorderColor="Navy" meta:resourcekey="gv5Resource1" UseAccessibleHeader="True">
<HeaderStyle BorderColor="Black" ForeColor="Black" BackColor="LightSkyBlue"
/>
<AlternatingRowStyle BackColor="Transparent" />
</asp:GridView>
</div>
like this
|
|
|
|
|
in aspx page add itemtemplet
|
|
|
|
|
I am tring to view an image from the SQL server, this is the error msg I get. Please help
this is my code:
string strSQL = "SELECT * FROM tblViewImage WHERE (ImageNumner= 1093414)";
SqlCommand cmd = new SqlCommand(strSQL, conn);
conn.Open();
SqlDataReader dr = cmd.ExecuteReader();
dr.Read();
{
Response.ContentType = dr["ImageType"].ToString();
Response.BinaryWrite((byte[])dr["ViewImage"]);
}
|
|
|
|
|
Have you checked to see what the ImageType is ? You really have a column called ImageNumner ? Why are you hard coding the number ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
The image type is a image/pjpeg. I tried this too and it did not work.
Response.ContentType = dr["ImageType"].ToString();
Response.Expires = 0;
Response.Buffer = true;
Response.Clear();
Response.OutputStream.Write((byte[])dr["ViewImage"], 0, Convert.ToInt32(dr["ImageSize"].ToString()));
Response.End();
|
|
|
|
|
Anita_Kamat_inds wrote: Convert.ToInt32(dr["ImageSize"].ToString()));
Wow - that makes sense.
Did you try writing the bytes to the file system and seeing if they are really a jpeg ? Have you tried more than one image from your DB ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I'm trying to get the AJAX timer control to work. There is a very simple example of this found here:
http://www.asp.net/ajax/documentation/live/tutorials/IntroToTimerControl.aspx
I followed the example yet the timer event never fires. What am I missing?
I'm using VS2005.
|
|
|
|
|
Your code is broken ? Is there a download with the sample, and if so, have you tried that ?
Why do people need the AJAX library just to put a timer in their pages ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I do not want to use AJAX. How can a incorperate a timer on a page without AJAX?
Please refer to the link in the orginal question for the sample code.
|
|
|
|
|
AJAX is just javascript. AJAX exists without the stupid Microsoft AJAX toolkit. There is only one way to have a timer on a page - with javascript. The AJAX toolkit is just wrapping a very basic web dev task for you.
[^]
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks for that info. Can you point to a javascript timer example?
|
|
|
|
|
The ^ in my post is a link. Sorry, I dunno what happened, I just pasted and CP auto formatted, I must have hit space or something, I expected you'd see the URL as well as the ^ for a new window.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: Why do people need the AJAX library just to put a timer in their pages ?
Did I miss the CP announcement that today was Rhetorical Question Day?
The answer is that AJAX solves everything. One day it will discover the body of Jimmy Hoffa. I believe it will be found on an as yet undiscovered computing cloud.
|
|
|
|
|
led mike wrote: The answer is that AJAX solves everything. One day it will discover the body of Jimmy Hoffa
ROTFL !!!
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
|
I have generated dynamic database table in
which the colums will vary as per the selection
by the end user. Now, if my table name is car which
i have generated dynamically on the button save click
event it will have its colums like: colour, gears etc.
So can i generate a dynamic form by taking the cars id
and its column name as the textbox controls on the new
form. The new generated form will also have the basic
funtionality of add, edit,delete etc. If my table is car
then to generate dynamically car.aspx form or if table
is computer then
computer.aspx should be generated.
|
|
|
|
|
Sounds messy to me. I'd think you want to rewrite the URL, and have a common page that gets pointed to at the end of the day.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi
I have been scratching my head on this for days, but getting no where!
Using visual basic and a sqldatasource for my gridview, I need change the colour of a gridview row backcolour plus set a hidden checkbox to checked when the user clicks on an image button. I also need to grab a field value from a row in the gridview.
Now, everything works when I am on the first page, but when I page to the next page I get the following error message "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index".
My image buttons are connected to an onrowcommand in the gridview tag, which checks to see which image button has been called, gets the row number and then calls the appropriate method for that button.
Does anyone have a solution to set a hidden checkbox over a number of pages, grab a field value from the gridview and change the row back colour?
Thanks
|
|
|
|
|
If it works only on the first page, I guess you should post some code so we can look at it.
I'd never use a SQLDataSource tho, that stuff blows.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi
I have managed to crack the problem in so far by adding an onclick event to the image button, but if I page back the grid is refreshed and in turn the rows that have been clicked upon are changed back. Therefore, slightly modified question - how do you maintain those rows with post back?
Thanks
|
|
|
|
|
You need to store the selected page somewhere ( on the URL perhaps ) so you load the correct page when you do a postback.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Sorry, can you explain to me how you would this? I am not clear on what you mean.
|
|
|
|