|
Hi all,
i need to connect to a remote server using c#.net.
The connection should be also able to access a sub database in a database.(HP9000)
Rather it should work like the Qcterm.
Using sockets i can only pass the port and IP address .
How will i pass the database name to be connected to and fetch data????????????
It would be a great help if someone has an answer.....
Thanks.
|
|
|
|
|
Hello
This sounds much like Client/Server application. At the connecting machine there is a client app to connect to the server app in the "connected to" machine. Now the client app makes requests, and the server app fetches the data from the database -on the same machine-, and send it as a response to the client. It's possible using sockets.
What would be the problem with that?
Regards
|
|
|
|
|
Iam developing a windows application. I have a dataGridView which has
rows. Inside a row in dataGridView i kept two lines. For doing this
i first did
dataGridView1.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
and kept a new line character in the string
so if i have Mike and Bond to go in separate lines inside one row in dataGridView i would say "Mike"+"\n"+"Bond"
it worked and kept in separate lines but when i double click on the DataGridView row for some weird reason its again keeping back in single line
with some funny character between Mike and Bond
But when i leave the row it again puts back in two separate lines.
Did any body encountered this if yes how to solve this. I want them in Separate line always.
Thanks
Kal
|
|
|
|
|
Hello
To solve this issue either use "Mark\r\nBond" , or "Mark" + Environment.NewLine + "Bond"
Regards
|
|
|
|
|
I have created a custom datagridviewColumn control containig a TextBox+Button. I want to access the events of these controls directly, for example TextBox_textChanged, Button_MouseHover. following code has been written for this, but it is not working
DXDataGridViewTextBoxButtonColumn btn = new DXDataGridViewTextBoxButtonColumn();<br />
((DXTextBoxButtonCell)btn.CellTemplate).SSTextBoxButton.Button.Click += new EventHandler(SSTextBoxButton_Enter);<br />
((DXTextBoxButtonCell)btn.CellTemplate).SSTextBoxButton.Enter += new EventHandler(SSTextBoxButton_Enter);<br />
<br />
I have simply shown a messagebox in its event handler.
Can anyone help?
sorry for my bad English.
|
|
|
|
|
Hello
MyCustomControl control = new MyCustomControl();
control.MyButton.Click += new EventHandler(MyHandler);
What's wrong with simplicity??!!
Regards
|
|
|
|
|
I have to include the custom contorl in DataGridViewColumn, not the control it self.
sorry for my bad English.
|
|
|
|
|
Hello
Let me get this right!! Your problem is that you made a custom control - TextBox & a Button-, and you want to display it in the header cell?? Or is it in all cells of the column??
Regards
|
|
|
|
|
Hello,
Infact i want to display it in all cells. I have been succeded in doing that, Now i want to handle the event of that control. I have writeen the code in my first post. I dont know that y these events do not get triggered.
Let me make it simple, forget about custom control.
say i want to handle the events of button in DataGridViewButtonColumn, tell me how i will do that?
Thanx
sorry for my bad English.
|
|
|
|
|
Hello
Now I got your problem... Actually custom DatagridView columns are inherited -after some fathers- from DataGridViewElemnt . In that class you will find protected methods called RaiseCellClick() , RaiseCellContentClick() , among other methods to raise the events DatagridView.CellClick event, and DataGridView.CellContentClick . So the control that will handle the events is the DataGridView actually by the above events. If your custom control doesn't fire these events automatically -I don't know how you implemented them!-, so when you see suitable fire them yourself using the Raise methods.
Regards
|
|
|
|
|
Thanx Nader for your help
public override void InitializeEditingControl(int rowIndex, object<br />
initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)<br />
{<br />
ase.InitializeEditingControl(rowIndex, initialFormattedValue,<br />
dataGridViewCellStyle);<br />
DXTextBoxButtonColumnEditingControl ctl =<br />
DataGridView.EditingControl as DXTextBoxButtonColumnEditingControl;<br />
if(ctl !=null)<br />
if (this.Value != null)<br />
ctl.SSTextBox.Text = (string)this.Value;<br />
else<br />
ctl.SSTextBox.Text = string.Empty;<br />
}
i want this ctl to be accessed in the form where datagridcolumn will be used.
Thanx
sorry for my bad English.
|
|
|
|
|
Hello
I'm sorry my reply came very late, but your email notification arrived to my just now!!
You can't acess ctl this way because you've declared it as a local variable in a method. Declare it as a public member in your class, and access it like MyCustomColumn.ctl.Click for the click event as an example.
I don't know if my reply would help you or it came too late, but forgive me.
Regards
|
|
|
|
|
my problem is the following:
i have one combobox that sometimes i want show a item and sometimes not. this combox is binded to a dataset. is there on elegant way to do it without inserting and deleting a element is the dataset all the time depending the context? if don`t, how can i do that in a better way?
thanks
|
|
|
|
|
u can create dataview from dataset and can filter data from dataset
and then can bind it to combobox
rahul
|
|
|
|
|
i got it, but, dont u have an example? i have never used this.
|
|
|
|
|
i have found one in VB:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
da1.Fill(ds, "Autores1")
Dim dv As New DataView(ds.Tables("Autores"))
dv.RowFilter = "Au_ID <= 15"
DataGrid1.DataSource = dv
End Sub
however, i think it`s all that i need
thanks
|
|
|
|
|
|
Maybe Delete() and CancelChanges() on the underlying row ?
|
|
|
|
|
it doesn`t sound good...
i have solved my problem using dataview yet.
|
|
|
|
|
i have SQL Server Database with very important information
1 - i want to make backup to my database every 1 hour
2- i want to send my database file to ftp with differ name
how can make my program to do this automaticly .....
Palestine
|
|
|
|
|
You can configure it in SQL Server
only two letters away from being an asset
|
|
|
|
|
You can write a WindowsService and make this service start your processes whenever you want (in this case when the DateTime.Minute = 0)..
not an expert suggestion just an idea
.:: Something is Wrong ::.
|
|
|
|
|
i have datagrid it includes ID columne if i deleted the ID from the grid then i select the row to delete it i resived exeption
how can handle this excption???
fatma
|
|
|
|
|
btota wrote: how can handle this excption???
First by not causing it and second by saying WHAT exception you are getting.
only two letters away from being an asset
|
|
|
|
|
how to Reduce the width of datagrid colum in c# ??
sikandar
|
|
|
|