|
hai..
yes the files is saving as unicode only.... i am displaying this in an ordinary form, which is a child form to a main form. i tried in a single form on button click i am able to disply the value. but on formload i am not able to display it.? can u help me out in this... thanks in advance...
Regards
|
|
|
|
|
If you save the source as UTF-8, try UTF-16 instead. No, it should not matter, but you should not have the problem in the first place.
Besides that I can't really offer any help as I do not even know HOW you are trying to display the text (caption of a dialog, messagebox, TextOut in draw command, label control, etc.
|
|
|
|
|
Hi,
I created scrollbars for my datagrid in asp.net successfully but I was not able to create a fixed column head. Any helpful hints?
thanks
|
|
|
|
|
You can do it via styles,
.DataGridFixedHeader
{
font-family:Arial;
font-size:x-small;
font-weight:bold;
POSITION: relative; TOP: expression(this.offsetParent.scrollTop - 2); BACKGROUND-COLOR: lightgrey
}
use this style for your datagrid header.
|
|
|
|
|
It is not doing it I already tried that.
|
|
|
|
|
So how did you create scroll bars for your datagrid? Are you using a div tag for creating them? If you have tried using css, how did you use the css class for your header?
|
|
|
|
|
I have used the div tags yes. the style tags and what is with in them is in the head.I do not have a css class, but I put the cssClass name as DataGridHeader since it is within the style tags. My code looks like this:
****beg div (assume that 'div' is written before style = "left")
<style="left: 18px;="" overflow:="" auto;="" width:="" 66%;="" position:="" absolute;="" top:="" 248px;="" height:="" 100px"="">
<asp:datagrid id="DataGrid1" style="Z-INDEX: 164; LEFT: 18px; POSITION: absolute; TOP: 248px"
="" runat="server" bordercolor="Black" width="776px" height="56px">
<alternatingitemstyle font-size="Smaller" font-bold="True" backcolor="ControlDarkDark">
<itemstyle font-size="Smaller" font-bold="True" forecolor="White" backcolor="Black">
<headerstyle font-size="Smaller" font-bold="True" horizontalalign="Center" forecolor="Black"
="" backcolor="White" cssclass="DataGridFixedHeader">
** end div
.DataGridFixedHeader { POSITION: relative; ; TOP: expression(this.offsetParent.scrollTop - 2); BACKGROUND-COLOR: white }
-- modified at 15:23 Tuesday 18th July, 2006
|
|
|
|
|
Hi Naji ,
I have used the style in an external stylesheet and the class is as follows:
.DataGridFixedHeader
{
font-family:Arial;
font-size:x-small;
font-weight:bold;
POSITION: relative; TOP: expression(this.offsetParent.scrollTop - 2); BACKGROUND-COLOR: lightgrey
}
Linking the style:
The aspx code is:
<asp:datagrid id="dgForDelete" runat="server" width="100%" bordercolor="DarkGray" borderstyle="Solid" allowsorting="True" cellpadding="3" autogeneratecolumns="False">
<headerstyle font-size="Smaller" font-bold="True" wrap="False" horizontalalign="Left" cssclass="DataGridFixedHeader">
|
|
|
|
|
Thanks man. I moved the datagrid to the top of the scroll bar boudary and I put the style in the head. I also used the CssClass = "DataGridFixedHeader".
It works now.
|
|
|
|
|
Glad to know that
|
|
|
|
|
i have a datagridview and a save button.
after editing the last cell of the grid and click the save button.
the value of the last cell of the datagridview is null.
i already set its property to EditOnKeystroke still it returns null to the last cell of the datagrid.
thanks
|
|
|
|
|
Hi guyz...
I've got a problem calling MDIchild by another MDIchild using
this C# code:
frmFloatDialog floatDia = new frmFloatDialog();
floatDia.ShowDialog();
I have a sample code but the code was written on vb. It uses private shared
and private property but shared and property won't work on c#.
Please advice...
thank you so much...
-- modified at 22:35 Sunday 16th July, 2006
|
|
|
|
|
paulcortez wrote: shared and property won't work on c#
It will. The C# equivalent of VB's "shared" is static. You can apply both static and private to a property, so what's the problem?
Now, if you're saying the VB property is private, yes, you can't access private members of other classes; that's a principle of keep-your-own-crap-private OO design.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Goof around music jam with my brothers (with video)
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Ahhh.. so to convert this code to c#
vb code:
Private Shared mFormDefInstance As frmBillingAll
Private Shared mInitializingDefInstance As Boolean
Public Shared Property defInstance() As frmBillingAll
Get
If mFormDefInstance Is Nothing OrElse mFormDefInstance.IsDisposed Then
mInitializingDefInstance = True
mFormDefInstance = New frmBillingAll
mInitializingDefInstance = False
End If
defInstance = mFormDefInstance
End Get
Set(ByVal Value As frmBillingAll)
mFormDefInstance = Value
End Set
End Property
I'll be using:
Private static frmFloatDialog floatDialog = new frmFloatDialog();
Private static bool mInitializingDefInstance;
Public static Property defInstance() As frmBillingAll --> I dont know how to convert this thing...
Get
If mFormDefInstance Is Nothing OrElse mFormDefInstance.IsDisposed Then
mInitializingDefInstance = True
mFormDefInstance = New frmBillingAll
mInitializingDefInstance = False
End If
defInstance = mFormDefInstance
End Get
Set(ByVal Value As frmBillingAll)
mFormDefInstance = Value
End Set
End Property
Please help me men... I don't know how to convert the rest of it...
|
|
|
|
|
paulcortez wrote: Public static Property defInstance() As frmBillingAll --> I dont know how to convert this thing...
Get
If mFormDefInstance Is Nothing OrElse mFormDefInstance.IsDisposed Then
mInitializingDefInstance = True
mFormDefInstance = New frmBillingAll
mInitializingDefInstance = False
End If
defInstance = mFormDefInstance
End Get
Set(ByVal Value As frmBillingAll)
mFormDefInstance = Value
End Set
End Property
Please help me men... I don't know how to convert the rest of it...
First, there are several free tools available that convert VB snippets into equivalent C#. Lutz Reflector is one such tool.
I will do this one conversion for you; after that, it's best to learn how to fish yourself and use the freely available tools to do this.
public static frmBillingAll DefInstance
{
get
{
if(mFormDefInstance == null || mFormDefInstance.IsDisposed)
{
mInitializingDefInstance = true;
mFormDefInstance = new frmBillingAll();
mInitializingDefInstance = false;
}
defInstance = mFormDefInstance;
}
set
{
mFormDefInstance = value;
}
}
p.s. when posting code snippets in this forum, be sure to surround your code with <pre> tags.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Messianic Instrumentals (with audio)
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Hello all. I know that it's possible to show URLs in a RichTextBox, however, I cannot find a way to hide the href tag. For example, <a href="www.google.com">Google</a>. Is it possible to hide the link reference (<a href="www.google.com">) and allow the user to select "Google" instead?
Thanks,
Josh
|
|
|
|
|
|
I am having trouble finding what you are referring to. I am searching for "rich text box arbitrary link" but it does not yield any appropriate results, nor does "richtextbox arbitrary link." Can you please elaborate or provide a link?
Edit: I found the page you are referring to. It's http://www.codeproject.com/cs/miscctrl/RichTextBoxLinks.asp
Thanks,
Josh
-- modified at 23:32 Sunday 16th July, 2006
|
|
|
|
|
|
|
I am making a report in which i have to show that how many purchase orders were issued to which supplier.So i am taking input from the user, the id of the supplier.That id belongs to a certain supplier.i am having problems with the parameters, how do i send the Supplier_Id to the crystal report so that i can view the data.This code given is working fine i am using command in which i am giving hard coded values like where Supplier_Id=2 with the query But what my problem is, that how can i get the value from Combo box into the command object.The report is being displayed with this code but it's hard coded like where Supplier_id=2.Now tell me what should i do in order to take values dynamically into the command object.Pls give me a detailed description and if i am using the wrong technique guide me,which technique should i use as i am new to C.R.Thanks.
try
{
int Supplier_Id = Convert.ToInt32(Supp_Id_C.Text);
string sp="sp_P_S_Rpt";
SqlConnection conn = Class_Connection.Make_Conn();
SqlCommand command = new SqlCommand(sp, conn);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("@Supplier_Id", SqlDbType.Int).Value = Supplier_Id;
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataSet ds = new DataSet();
ds.Clear();
adapter.Fill(ds, "P_S_Rpt");
dataGrid1.DataSource = ds;
//dataGrid1.DataMember = "P_S_Rpt";
CrystalDecisions.CrystalReports.Engine.ReportDocument rptDoc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
//rptDoc.FilePath = "MyTaskReport1.rpt";
//rptDoc.SetDatabaseLogon("sa","sa","CDMA","Final_Project1_e");
rptDoc.Load("CrystalReport1.rpt");
rptDoc.SetDatabaseLogon("sa","sa","CDMA","Final_Project1_e");
rptDoc.SetDataSource(ds);
//frmReport objfrmReport = new frmReport();
// objfrmReport.crViewer1.ReportSource = rptDoc;
// objfrmReport.crViewer1.RefreshReport();
// objfrmReport.Show();
//rptDoc.Refresh();
crystalReportViewer1.ReportSource = rptDoc;
crystalReportViewer1.RefreshReport();
//crystalReportViewer1.Refresh();
//crystalReportViewer1.Show();
}
catch(Exception ee)
{
MessageBox.Show(ee.Message);
}
Fahad
|
|
|
|
|
Hi, I hope you ca use this.
// Create parameter objects
ParameterFields myParams = new ParameterFields();
// Tilføj InternalNumber
myParams.Add(MakeParam("@Customer_Id", ReportBackup_Ids));
myParams.Add(MakeParam("@CustomerName", ""));
myParams.Add(MakeParam("@CustomerAddr1", ""));
myParams.Add(MakeParam("@CustomerAddr2", ""));
myParams.Add(MakeParam("@CustomerAddr3", ""));
myParams.Add(MakeParam("@CustomerZip", ""));
myParams.Add(MakeParam("@CustomerCity", ""));
myParams.Add(MakeParam("@CustomerCountry", ""));
myParams.Add(MakeParam("@CustomerPhone", ""));
// Assign the params collection to the report viewer
crystalReportViewer1.ParameterFieldInfo = myParams;
Karsten Lundsgaard
|
|
|
|
|
hi
can you tell me ho can i get the total of returned rows of OleDbDataReader?
thanx
|
|
|
|
|
|
or OleDbDataReader.RecordsAffected
|
|
|
|