|
Ya but i have created one html file and for that i am sending this dataset after rendering as
StringWriter stringWriter1 = new StringWriter();
HtmlTextWriter htmlWrite1 = new HtmlTextWriter(stringWriter1);
i am trying read html file and after reading just rendering the control as shown below
dg1.RenderControl(htmlWrite1);
i am getting html file result and that 4 column grid.
Only i need to make particular column alignment.
How to do this.
|
|
|
|
|
What does this have to do with writing a Windows Service application?
|
|
|
|
|
Next to the "no UI" issue, there's also the point the a DataGrid[^] doesn't have a columns-property.
Yes, it is faster in displaying data than a DataGridView, but it doesn't have as much features built in.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
But through coding if i type DataGrid.Columns[]
Columns property it will show. But after adding below code it is not working
dg1.Columns[3].ItemStyle.HorizontalAlign = HorizontalAlign.Center;
What to do. Please reply me.
|
|
|
|
|
ven753 wrote: Columns property it will show.
Only if you're referencing a DataGridView, and that's a different control.
Either you switch to the DataGridView, or you adjust the requirement of needing the alignment.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have a string array which will be different but I always need to create a CreateTextTableCell based on AppSettings("RosterFields") fileds count. If no string is found in ArrayHeader create an empty cell up to Settings("RosterFields"). My code below is not working what I have missed?
Dim ArrayHeader() As String = {"1","2"}
For columnIndex = 0 To ConfigurationManager.AppSettings("RosterFields") - 1
For Each value As String In ArrayHeader
CreateTextTableCell(Row, columnIndex, value.ToString, currentRow, 182, True)
Next
Next
|
|
|
|
|
byka wrote: what I have missed? Point 9:9.Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum. I've posted an answer in the VB.NET forum.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I need to retrieve the .NET 4.0 install path from a batch file. Following is my batch file code snippet:
REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP" /s|FIND "InstallPath"|FIND "4.0."||ECHO
The result is
InstallPath REG_SZ C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
However, I need to assign the path to a variable. I found some related post online but can’t get any of them work. Any advice is greatly appreciated!
Cheers!
|
|
|
|
|
Why are you using a .bat file? You can extract this information direct from the registry via the RegistryKey Class[^].
|
|
|
|
|
I know using C# I can do almost anything. However, QA have been using batch files for long time. They know nothing about .NET programming. I am helping to add new features to the batch file, not making technical change at this point. Thanks!
|
|
|
|
|
Then your statement "However, I need to assign the path to a variable.", needs more detail about what this has to do with the .NET framework.
|
|
|
|
|
The bottom line is I need to run ngen.exe from the batch file. So I need to know the exact path which is different on a 32bit or 64 bit machine, and .NET 4 with directly minor versions.
|
|
|
|
|
Sorry, but that still does not explain what you want your batch file to do.
|
|
|
|
|
I think I have figured out what you are trying to do. You need two batch files, the first file is:
REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP" /s|FIND "InstallPath"|FIND "4.0." > findPath.tmp
set /P tmpPath= < findPath.tmp
call splitter %tmpPath%
set /P tmpPath= < findPath.tmp
The second file named splitter.bat is:
echo %3 >findPath.tmp
At the end you should be able to see the variable tmpPath contains just the path portion of the results from the FIND command.
|
|
|
|
|
That's smart, and is really helpful. Thank you, Richard!
|
|
|
|
|
It took a while, but I finally got there; hope it helps you.
|
|
|
|
|
Simple; create a console-application that retrieves the path. Call it from the batch-file.
That's how it SHOULD be done. If the network-admin complains that he won't allow foreign executables, simply upload the sourcecode to do it (as a text-file) and compile it on the target-machine itself.
If he still complains, make it a simple powershell-script. If he keeps complaining, send him here.
Yes, can also be done with the commands already available, and that way should be avoided. A hint below;
REGEDIT.EXE [ /L:system | /R:user ] /E exportfile.REG "registry_key" Now you have the complete key in a text-file. Next, research "FOR".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have made the same suggestion already; they don't want real programming.
|
|
|
|
|
..if they don't trust you with a compiler and a keyboard at their terminal (that was one of the suggestions), then why do they allow you on the network?
--edit;
Are you allowed to invoke executables that exist on the system, and to create text-files?
If yes, create a text-file by writing the source to read "a" registry-key and compile to the temp-dir. Invoke from there using the batch-file and delete when done
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
I'm Isuru Perera working with my university final year project.I want to detect the most close corner(edge) of a image(capturing continuously by web camera) to the web camera.Can you please help me out with this.
Thank you
|
|
|
|
|
Your project has been set to test how much you have learnt during the course, not to test whether you can get other people to do your work for you.
If you have specific questions about part of your code, then feel free to ask them. However, nobody here is going to write the code for you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Dim control As Object = Me.FindControl(ControlId)
If (ValuStatus) Then
If DbValue.ToUpper() = SelectedValue.ToUpper Then
control.Style.Add("disabled", "true")
Else
control.Style.Add("disabled", "false")
End If
Else
If DbValue.ToUpper <> SelectedValue.ToUpper Then
control.Style.Add("disabled", "true")
Else
control.Style.Add("disabled", "false")
End If
End If
|
|
|
|
|
Please do not cross post...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
It should be control.Attributes.Add...
disabled is not a style (css) it is an attribute.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello !
I want to build a MVC 4 app database using Entity Framework Code First .
I have the following problem : I've tried to create a local database with 2 tables in it (I declared 2 classes and then attached them in a DbContext class) , and then wrote the following connection string :
<add name="RUDbContext" connectionString="Data Source=(LocalDB)\v11.0;MultipleActiveResultSets=True;AttachDbFilename=|DataDirectory|\RUDb.mdf;Integrated Security=True" providerName="System.Data.SqlClient"/>
The database doesn't seem to be created after running the application , since it doesn't appear in the Server Explorer and in the App_Data Folder .
I use Visual Studio 2012 .
Can you please help me solve this problem ?
|
|
|
|