|
Hi to all
In my gatagrid i populate the values from my one table with two fields
Now on edit dynamically i want to show the dropdown list with data in that cell
should come into that dropdown. and it should be get updated
how to do this i'll be very much thankful to you.
|
|
|
|
|
In you are using 2005
In your datagridview choose edit columns, and change the type of column of the column you want to be a dropdown from datagridviewtextboxccolumn to datagridviewcombobox column and then you can bind the dropdown to any datasource
Alexei Rodriguez
|
|
|
|
|
where should i go then? please help me out
|
|
|
|
|
hi
What is Wrong with you, are you crazy, this is not a chat room, Stop posting junk, what is your problem, lets see if we can help, explain
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
|
Hi,
I have this code that gives me an object reference not set to an instance object for variable objDI
when the code hits
outputfile = gserver.Outfolder & "\" & objDI.outputfolder
This is weird because the PDFDocs count is 1.
Please help.
<code>
For Each objDI In objSI.PDFDocs
outputFile = gServDef.OutFolder & "\" & objDI.OutputFile
If objDI.DocType = "HTM" Then
If Not PrintHTM(objDI.InputFile, outputFile, objSI.ToString) Then
LogPrintError(objSI, file)
Return False
End If
Else
If Not PrintOther(gServDef.InFolder & "\" & objDI.InputFile, outputFile, objSI.ToString) Then
LogPrintError(objSI, file)
Return False
End If
End If
Next
<\code>
|
|
|
|
|
You failed to specify what type of object objDI is, therefore you will not have access to its properties. If you add As PDFDoc after For Each objDI , or whatever type of object collection you are enumerating, this should work as you expect.
Clean code is the key to happiness.
|
|
|
|
|
I had actually declared the variable objDI at the top of the function
whch I did not include in the code snippet.
But I will try your idea anyway.
|
|
|
|
|
Hello everyone, I need help with some options.
I am creating a test app more as a proof of concept type deal. In the end, this project is likly going to moved to asp but thats later. Right now I have a set of classes that create themselves from a database. The program has to take the objects and put them into seperate groups, then compare them. Once an object is done, it is removed from the group.
This works fine when I am just comparing two objects, but I am stuck when it comes to finding a way to throw them into two or more groups, and compare each item in turn. At first I thought an array or linked list would work, but I am not sure what the performance would be when each array has over one hundred objects.
Is this the way to go, or is this a good time to break the books open and go through collection?
|
|
|
|
|
a few hundred objects in a List or Array won't bother any CPU
If we are talking about several millions ...
If you want some high performant code then you will have to look hard at the problem.
For example if you want to sort a bunch of objects into groups there are two major approaches:
1.) you talke object by object, try finding out the right group and then put the object in the right bucket - for this approach nothing is wrong with List (if you are using .net 3.5 try the HashSet if not the Dictionary might be the most performant - access like)
2.) You start by putting all objects in one group and then going through and splitting if necessary - this is commonly solved with an additional object-field (just a number indicating the group).
As a example for this option: maybe you did some compiler-theory course (or read the dragonbook). Anyway you might know a situation where you are working with finite-state machines (WF anyone - sometimes you are wondereing if there is a way to get the FSM "smaller" (i.e. fewer states - same results) - this can be done by an algorithm that first puts all states in one group and then uses some sophisticated test to split those groups - as a result you get a collection of groups you can transform into a new FSM with the same resluts....
You see: for the second approach you will have to know your problem very well!
|
|
|
|
|
Thanks CKnig
Getting them into the right group isn't a problem, that comes straght through the DB. I was just worried about itterating the bunch multiple times.
Now I have to break the books out and look into the Hashes and Dictionary.
Linked lists are looking good if those don't work. I will have to do a lot of removals in the middle, but not alot of searching so that won't slow it down.
|
|
|
|
|
Hi all
I'm currently working on a fairly large project with multiple developers. Throughout the application we'll be using a bunch of images for icons, buttons, etc and I'd like to be able to set up some sort of central repository for them all.
I guess ultimately I'd like to have them set up with enumerations and not have to keep the image files in one specific place e.g.
label1.image = ourImages.thePictureOfACat
I was thinking about using one big imagelist but that would restrict us to a certain size for all the images. I haven't had any luck with sharing resouce files between projects either. We use SourceSafe if that helps at all...
Any ideas?
Thanks
|
|
|
|
|
Perhaps not the most elegant way to do this, but it might work for you (we are using a similar solution for language choices in an app): establish a table in a database somewhere with a field for the type or function of your image, and another field with the path to the repository including the actual image name. Create a driver that retrieves the image based on the requested function from the path mentioned in your table. That way your example would look something like this: label1.image = ImageFetcher.GetImage("Cat") (or something like that). The driver is easy to create and make available to your colleagues.
Ofcourse this solution as I suggested it here is only any good during the development of your app. However I am sure you can adapt the idea to use (for example) an xml file, which can easily be included with the app once it is ready, instead of a database table. And obviously you'll have to consider how to include the actual images, if you don't just want to dump them in a folder during installation.
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi to all
My grid is showing the data. in grid there is edit
when i click on edit dropdown should be created insted of
textbox. would u know how to achive this....
|
|
|
|
|
Hi!!
In CellClick Event of the DataGrid write the below code
If e.ColumnIndex = DataGridView1.Columns("ColEdit").Index Then
Dim dgvCombo As New DataGridViewComboBoxCell
DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex) = dgvCombo
End If
|
|
|
|
|
Hi everybody,
Could anybody help me understand the steps to call a report (built with Crystal Reports 2008) from code. This report summarizes sales by salesman and by city. It contains a subreport that summatizes the cities by region.
The subreport uses a field from the main report as an input parameter (the Region_Id). Data for both reports come from SQL stored procedures. When I preview the report in CR 2008 it works great, but I can't figure out how to bring it up from my VB.NET (2002) application. The ReportViewer displays the main report but leaves the subreports blank.
Any thoughts? Please, keep in mind that I really do not know (understand) how to work with the CReports libraries. In fact I don't even know how I am able to see the main report
Thanks for your guidance.
Alex.
|
|
|
|
|
Have you solved this?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi Paul,
Unfortunately, I have not. I tried following CR tutorials, but can’t make it work. I always end with the same outcome: Main report displays, sub reports stay blank.
Any suggestions will be greatly appreciated.
Thanks.
Alex.
|
|
|
|
|
What does the data binding look like on the subreport? Is it coming from the the main report?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
The main report has two input parameters> 1. a byte needed for an internal enumeration, 2. the starting date for the report. (both of these parameters are also needed for the the sub-reports)
The main report will display detailed by-date sales grouped by state, by city, and by salesman. The sub-reports are to display the city summary for each state. This sub-report is located in the group footer of the city section of the main report.
When using CR2008 I can see every sub-report at then end of each city. This is what I need to accomplish from the vb.net2002 app.
Thanks.
Alex.
|
|
|
|
|
Hi!
I spend lots of time trying to figure out why treeview selected state is not maintained for child nodes. If I am in same page it maintains the state of selected node but when a child node is in selected state and if i try to navigate to another page, it selects the root node instead of child node. below are my codes
page_load events
-------------------------------
If Not Session("propertynode") Is Nothing Then
Debug.WriteLine(Session("propertynode"))--->115/225
propertytn = Me.tvProperty.FindNode(Session("propertynode"))-->nothing
'
Else
propertytn = Me.tvProperty.FindNode(Session("locationid"))--->115
End If
--------------------------------
thanks in advance.
|
|
|
|
|
hi frnds,
I have requirement to convert XML to SGML. I tried searching for any tool but couldn't get any.
Could you suggest any 3rd party tool for this?
Thanks.
Keep DotNetting!!
GeekFromIndia
|
|
|
|
|
Isn't XML a subset of SGML?
…as in… XML is already a kind of SGML?
ROFLOLMFAO
|
|
|
|
|
|
You are treating RetrieveList as if it was a string, but it's a reference to an array.
Furthermore, as the variable is null (Nothing in VB), there is no array, so you can't put anything in it or read anything from it.
Why are you trying to loop through an array to create an array? Why don't you just use the Enum.GetNames method to get an array of the names in the enumeration?
Experience is the sum of all the mistakes you have done.
|
|
|
|