|
You can create a table with 2 rows.
first row conatining the cols equal to grid.
...
(equal to cols in the grid)
fix the width of the cols of the table equal to grid.
and dont show the header of the grid.
it just give the view as you want.
Pankaj Gupta
(Take it easy)
|
|
|
|
|
hi all,
can anyone help me with displaying of graph dynamically. i am trying to compare with different data in the same graph and while moving mouse over the graph area, a pointer(icon) should move along the graph line.(u can refer to http://finance.yahoo.com/charts).i am restricted not to use any third party tools and to be done using c# and asp.net.
thanks in advance
regards
bskvarma
|
|
|
|
|
Hi,
I want to get the data from database ( table is having only one column ), it has to be displayed as the first column in the grid.( which is a template column ).
Please share your ideas.
Thanks in advance
Regards,
Libran
|
|
|
|
|
hi
What data you are having in your database??? and why you want to display in template column???
|
|
|
|
|
column is having movie shows like morning,noon show, matinee etc.I have other template columns which are having check boxes.
|
|
|
|
|
for selecting check boxes in grid using template column you can use
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox runat="server" />
</ItemTemplate>
</asp:TemplateField>
and so your first column will be template column for selecting movie shows and your second column will be bound field.
so in bound field you give header text = "Movie Show"
and data field property= "Show" and you can write query to select from database like "Select Show from movie"
so your selecting column name and data field value should be same.
Hope this will help
Enjoy
|
|
|
|
|
Hi dj.rock
Thank you.It is worked.
I have posted a new message. Please help me if you know.
Thanks,
Libran
|
|
|
|
|
you are welcome
I will sure work out for your next problem. and if i have solution will tell you
Enjoy ;);)
Regards,
DJ Rock
|
|
|
|
|
|
HI there,
i read ur msg
it ok whts the prob do it
conect with db and do it
mani
|
|
|
|
|
the problem is I have develop a screen, like a matrix. Where I have to get the row names of the first column from database. For other cells i have insert check boxes.
|
|
|
|
|
requiedfieldvalidatorfname.ControlToValidate = txtfname.Text
requiedfieldvalidatorfname.Text = "Please Enter the First Name"
i use for this VB.net in VS.net 2005 so i need to validate the each fields,.which users should fill those field but i'm getting error like this
The ControlToValidate property of 'rfvfname' cannot be blank
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The ControlToValidate property of 'rfvfname' cannot be blank.
pleas help for solve this
|
|
|
|
|
requiedfieldvalidatorfname.ControlToValidate = txtfname.Text
This line will give error as when ur page loads textbox is empty.
try this
requiedfieldvalidatorfname.ControlToValidate = "txtfname"
Regards,
Akhilesh Yadav
|
|
|
|
|
Why aren't you setting these in design mode?
You have to set the validator to the object, not its property.
|
|
|
|
|
Hi all,
I have a data grid to list rows and am printing from IE using javascript window.print(). Its working very fine. But I like to print header in each page of my print. Is it possible?
Also I am using the following script to set up the page break after printing 15 items in a page. It is working all right. Is there any other way to insert page break after certain page margin?
private void dgResults_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
count++;
if(count > 15)
{
e.Item.Style.Add("page-break-after","always");
count = 0;
}
}
}
Is there any similar way to add header in each page? Or is it possible to add ListItemType.Header in the middle?
Thanks and Regards
Renu
|
|
|
|
|
I am trying to install VWD Express, but with no success.
I ran VWDSetup.exe (downloaded from MSFT website) - the process froze while running Setup.exe (CPU use 99% - had to kill via. task manager).
I tried installing .NET 2.0 framework first, but this hit the buffers when trying to run
"C:\windows\microsoft.net\framework\v2.0.50727\RegSvcx.exe" bootstrapi and ngen.exe (6 times) and I had to kill these via. the task manager.
Then it tells me ".NET 2.0 framework has been successfully installed" when I know that it hasn't!
Help!! I'm at a loss as to what to do next. Has anyone any ideas?
For the record, I am installing on a standalone laptop running XP Pro, 512Mb RAM. There are no previous versions of ASP.NET or .NET framework installed.
Any help would be appreciated.
Alan
|
|
|
|
|
Hi there,
If u wnat to install u must require min 1GB Ram then only it will works fine.
Regards,
Satips.
|
|
|
|
|
I can pass a one dimensional array [where PathArray = new Array(1,2,3) is a one dimensional array] simply using: RegisterArrayDeclaration("MyArray", PathsArray)
However if PathArray is multidimensional, for instance if PathArray[0][1] = "one" , PathArray[0][1] = "two", when I pass it using the above, MyArray on the client is one dimensional: MyArray[0] = "one" MyArray[1] = "two"
Is there a way to maintain the integrity of a multidimensional array passed to the client?
Tom
|
|
|
|
|
Yes, but the RegisterArrayDeclaration does not support multi dimensional arrays, so you have to create the Javascript code for the array yourself.
As Javascript doesn't have multi dimensional arrays, you have to use a jagged array instead (an array of arrays).
The syntax in Javascript to create a jagged array is:
var MyArray = [['one','two']['three','four']['five','six']];
You just have to figure out how to put together a string that looks like that from your data, and use RegisterStartupScript to add it to the page.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks you.
As you can no doubt tell I'm quite new to ASP.NET / Jscript.NET, though very experienced with Jscript5.6... I had built a jagged array as you described on the server ... I'll look at RegisterStartupScript to see how I might use that to move the array to the client.
I've wondered too about working with the ArrayList Class in System.Collections ... do you know if there's any real advantage to using that instead of the Array Object?
BTW, here's my server side code (more or less)....
<br />
var DirPathIs : String;<br />
var MultLvArr : Array = new Array();<br />
var FiltSlash = /\\/g;<br />
var FltToRel = /topicsdir.+$/i;<br />
var FiltFName = /[ \w\-\(\)]+(?=\.ssproj)/i;<br />
var ClnPath : String;<br />
var ClnName : String;<br />
<br />
for(i in AllTopics){<br />
DirPathIs = AllTopics[i].Name;<br />
MultLvArr[i] = new Array();<br />
MultLvArr[i][0] = "\""+DirPathIs+"\"";<br />
MultLvArr[i][1] = new Array();<br />
ByTpcFilesItr = AllTopics[i].GetFiles("*.ssproj", SearchOption.AllDirectories);<br />
for(q=0; q<ByTpcFilesItr.length; q++){<br />
ClnName = ByTpcFilesItr[q].Name;<br />
if(FiltFName.test(ClnName)){<br />
ClnName = ClnName.match(FiltFName)[0];<br />
}<br />
ClnPath = ByTpcFilesItr[q].FullName;<br />
ClnPath = ClnPath.replace(FiltSlash, "/");<br />
if(FltToRel.test(ClnPath)){<br />
ClnPath = ClnPath.match(FltToRel)[0];<br />
}<br />
else{<br />
ClnPath = "none";<br />
ClnName = "File Path Error";<br />
} <br />
MultLvArr[i][1][q] = new Array("\""+ClnName+"\"", "\""+ClnPath+"\"");<br />
}<br />
}<br />
RegisterArrayDeclaration("MultLvlPathsItr", MultLvArr);
|
|
|
|
|
hi dears,
I upload my database to my sql server 200 host and have a website project in VS2005 with a connectionString like this "Persist Security Info=False;User ID=myUser; Password=myPass;Initial Catalog=myDataBaseName;Data Source=sql.myserver.org" . when I run my app on my pc I can connect(!!!) to database and show data in app, but when I upload my website I can`t connect!!! what should I do to fix this problem ?
Regards,
-- modified at 17:53 Thursday 2nd November, 2006
|
|
|
|
|
What error message do you get?
---
b { font-weight: normal; }
|
|
|
|
|
error message is : Login Faild!
the problem is I can connect from my pc , but when I upload the site it`s impossible...!
|
|
|
|
|
Where is the database server located?
---
b { font-weight: normal; }
|
|
|
|
|
I am not sure why I am getting this error if I have included: "IF NOT GOSSearchRS.BOF AND GOSSearchRS.EOF THEN". I hate to include the whole code but it may prove necessasry to get a response. It runs OK when I submit an empty value but if I search for something that's not in the database I get the error. See Error and Source Code Below.
Error Type:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/gregstore/GregStoreMPSearchPage.asp, line 117
Source Code:
<!-- #INCLUDE FILE="adovbs.inc" -->
<!-- The file above is need for the usage of cursors used with retrieving the recordset. -->
<%
'Get Search Phrase
SearchFor = TRIM( Request( "searchfor" ) )
'Open database connection
Set dbCon = Server.CreateObject( "ADODB.Connection" )
dbCon.Open "GregStore"
%>
<HTML>
<HEAD><TITLE>Welcome to Greg's Online Store - Search </TITLE></HEAD>
<body link ="#ff4040" vtext="lightred" bgcolor="White">
<center>
<table width=640 border=0 cellspacing=0 cellpadding=0>
<tr>
<td bgcolor="lightblue">
<img src="belizeflag.gif">
<font size="5"><b>Welcome to Greg's Online Store!!</b>
</td>
<td align = right valign = "bottom">
<a href="cart.asp">Shopping Cart </a>
|
<a href = "account.asp"> Account </a>
</td>
</tr>
<tr>
<td colspan=2>
<hr width = "640" >
</td>
</tr>
</table>
<table width = 640 border=0 bgcolor="Azure" cellpadding=0 cellspacing=0>
<tr> <td valign = "top">
<table border=0 cellpadding=0 cellspacing=0>
<tr> <td valign = "bottom" bgcolor= "pink">
<img src="search.gif" vspace=0 border=0></td>
</tr>
<tr>
<td>
<table width = "200" border=1 cellpadding=4 cellspacing=0 bgcolor="lightyellow">
<tr>
<td>
<FORM METHOD="POST" ACTION = "GregStoreMPSearchPage.asp">
<input name = "searchfor" size="15">
<input type = "submit" value = "Search">
</form>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td valign="bottom">
<img src = "Categories.gif" vspace=0 border=0></td>
</tr>
<tr>
<td>
<table width="200" cellpadding=4 cellspacing=0 bgcolor="lightyellow" border=1>
<tr>
<td>
<font size="3"><b>
<!-- #INCLUDE FILE="GregStoreProductCategory.asp" -->
</b></font>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td><td valign="top">
<%
'Get The curent Page
pg = TRIM(Request( "pg" ))
IF pg = "" THEN pg = 1
SET GOSSearchRS = Server.CreateObject( "ADODB.Recordset" )
GOSSearchRS.ActiveConnection = dbCon
GOSSearchRS.CursorType = adOpenStatic
GOSSearchRS.PageSize = 5
'SQL Query String
sqlString = "SELECT product_id, product_picture, product_name, product_briefdesc " &_
"FROM Products " &_
"WHERE product_status = 1 " &_
"AND (product_name LIKE '%" & SearchFor & "%' " &_
"OR product_briefdesc LIKE '%" & SearchFor &"%' ) " &_
"ORDER BY product_name "
GOSSearchRS.OPEN sqlString
GOSSearchRS.AbsolutePage = pg
IF NOT GOSSearchRS.BOF AND GOSSearchRS.EOF THEN
%>
<table width="350" cellpadding=5 cellspacing=0 border=0>
<tr>
<td colspan=2>
<font size="3" color="darkblue">
<b>Search Results:</b>
</font>
</td>
</tr>
<% WHILE NOT GOSSearchRS.EOF AND rowCount < GOSSearchRS.PageSize
rowCount = rowCount + 1 %>
<tr>
<td>
<% IF GOSSearchRS( "product_picture" ) <> "?????" THEN %>
<IMG SRC = "<%=GOSSearchRS( "product_picture" ) %>"
HSPACE=4 VSPACE=4 BORDER=4 align="center">
<% END IF %>
</td>
<td>
<a href="GregStoreProduct.asp?pid=<%=GOSSearchRS( "product_id" )%>" >
<b><%=GOSSearchRS( "product_name" )%></b></a>
<br><%=GOSSearchRS( "product_briefdesc" )%>
<br><a href= "GregStoreProduct.asp?pid=<%=GOSSearchRS( "product_id" )%>" >
get more information</a>
</td>
</tr>
<tr>
<td colspan=2 align="center">
</td>
</tr>
<%
GOSSearchRS.MoveNext
WEND
%>
</table>
<%
IF GOSSearchRS.PageCount > 1 THEN
%>
<font color = "darkgreen">
<b>Go to Page: </b>
<%
FOR i = 1 to GOSSearchRS.PageCount
IF i <> cINT( pg ) THEN
%>
<a href="GregStoreMPSearchPage.asp?searchfor=<%=Server.URLEncode( searchfor )%>&pg=<%=i%>">
<%=i%></a>
<%ELSE%>
<b><%=i%></b>
<% End IF %>
<% Next %>
</font>
<% End IF %>
<% else %>
<table width="350" cellpadding=5 cellspacing=0 border=0>
<tr>
<td>
<font face="Arial" color="darkblue">
<b>No Product Matched your search Terms </b>
</font>
</td>
</tr>
</table>
<% End IF %>
</td></tr>
</table>
<hr width=640>
Copyright © 2006 Dominguez-Burns Inc.
</center>
</body>
</HTML>
Greg
Coding makes the world go round!!!
|
|
|
|