|
Sorry i didn't get the answer. it worked for the first time. I have given the response.redirect(page & querystring). without the query string it is redirecting to the next page, but when i am giving the query string i am getting the error. So i removed the query string and given in the row command event like msgbox("Test"). But i am getting the following error.
[HttpException (0x80004005): The GridView 'gdvOutlets' fired event RowEditing which wasn't handled.]
System.Web.UI.WebControls.GridView.OnRowEditing(GridViewEditEventArgs e) +322
System.Web.UI.WebControls.GridView.HandleEdit(Int32 rowIndex) +60
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +679
System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +214
System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +242
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3824
Regards,
RS
VB.Net
|
|
|
|
|
post the error here
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
I am getting the following error, when i call the rowcommand event in the gridview.
[HttpException (0x80004005): The GridView 'gdvOutlets' fired event RowEditing which wasn't handled.]
System.Web.UI.WebControls.GridView.OnRowEditing(GridViewEditEventArgs e) +322
System.Web.UI.WebControls.GridView.HandleEdit(Int32 rowIndex) +60
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +679
System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +214
System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +242
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3824
Regards,
RS
VB.Net
|
|
|
|
|
Your Problem state clearly that you did not handle a RowEditing Event. If you are using a SQL Datasource this error will not occur. But i support what you are doing than using wizards to do your database work. What you need to do is to
protected void GridView1_OnRowEditing(object sender, GridViewDeleteEventArgs e)
{
}
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi, try this in c#.net.
<itemtemplate>
<asp:linkbutton id="linkButtonEdit" runat="server" commandname="Edt" commandargument="<%Eval(Id)%>">
CodeBehind:
Protected void gridViewDetail_RowCommand(object sender,GridViewCommandEventArgs e)
{
if(e.CommandName == "Edt")
{
//do edit operation;
}
}
|
|
|
|
|
Hi,
I tried like this also, but it is not working. i am getting the following error:
[HttpException (0x80004005): The GridView 'gdvOutlets' fired event RowEditing which wasn't handled.]
System.Web.UI.WebControls.GridView.OnRowEditing(GridViewEditEventArgs e) +322
System.Web.UI.WebControls.GridView.HandleEdit(Int32 rowIndex) +60
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +679
System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +214
System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +242
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3824
Regards,
RS
VB.Net
|
|
|
|
|
i have three textbox ,two button and a datagrid .user enter value in Textbox and Click on AddButton to add record in datagrid .user can delete selected datagrid Row using Delete Button.i try to use javascript and xml to fill gridview but its gridview always blank. how i do that....
|
|
|
|
|
Member 3596497 wrote: .i try to use javascript and xml to fill gridview but its gridview always blank. how i do that....
Where is your java script code ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Sorry The Code is Here.........
********** Java Script Page ***********
var XmlReq;
var ServerPageName = "Handlegriddata.aspx";
function CreateXmlReq()
{
debugger;
try
{
XmlReq = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
XmlReq = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(oc)
{
XmlReq = null;
}
}
if(!XmlReq && typeof XMLHttpRequest != "undefined")
{
XmlReq = new XMLHttpRequest();
}
}
function FetchDGContents(text)
{ debugger ;
var requestUrl = Handlegriddata.aspx + "?Registardata=" + text;
CreateXmlReq();
if(XmlReq)
{
XmlReq.onreadystatechange = HandleResponse;
XmlReq.open("GET", requestUrl, true);
XmlReq.send();
}
}
function HandleResponse()
{
debugger ;
if(XmlReq.readyState == 4)
{
if(XmlReq.status == 200)
{
FillTable(XmlReq.responseXML.documentElement);
}
else
{
alert("There was a problem retrieving data from the server." );
}
}
}
function FillTable(Txtdata)
{
debugger ;
var DsData = scity.getElementsByTagName('dsVal'); //dsval dataset
var tbl = document.getElementById('GridView1').getElementsByTagName("tbody")[0];
for(var i=0;i<DsData.context.childNodes(0).parentNode.childNodes.length;i++)
{
var row = document.createElement("TR");
row.setAttribute("className","text");
row.setAttribute("bgColor","#ECECEC");
for(var j=0;j<DsData.context.childNodes(0).childNodes.length;j++)
{
var cell = document.createElement("TD");
cell.innerHTML = auth.context.childNodes(i).childNodes(j).text;
row.appendChild(cell);
}
tbl.appendChild(row)
}
}
***********Handlegriddata.aspx******************
string XmlString, Regdata ;
string[] split;
DataSet DA= new DataSet("dsVal");
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
Regdata= Request["Registardata"];
if(Regdata.Length > 0 )
{
Response.Clear();
split=choice.Split(',');
DataTable dt = new DataTable("PresenterInfo");
DBLayer objdblayer = new DBLayer();
dt = objdblayer.getRSetSQL("Select PresenterName,PresenterAddress,InfavorOf,ExecutedBy from USERS..Presenter_Info where 1=2", DBLayer.SqlType.SqlQuery); //For table Structure
dt.Rows.Add();
for(int i=0 ;i<dt.Columns.Count;i++)
{
if(i<split.Length)
dt.Rows[0][i]=split[i].ToString().Trim();
else
break;
}
DA.Tables.Add( dt);
XmlString=DA.GetXml();
Response.Clear();
Response.ContentType = "text/xml";
Response.Write(XmlString);
Response.End();
}
else
{
Response.Clear();
Response.End();
}
}
else
{
Response.Clear();
Response.End();
}
}
************ PRequest.aspx****************
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataTable dtresult = new DataTable();
DBLayer objdblayer = new DBLayer();
dtresult = objdblayer.getRSetSQL("Select PresenterName,PresenterAddress,InfavorOf,ExecutedBy from USERS..Presenter_Info where 1=2", DBLayer.SqlType.SqlQuery);
GridView1.DataSource = dtresult;
GridView1.DataBind();
dtresult.Rows.Add();
ds.Tables.Add(dtresult);
// AddToGrid.Attributes.Add("OnClick", "FetchDGContents()");
}
}
protected void AddToGrid_Click(object sender, EventArgs e)
{
string chString=TxtPName.Text+","+TxtPAdd.Text+","+TxtInf.Text+","+TxtExBy.Text;
AddToGrid.Attributes.Add("OnClick", "FetchDGContents(" + chString + ")");
}
**************************Design******************************
TxtPName TxtPAdd TxtInf TxtExBy (TextBox Fill By User)
ADDBUTTON (after Fill the TextBox When User click on Add Button the txt Value go to Grid and TxtBox will Blank
Notes: on AddButton Its Create One Blank Rows and then add That value to that row)
GRIDView
****************************************************************
When User Click On GridView Row The Seleted Row Value will Display on TextValue (Now i work on it but not yet done)
|
|
|
|
|
i want to print my report through crystal report and in this report i want some selected text bold i.e. "Gorge is a cool guy" in which i want to print guy in bold letter.so what is the way to print it on crystal report in which text are coming dynamically through text box or label. i was try with label but it print tag also on report i.e. if i use cool then it will come on report as it is. if anybody have solution the please forward me..............
Thanks in advance.......
|
|
|
|
|
Hi,
There is a requirement in my FBA(Form based authentication) based ASP.NET application to handel session timeout.
After session timeout if user clicks any link or button it should return to Login page. I am using Master page also.
Thanks in advance.
|
|
|
|
|
Elena2006 wrote: After session timeout if user clicks any link or button it should return to Login page. I am using Master page also.
You need to check the session value on every page load. if this value is null redirect user to login page,
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Keep Session timeout in web .config file.It automatically handles session timeout value..!
Check the below settings ,Check sessiontomeout..!
<system.web>
<authentication mode="Forms">
<forms loginUrl="Login.aspx"
protection="All"
timeout="30"
name=".ASPXAUTH"
path="/"
requireSSL="false"
slidingExpiration="true"
defaultUrl="default.aspx"
cookieless="UseDeviceProfile"
enableCrossAppRedirects="false" />
</authentication>
</system.web>
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
It would be better to use asp.net Profile. Google about it and you'll get understanding of it.
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
hi All
I want a gridview in this I will have a row and "add" button in the last colomn,
when i click the add button same row should repeat.And if i want to delete it should be possible(window application)
Please help me with this.
thanks in advance
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
modified on Wednesday, November 25, 2009 9:06 PM
|
|
|
|
|
Design a gridview with template columns and add button on the last column. In the button click event handler, add a new row to the grid's datasource and Bind() .
Best wishes,
Navaneeth
|
|
|
|
|
Ramkumar_S wrote: it should be possible(window application)
This is asp.net forum my friend..!
If you want in asp.net
http://www.codeproject.com/KB/aspnet/InsertingWithGridView.aspx
|
|
|
|
|
I have a User Control with a property declared internal bool AllowAllDepartments { get; set; } . However, whether I declaratively set this property where the control is sited, e.g. '...AllowAllDepartments="True"...', or programmatically in the Page_Load of the host page, when I hit a breakpoint in the Page_Load of the user control, the property still has a value of false. What am I doing wrong?
|
|
|
|
|
I have no idea. What happens if you factor this out so you have actual get and set methods you can put a breakpoint in ? That way, you can see if they are being set at all, and/or set when you don't intend it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
If you are using just this
internal bool AllowAllDepartments { get; set; }
it is impossible to have value false just after execution of the line
AllowAllDepartments= true (I removed Quotations" as they are not necessary)
If this is not so, it might be the case that you forgot to set the value to local variable in setter of the property and/or you didnt get the appropriate value from the variable in getter property.
|
|
|
|
|
Hello,
I have one treeview in updatepanel and one asp pannel(with visible = "false") out-side updatepanel.
On selectedIndexchanged of treeview, I want a pannel outside of updatepanel needs to be visible.
But it is not working. Is there any work around so that I can make my pannel visible w/o postback?
Thanks in advance.
Regards,
Milind.
|
|
|
|
|
If it's not inside an update panel, then you'd need to write your own javascript to make it visible.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
All the content that is inside the Update panel will be posted back to the client and refreshed in the client as response. So it is impossible to update controls outside updatepanel from the server.
As Christian suggested, you need to pass some Javascript to the client which might show the Panel.
But there is another scenario. ASP.NET doesnt render controls that are made Visible=false. So from client side using javascript, you will not going to find the control.
So the solution will be :
1. Use pnl.Style.Add(HtmlTextWriterStyle.Display, "none") to make the panel invisible instead of pnl.Visible=false //To ensure that pnl is rendered in the client.
2. In postback of UpdatePanel use RegisterStartupScript to pass a javascript that resets the pnl.style. Your javascript might look like
"document.getElementById('" + pnl.ClientId + "').style.display='none';"
|
|
|
|
|
Or you could put ASP:Panel inside another update Panel and set it's update mode to Always,
But I think javascript will still be better
|
|
|
|
|
Hi,
I have a code here which makes the active links bold in IE7
Is there some work around to make it work in mozilla and higher versions of IE
a:active{font-weight:bold}
Thanks
Shankbond
|
|
|
|