|
please share idea if any developed Floating login like www.ups.com.
please help me and also give me a sample code or any url if possible.
Thanks in advance.
tbhattacharjee
|
|
|
|
|
That can be easily done by DIV .
|
|
|
|
|
hello,
i have a GridView in Itemtemplate there are two link buttons
with command name "Edit"
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID='lnkYesHelp' CommandName='Edit' runat="server" Text='yes' Font-Bold="true"></asp:LinkButton>
<asp:LinkButton ID='lnlNoHelp' CommandName='Edit' runat="server" Text='no' Font-Bold="true"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
on when RowEditing event get fired how i know which button user clicked
|
|
|
|
|
I am developing a web application where, I have a content editor and preview
button. On click of the Preview button, i am showing a ModalDialogBox to see the changes in the editor.
But my concern is the content can be so lengthy and sometimes, 40 to 50 lines of text.
How can I pass the editor content to the modaldialog box in this case.
The preview I am trying to implement is similar to Codeproject message preview.
Any help would be appreciated.
CodingRocks
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
codingrocks wrote: The preview I am trying to implement is similar to Codeproject message preview.
If you have a close look at the preview you would notice that the ID of the Textbox is passsed in the URL. Thus you can access the content of the textbox by using the following javascript code.
window.opener.getElementByID("TextBoxID").value
Hope it helps.....
When you fail to plan, you are planning to fail.
|
|
|
|
|
|
I don't see any reason for this not to work. Are you sure it never gets called ? Where is the code in question ?
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.
|
|
|
|
|
problem was in HTML code of the page, AutoEventWireup="true" was set to false. once i set it to true everything worked!
thank you
|
|
|
|
|
|
sorry but i didnt want to spam this board with trivial problems
i wont next time
|
|
|
|
|
nicromonicon wrote: sorry but i didnt want to spam this board with trivial problems
You know the question you have asked, it may be a problem for some others. So if the search in the forum they can easily get from the question. But, Now they couldn't.
nicromonicon wrote: i wont next time
|
|
|
|
|
hi friends i have a problem .... i want to hide all fields from gridview when there is no value in the cell found in a row of gridview .... the gridview is bounded to sqldatabase... through C# code...
plz friends give me some guidence.. thanks in advance
|
|
|
|
|
solo_gaurav wrote: i want to hide all fields from gridview when there is no value in the cell found in a row of gridview
Gaurav,
You want to mean, you want to hide complete row if any of the column field is Blank?
if yes, What is ur sql data source ? Is it DataSet or what ? You have to check in GridView RowBound Event for each column data. Before binding read the source data, if all column available, then bind else move to next records.
This is just an idea, you need to implement it
Let me know if any issue.
|
|
|
|
|
no i dont want to hide whole row.. i just want to hide cell from row...
can i give my code here it is
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.Odbc;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
string selectSQL = "SELECT * FROM test ";
OdbcConnection con = new OdbcConnection("Dsn=PostgreSQL35W123;uid=postgres;pwd=abc");
OdbcCommand cmd = new OdbcCommand(selectSQL, con);
con.Open();
cmd.Connection = con;
DropDownList1.DataSource = cmd.ExecuteReader();
DropDownList1.DataTextField = "Journal_Title";
this.DataBind();
con.Close();
DropDownList1.SelectedIndex = -1;
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
string selectSQL = "SELECT * FROM test where Journal_Title='" + DropDownList1.SelectedItem.Text + "'";
OdbcConnection con = new OdbcConnection("Dsn=PostgreSQL35W123;uid=postgres;pwd=abc");
OdbcCommand cmd = new OdbcCommand(selectSQL, con);
con.Open();
cmd.Connection = con;
cmd.ExecuteNonQuery();
OdbcDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
GridView1.DataSource = dr;
GridView1.DataBind();
Label1.Text = "found";
}
else
{
Label1.Text = "not found";
}
}
}
now i want that when a dropdownlist item is selected then it show a griview with only those cells which has data in them... and the cell with no data(null) , i want them to be hidden abhijit plz help if you get it
|
|
|
|
|
solo_gaurav wrote: if (dr.HasRows)
{
GridView1.DataSource = dr;
GridView1.DataBind();
Label1.Text = "found";
}
So rather than assigning Gridview Source over here, you just create a Temp Arraylist/ Dataset from the DataReader(Dr) with those rows you wants. Then assing the Team DataSource to GridView.
Hope you have understand what I am saying
|
|
|
|
|
you are saying right but.. i cant change code but only add new block of code to it..
means i want some lines of code that could help me in ommiting those cells which have null value
|
|
|
|
|
Hi all,
Following is my code for setting the data source for a cystal report which i m using in my project.
protected void DDL_Departments_SelectedIndexChanged(object sender, EventArgs e)
{
int deptid=int.Parse(DDL_Departments.SelectedValue);
EmployeesTableAdapters.Get_Employee_By_Department _emp_adapter=new EmployeesTableAdapters.Get_Employee_By_Department();
Employees.EmployeesDataTable _emp;
_emp=_emp_adapter.Get_Employees_By_Dept(deptid);
_rdc.SetDataSource(_emp);
CR_Emp_Viewer.ReportSource=_rdc;
CR_Emp_Viewer.DataBind();
}
but its giving me a compile time error stating
CS0121: The call is ambiguous between the following methods or properties: 'CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(System.Collections.IEnumerable)' and
'CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(System.Data.DataTable)'
What do i need to do to solve this issue????
Also its surprising that a similar code i wrote in VB runs successfully.:confused::confused::confused:
I am using VS 2005, 2.0 framework.
When you fail to plan, you are planning to fail.
|
|
|
|
|
I believe reportdatasource(_rdc) expects IEnumerable Collection, while you are passing DataTable, which is not an IEnumerable Collection. So it throws the error.
If you are in 3.5, you can call DataTable.asEnumerable()
here you need to pass _emp.Rows collection which is IEnumerable collection.
Try out this. I have never found this before, Hope it works.
|
|
|
|
|
Abhishek Sur wrote: I believe reportdatasource(_rdc) expects IEnumerable Collection, while you are passing DataTable, which is not an IEnumerable Collection. So it throws the error.
But SetDataSource provides four overloads from which one does accepts a DataTable.
I am pretty confused as to why it recognises the data table as an IEnumerable.
When you fail to plan, you are planning to fail.
|
|
|
|
|
this is weird.
Try to do this, and see if it works or not:
Employees.EmployeesDataTable _emp;
_emp=_emp_adapter.Get_Employees_By_Dept(deptid);
DataTable dt = _emp.Table;
_rdc.SetDataSource(dt);
Pass the Table to the SetDataSource rather than your class.
|
|
|
|
|
|
Please don't Cross Post. I Guess its by mistake
|
|
|
|
|
Hello, Ive got a problem with Gridview!
I want access to column's data that is checked.
and I dont know why this code doesnt work.
The value of "chbxRmove.Checked" always is False even when the column is checked !!!
plz help me.
foreach (GridViewRowgridRowinthis.GridView1.Rows)<br />
{<br />
CheckBoxchbxRmove = (CheckBox)gridRow.FindControl("chkSelect");<br />
if (chbxRmove.Checked)<br />
{<br />
}<br />
}
|
|
|
|
|
Probably checkbox is losing state on load event of Page,check it carefully.
By the way,if you had problems with internet connection then delete one post of your same question.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
I'm very grateful that you attended to my question
but Abhijit's answer was more comprehensive than your answer.
|
|
|
|