|
i think it should be help u
Dim m_dataview As Data.DataView
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
I think u just want to know the definition of dataview.
u can assign datatable rows to dataview.
U can add,delete and edit row using dataview.
U can also set true or false to allow to add,delete,edit row of dataview.
U can sort out data using dataview.
U can find rows of dataTable using findRow property of dataview.
There are many properties of dataview.
for more info.. search in google
Best regard
pathan
---------------------------------------------------
|
|
|
|
|
thanks pathan
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Dear all,
i am using asp.net ,C# , Microsoft internet explorer 6 version ans iis5.0.
My problem is gridview data does not get exported in explorer whereas when i select firefox it exported to excel.
i change the internet security setting to low and added the site to trusted sites .
what could be the reason.
please help.
code to export is
Response.Clear();
Response.AddHeader("content-disposition", "attachmentfilename=FileName.xls");
Response.Charset = "";
// If you want the option to open the Excel file without saving than
// comment out the line below
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
GridView1.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
please guide me.
thanks
imaran khan
|
|
|
|
|
hi all,
my website registration happens in 2 or more pages. i save the user information of the first page in the session variable and then when i try to redirect to second page it fails.
in second page i check if session data is present from first page else i would redirect to the first page from second page.error occured is given below
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
at System.Web.HttpResponse.Redirect(String url)
at HomeAccounts.registerCLI.Page_Load(Object sender, EventArgs e)
how can i resolve it
any suggestions or help are welcome...
thanks in advance.
Rama Charan Prasad
"Be happy and Keep smiling.Thats what u want be always.. "
|
|
|
|
|
|
thanks for reply ..
but i am not using server.Transfer i am using response.redirect so the error is something different
please help
Rama Charan Prasad
"Be happy and Keep smiling.Thats what u want be always.. "
|
|
|
|
|
Hello
If I want to perform a web based installation like what Symantec anti virus provides for installing updates, what are the things we have to take into consideration. I am new to web based development and unaware of the various factors to be considered during web based development. Is it possible in VC++ ?
Thanx.
|
|
|
|
|
You however need some client agent running on the desktop to recieve the installables and execute on the system running the web browser (at least an ActiveX Control).
|
|
|
|
|
Hi
i am trying to display data on a gridview but it doesn't display anything and it doesn't give any error.
here is my code
string conString = @"Data Source=jakes;Initial Catalog=K2;User ID=sa";
SqlConnection conProcinst = new SqlConnection(conString);
conProcinst.Open();
DataSet dsProcinst = new DataSet();
SqlDataAdapter daProcinst = new SqlDataAdapter();
try
{
SqlCommand cmdProcinst = new SqlCommand("SELECT * FROM _ProcInst", conProcinst);
daProcinst.SelectCommand = cmdProcinst;
daProcinst.Fill(dsProcinst,"_ProcInst");
GridView1.DataSource = dsProcInst;
GridView1.DataBind();
GridView1.AllowPaging = true;
Mamphekgo
|
|
|
|
|
Check whether you query returns any records!
Check your connection string. provide password too
gauthee
|
|
|
|
|
My connection string is fine because i copied.
Mamphekgo
|
|
|
|
|
now it gives me this error.
The data source does not support server-side data paging
Mamphekgo
|
|
|
|
|
Mamphekgo wrote:string conString = @"Data Source=jakes;Initial Catalog=K2;User ID=sa";
I think in ur constring database server name is missing, try to include the server name.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Will @ symbol comes in the connction string.
Mostly the @ symbol will be used for c# coding while giving long path of the source file where two slashes should be used.
Eg: in C# - @"C:/Myfolder/DBname"; or we can write "C://Myfolder//DBname";
Check without using the @ symbol.
VanithaVasu
|
|
|
|
|
is there any diffeence between database/initial catalog
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
no is the samething
Mamphekgo
|
|
|
|
|
mamphekgojakes wrote: i am trying to display data on a gridview but it doesn't display anything and it doesn't give any error.
here is my code
1. Is your select query returning values in query analyzer ?
2. What is your page size ? Try commenting the allow paging line.
3. Put break point and ensure your dataset contains rows.
|
|
|
|
|
I am having two image buttoms - One is ADD button and another is Delete Button, and two dropdownlists one with project names and another ddl with task names of the particular project.
1.) I click the project and onSelectedIndexchanged of project i get the task names and from the tasks i select one task.
2.) Now i want to add new row to the datagrid and when i add i create a row dynamically.
But the values in the previous rows disappear. How do i maintain the selected values of the controls during runtime even if i add aor delete rows.
Can u please help me to find out the solution.
VanithaVasu
|
|
|
|
|
Check when your grid is being filled!
Normally binding values to datagrid would be done in the pageload and when it is not post back.
gauthee
|
|
|
|
|
I have filled my grid and i have written my code after post back only.
here is my code
if(e.Item.ItemType==ListItemType.Item)
{
if(Flag==true)
{
DropDownList drop=(DropDownList)e.Item.FindControl("dd1");
drop.SelectedValue=ddlSelectText;
cmd1=new OleDbCommand("select ptTask from Tasks where ptId="+taskid+"",con);
}
else
{
cmd1=new OleDbCommand("select ptTask from Tasks where ptId=1",con);
}
con.Open();
rd1=cmd1.ExecuteReader();
while(rd1.Read())
{
ddltasks.Add(rd1.GetValue(0).ToString());
}
con.Close();
if(Flag==true)
{
DropDownList tasklist=(DropDownList)e.Item.FindControl("dd2");
tasklist.DataSource=ddltasks;
tasklist.DataBind();
}
This is my code where i have written in datagrid_ItemBinding.Also this is the page load also. But when i add a new row i get the new row but i didnt get any value which i have set for my previous row.
I should get the value be maintained.
What should i do?
VanithaVasu
|
|
|
|
|
VanithaVasu wrote: Now i want to add new row to the datagrid and when i add i create a row dynamically.
But the values in the previous rows disappear. How do i maintain the selected values of the controls during runtime even if i add aor delete rows.
To understand your problem you need to be familiar about how ASPX page works and ASP.NET page lifecycle. MSDN is having good articles regarding this.
Regarding your problem, You are not getting previous values when new row added because, ASP.NET is not maintaining viewstate for your control. This is happening because you are creating dynamic columns somewhere after Init event. When an ASPX page processes, it will store viewstates in Init event. So whatever dynamic controls created after this event won't maintain viewstate.
To solve your problem, try creating the rows in page_init event. Remember when you create controls in init event, no need to check isPostBack
|
|
|
|
|
It's a repost. I tried different combinations with the problem. But I couldn't find out where I am going wrong.
I created a class which checks session and redirects to login page. My class looks like this. This class inherits Page class to get access to session object.
public class CAuthentication:System.Web.UI.page
{
public CAuthentication()
{
if ( Session["login"] == null )
Response.Redirect("expired.aspx");
}
}
My ASPX.CS looks like
public partial class MyPage:CAuthentication
{
}
This is not working. I am getting error "session can't be used inside a class" . What is wrong here ? Normally codebehind file used to inherit System.Web.UI.Page , Instead of this I inherited this in my CAuthentication class. Where I am going wrong ?
|
|
|
|
|
you dont have to inherit CAuthentication class instead let it be System.Web.UI.Page . You have to assign the session value as null in the session_start ,in the Global .asax.cs file . And also u have to assign the values in the page_load where it can be processed when the session is not null.
VanithaVasu
|
|
|
|
|
VanithaVasu wrote: You have to assign the session value as null in the session_start ,in the Global .asax.cs file
What do you mean ?
I think you are telling to check session null in each page load. right ? To avoid that I have written this one.
|
|
|
|