|
Its not working I have tried, moreover I need C# code. Please Help
|
|
|
|
|
Can you give me your code what you have written?
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
protected void gvEmpCal_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
CheckBox ckh = e.Row.Cells[0].Controls.Add(0);
if (ckh.Checked = false)
{
e.Row.BackColor = System.Drawing.Color.LightYellow;
e.Row.Cells[0].ForeColor = System.Drawing.Color.Red;
}
}
}
Actually I need that gridview cells that contains "off" should appear in red colour. Presently On and Off are in same colour.
|
|
|
|
|
Ok, I got the problem. I think you have not understand the code I have posted.
Do one thing.
Replace your
CheckBox ckh = e.Row.Cells[0].Controls.Add(0);
with this one
CheckBox ckh = e.Row.Cells[0].Controls[0];
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Good Day
i am using a RaSchedular(Telerik) and i have an XML File on my solution and i bind my Schedular like this
private void Bind_Viewer_For(String Module)
{
string strExpr = "Code like '%" + Module + "%'";
XmlDataDocument xmlDatadoc = new XmlDataDocument();
xmlDatadoc.DataSet.ReadXml(@"C:\Pilot Project\App_Data\TimeTable.xml");
RadScheduler1.DataStartField = "STARTDATE";
RadScheduler1.DataSubjectField = "DESCRIPTION";
RadScheduler1.DataEndField = "ENDDATE";
RadScheduler1.DataKeyField = "ID";
dsfinal = xmlDatadoc.DataSet;
if (dsfinal.Tables[0].Rows.Count > 0)
{
DataView dv = dsfinal.Tables[0].DefaultView;
dv.RowFilter = strExpr;
RadScheduler1.DataSource = dv;
RadScheduler1.DataBind();
RadScheduler1.SelectedView = SchedulerViewType.MonthView;
RadScheduler1.SelectedDate = Convert.ToDateTime(dv.Table.Rows[30]["ENDDATE"]);
}
}
dsfinal is declared Globally. i am filtering my data as you can see in the expression and bind the control with the Detail view. Now , my problem is when the updates are made. In the Schedular when updates are made , or when an appointment is moved
i need to Update the Dataset with the changes made. The Demo here Explains a simple xml binding, but i am binding the Schedular with a Dataset and when changes i made, i want to save the changes in the dataset.
Now i have a save button that is supposed to take the changes made in the dataset and merge it back to the xml and my code looks like this
protected void btnCommitChanges_Click(object sender, EventArgs e)
{
XmlDataDocument xmlDatadoc = new XmlDataDocument();
xmlDatadoc.DataSet.ReadXml(@"C:\Pilot Project\App_Data\TimeTable.xml");
DataSet dslist = new DataSet();
dslist = xmlDatadoc.DataSet;
dsfinal.Merge(dslist);
dsfinal.WriteXml(@"C:\Pilot Project\App_Data\TimeTable.xml");
}
as you can see , i am taking the xml that is currently on the file system and i am loading it to a dataset and merge the two dataset. My question here is that is it going to updates the changes or it will override or insert new elements as if i am adding a new record on the xml ?
Again, after refresh the page, i could see the changes were not saved and the xml have not changed from the changes that were made in the dataset.
Thanks
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/
|
|
|
|
|
function popitup(url) {
newwindow=window.open(url,'name','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
}
hi i have a two aspx pages page1.aspx and page2.aspx on each page there is a link which open a new window using above javascript, but i want to know the previous page information eighter it open using page1.aspx page or page2.aspx page.
request object is null, so i'm unable to identify.
KnightGuy
|
|
|
|
|
You can access controls of parent page using
window.opener.document.getElementById.
So by using it you can access parent page and do
communication between child and parent page.
For more information refer this[^] link.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
If you want to know in server side then pass a query string value ( ex: page1.aspx?ref=page2) and get the querystring value in server side using Request.QueryString["ref"] . Hope this will solve ur problem.
|
|
|
|
|
Dear, the request object is null.
KnightGuy
|
|
|
|
|
I have Two POP-UP pages. I need to display those data in One page.
For Example:
In First POP-UP Page I have One TextBox and in Second another TextBox. I need to dispaly those two in One Page. How can I do this?
|
|
|
|
|
It is very simple. Just merge these two popup into one.
Create new popup and put both textbox and other functionalities
in this one.
That's it.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I have 11 POPUp pages. I do not display 11 at a time. Based on condition i need to display 3 or 4. I don't want to redesign them.
|
|
|
|
|
How you are showing your popup?
Are you loading aspx page into popup?
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Yes. I tried using Iframe. It working fine but only thing bothers me is height of the frame. It should be increased based on page content.
|
|
|
|
|
You can try to fix height and width of frame.
i.e.
<iframe src="news.htm" name="content" width="628" height="380" frameborder="0"></iframe>
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
But I am loading aspx page to frame dynamically (code behind). So Height depends on content page. How can I find height of to be loaded page.
HtmlControl frmPL = (HtmlControl)e.Row.Cells[0].FindControl("frmPL");
frmPL.Attributes["src"] = "../SiteProgress/" + PLName + ".aspx";
|
|
|
|
|
Try this one.
frmPL.Attributes["width"]=628;
frmPL.Attributes["height"]=380;
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
If I fix height of frame, what is the situation if page's height is 500. i don't want to scroll the frame. How can I give Page's height to frame.
|
|
|
|
|
You can refer this[^] link to set height of the frame as the height and width of browser display height.
You need to get your frame by using document.getElementById function and
set it's height and width as shown in example in the forum.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
But I am loading page into frame from code behind. Is there any solution to find aspx page height from code behind.
|
|
|
|
|
Hello All,
I am doing Localization in my application, and using following script for Post Date Alert for making sure user does not select date earliar than today..
Problem is if I login as Chinese culture or other except English, I choose date from calander which is greater than today, it gives popup and then display Todays date in English.
I am using EnableScriptGlobalization= "true" in ToolkitScriptManager so as calander will display in respective culture.
function checkDate(sender, args) {
if (sender._selectedDate > new Date()) {
alert("Alert");
sender._selectedDate = new Date();
sender._textbox.set_Value(sender._selectedDate.format(sender._format));
}
}
Thanks.
|
|
|
|
|
You need to set CultureInvariantValues = true for the control
you are using as sender.
Whether it is calendar control or textbox, from where you are refering
date.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Thanks for Reply,
I am using Calander Extender and display is coming as per the choosen language,
Only PRoblem coing when I choose date bigger than toady it gives Popup and then dispaly image in English.. I want it to display in selected language.
CultureInvariantValues = "true" is giving error when I apply it as calander extender property.
|
|
|
|
|
|
Well, this is a very nice issue. I'm trying to figure out how in earth's name I can create the following application, and of course my bosses and co-workers aren't providing any help.
The application should do the following:
- Allow users to create/edit/delete (e-mail)accounts in Paralells Plesk Panel (for Windows).
- Allow users to create/edit/delete subdomains
It should be an ASP.Net application, but I have no idea where to start. I've looked into the API RPC Protocol, however, I do not understand like 99% of the protocol.
Can anyone please tell me how to work with the API (if someone has ever worked with it) to create the above situation? Any help would be much appreciated!
|
|
|
|