|
Tha'ts because you tried to launch the entire command line as the executeable and didn't supply an argument parameter. Read up on the Process class instead of guessing at things. You'll get alot farther, faster, if you know how it works and what the different overloads of the Start method are.
It should look like this:
Process.Start("C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm.exe", _
String.Format("/codebase ""{0}""", Path.Combine(My.Application.Info.DirectoryPath, "RenameFeature.dll")))
|
|
|
|
|
Thanks a lot
Saseendran Kombath
|
|
|
|
|
Hi,
i am binding a data grid using an openfiledialoge control, which read the columns from an excel that the user has chose. There are a lot of unwanted headers coming in the grid when it binds, so how can i remove or hide them. I want to display only those headers that i have added in the columns of the data grid. Requesting your help in this matter. Thank's in advance.....
|
|
|
|
|
If you have defined the columns in advance, it may be that you are somehow resetting the GridColumnStyles collection in your code instead of just assigning a new data source using SetDataBinding.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Thanks for the help Mike, but i am not using setdatabinding. i am using oledb connection, i am using the default view of the data table. i doubt if it has something to do with the default view of data table. why i have this doubt is till i select an excel only those columns that i have defined are shown in the grid but once i select the excel then columns like table_name, data type, isnull(checkbox) etc are shown in the grid. I want to remove or hide these columns.
|
|
|
|
|
Hmm, SetDataBinding is a method for DataGrid class regardless where you get the data from (it could be oledb, file etc). DataView is a valid argument for SetDataBinding and if no columns are defined in the grid before binding is done, all the columns in DataView are shown. You can either loop them through and remove those not needed or define columns in forehand.
Perhaps if you could post the code where the problem is, it would be easier to see the cause.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
oki Mike, but still i have not used the SetDataBinding method. Could you tell me how do i got about and loop through it??
|
|
|
|
|
Private Sub ofdExcelReader_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ofdExcelReader.FileOk
Dim DataViewExcel As DataView
txtTempXls.Text = ofdExcelReader.FileName
DataViewExcel = FillDataSet()
If (DataViewExcel.Table.Rows.Count < 1) Then
MsgBox("This Sheet Is Empty. Please Select Another Sheet", MsgBoxStyle.OkOnly)
Else
dgvExcelColumn.DataSource = DataViewExcel
dgvExcelColumn.AutoResizeColumn(0)
dgvExcelColumn.AutoResizeColumn(1)
'Me.dgvExcelColumn.Columns(0).Visible = False
End If
End Sub
Mike this the code tht i use to read t excel into th grid n i am using visual studio 2005
|
|
|
|
|
Okay,
First thing: You are obviously using DataGridView, not DataGrid as your original post implied. For this reason my earlier replies are useless.
Second: In DataView, include only those columns you need to show, nothing else. This automatically solves the displaying problem for DataGridView
If you must have unnecessary columns in the DataGridView for some reason (there should be none), but you want to hide them, you can refer to those columns with the column name in DataView. For example: Me.dgvExcelColumn.Columns("NotNeededColumnName").Visible = False
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
First of all sorry for late reply.....thank you very much one n all for th help provded. i used th following code to remove the extra columns.
DataViewXls.Table.Columns.Remove("TABLE_CATALOG")
|
|
|
|
|
You're welcome Glad you got it solved.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi
try this .
**********************************************
Me.dgView.Columns(0).Visible = False
***********************************************
hope this helps
Anoop
|
|
|
|
|
Sorry buddy it doesn't work .......anyways thanks for the help....
|
|
|
|
|
hi,
could you show some of you code you are using.....?
are you using a datagrid or datagridview, vs2003 or vs2005?
thanks
|
|
|
|
|
Private Sub ofdExcelReader_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ofdExcelReader.FileOk
Dim DataViewExcel As DataView
txtTempXls.Text = ofdExcelReader.FileName
DataViewExcel = FillDataSet()
If (DataViewExcel.Table.Rows.Count < 1) Then
MsgBox("This Sheet Is Empty. Please Select Another Sheet", MsgBoxStyle.OkOnly)
Else
dgvExcelColumn.DataSource = DataViewExcel
dgvExcelColumn.AutoResizeColumn(0)
dgvExcelColumn.AutoResizeColumn(1)
'Me.dgvExcelColumn.Columns(0).Visible = False
End If
End Sub
this the code tht i wrote to read the excel into the grid....i am using vs2005
|
|
|
|
|
Hi,
i am also using vs2005 and vb.net coding.
i am using a DataGridView and not a DataGrid!!!!
this is what i am doing and it works just fine....
***********************************************
dim dt as new datatable
dim data as new clsdata
dt = data.GetStockCodes()
me.dgView.datasource = dt
me.dgview.columns(0).visible = false ' where '0' = column index
me.dgview.columns(2).visible = false ' where '2' = column index
*************************************************
hope this helps
Anoop Brijmohun
|
|
|
|
|
Anoop i tried your code but dont know y is it not working for me???? i am gettig extra columns like TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME(in this column the values are the sheet names from the excel that i select) and yes its datagridview n not data grid...am sorry.....i want to remove these extra columns.....
|
|
|
|
|
Hi...
mmm....
no idea why not working for you dude,
try this.....
*******************************
Me.dgView.Columns.Remove("ColumnName")
*********************************
ALTERNATIVELY
instead of using a dataview
*****************************
Dim DataViewExcel As DataView
txtTempXls.Text = ofdExcelReader.FileName
DataViewExcel = FillDataSet()
*****************************
try using a datatable
*****************************
Dim DataViewExcel As new DataTable
txtTempXls.Text = ofdExcelReader.FileName
DataViewExcel = FillDataSet()
DataViewExcel.columns.remove("ColumnName")
*****************************************
thats all i can think of though....
the above works fine for me.....
anyway, hope you come right...i gotta go till tom.
Anoop
|
|
|
|
|
Setting a column's visibility to false should have worked. Might want to re-check your code or when it is being executed. Probably a timing issue.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Sorry for the late reply.....thank you very much for th help....i used th following code to remove th extra columns
DataViewXls.Table.Columns.Remove("TABLE_CATALOG")
|
|
|
|
|
The best way to do this is to retrieve only the columns you need from the database. Outside of that, if you have a table that has more columns than you need to display, turn off the option that automatically creates columns in the DataGridView, then create your own DGV columns (which you should already be doing anyway, right?!), and map those columns to the ones in your DataTable.
|
|
|
|
|
Dave am using visual studio 2005 and am not able to find the property AutoGenarateColumns for the datagridview....can you help me on this.....thanks in advance...
|
|
|
|
|
Did you use the class name instead of the instance name?? This won't work:
DataGridView.AutoGenerateColumns
This does:
myDGV.AutoGenerateColumns = False
|
|
|
|
|
sorry for th late reply.......thanks for th help....i used th following code to remove th extra columns
DataViewXls.Table.Columns.Remove("TABLE_CATALOG")
|
|
|
|
|
Ok I have a picturebox being centered on my MDI Parent form. WHenever I open a child form of my MDI parent form the picturebox floats in front of the child form. I know that this is how MDI Parent forms are supposed to act. I have found that any control placed on an MDI parent form will always be in front of any child forms.
I already have a background image property set but need another image centered in the middle. I have the code for centering but need to figure out how to get this picbox to stay in the background. Since I already have a background image set this is not going to be the solution which seems to be the answer everyone gives for this question as I have found through searching the web.
Does anyone know a way to keep a picturebox (or any control for that matter) on an MDI parent form in the background when child forms are opened??? if you can solve this I will be in debt to you forever! PLEASE SOMEBODY HELP ME!!!!!
|
|
|
|