|
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
|
|
|
|
|
I`m made a simple Windows Control Library. I added some properties to be used at design time. Its ok - designing user may use them by entering eg. a string.
But suppose I would like to create a property responsible for selecting polygon. I want a special form to be opened then, which contains list of all possible polygons, allowing the user to select the desired one. How to make that?
thanks for any help
|
|
|
|
|
|
Hi
I have a user control which has a number of custom properties. Unfortunately these properties are not suitable for the designer to execute. As a result form’s which use this user control won’t open at design time in the designer.
Is there some way to prevent the designer from executing my user control properties?
Cheers
Rich
|
|
|
|
|
You can check the control's DesignMode property to conditionally vary its behavior in order for it to be created by the designer. Alternatively, you could create the control at run time.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Apply the [Browsable(false)] attribute to the properties which should not appear in the Properties window at design time.
:josh:
My WPF Blog[^]
|
|
|
|
|
Thanks Ravi + Josh, both solutions appear to work well
|
|
|
|
|
Hi guys,
I have a file that I am parsing and getting the data using Regex and storing the data in string dictionary.
Here is the statement where I assign data to stringcollection scoldata.
String [] arrTemp =null;
scoldata.Add(arrTemp[arrTemp.GetLowerBound(0)]);
My question is, when I assign data to scoldata, it's adding 5 characters, eg FBBBB, how do I get rid of the first character 'F' from this stringcollection?
Please help.
sasa
|
|
|
|