From another forum I've read that it isn't possible to get a Repeater control to trigger the ItemCommand event when a dropdownlist selection is changed or a checkbox check is changed. I'm apt to believe the other forum, since it is generally true and helpful, and my own experiences bear this out. I would like use a repeater control because it simplifies and reduces the coding I need to do to generate the list of items. Is it possible to get events from a dropdownlist or check box that are within a repeater control? The wisest of the wise may err. - Aeschylus
Baatezu
Posts
-
ItemCommand triggering off of a dropdownlist -
C# to VB pleaseI agree with Christian that it isn't very hard and you should do it yourself, for a learning experience if nothing else. I use a tool online http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx [^] to convert for me. Though I warn you, it isn't perfect. There are some differences in C# and VB that can make these conversion tools cause critical flaws in the software. You will need to be able to understand the code and be able to correct these, or else it won't do any good. There are others online, just need to look for them. Which is why it is good to do it on your own first so you can learn where these differences are, and be able to know where to correct them later when using tools to assist in the conversion. The wisest of the wise may err. - Aeschylus
-
Checkbox values in Repeater ControlI'm trying to set the Checked value in a checkbox inside a repeater control. The code I am using for this is I am getting a 'Specified cast is not valid.' error when I run this. When filling the 'Active' Column in the dataset I have tried both using a string "True" and a boolean true to attempt to set the value. I get the same error both ways. Everything I can find online shows that this is the right method to do this, but I am unable to resolve this error. Any pointers on this would be very appreciated. The wisest of the wise may err. - Aeschylus -- modified at 3:33 Sunday 13th November, 2005
-
Good Intersection FunctionI'm looking for a function to check if 2 lines intersect. There are a few key factors to this. The project I am working on involves navigating around polygons by moving from vertex to vertex, but only to vertex's it can move in a straight line to without intersecting other lines. I've found a few functions online, except they always find an intersection ON the vertex, which I can't have, and they find an intersection when moving from 1 vertex to the other on the same polygon, parallel lines, which is an allowed move. Thanks Note - The project involves the intersect check, but that isn't the project, the project is to test AI algorithms to compare the results. (he's provided some Dr. Scheme code http://skipjack.cs.wwu.edu/~gmatth/index.html that does it, that I can't quite figure out how to convert to C# though I know the function I need to translate is (define intersect-lines?) The wisest of the wise may err. - Aeschylus Codito Ergo Sum - (I code, therefor I am) -- modified at 19:32 Sunday 9th October, 2005
-
Tree Creation CodeHello, I am wondering if anyone can point me in the direction of a nice bit of code to draw a tree structure. Not the tree that is one of the default windows controls, but the list tree structure O / \ O O / | \ \ O O O O like that. Thanks The wisest of the wise may err. - Aeschylus
-
DropDownList selection oddityI'm making an ASP webpage using VB.NET. I'm creating controls on the fly. When I create my dropdownlists on the fly I am getting an odd behavior. When I change the selected value of one of the controls in the array it changes it for all of them. I'm currently filling an array of listitems from a database and then using AddRange to add the values to each dropdownlist. When I attempt to use the SelectedValue property of the dropdownlist to set which value is selected, it effects all of the dropdown lists. I can tell this because every drop down list is set the value the last item should have. This is the loop I use to fill the listitem array (it's redim-ed to the proper size) ctr = 0 For Each drddlFill In ds.Tables("dtEmps").Rows lsiUpline(ctr) = New System.Web.UI.WebControls.ListItem lsiUpline(ctr).Text = drddlFill("employee_id") & " - " & drddlFill("first_name") & " " & drddlFill("last_name") lsiUpline(ctr).Value = drddlFill("employee_id") ctr += 1 Next Next I fill each drop down list Row = new TableRow Cell = new TablecCell ddlUpline_Array(ctr).Items.AddRange(lsiUpline) ddlUpline_Array(ctr).SelectedValue = databaseInfo("ID") Cell.Controls.Add(ddlUpline_Array(ctr)) Row.Cells.Add(Cell) tblBaseshop.Rows.Add(Row) databaseInfo is pulling correct information. The rest of the row is filled with information from this so I know it is different for each row. Every dropdownlist in ddlUpline_Array gets set to the selection of the last it. Any advice on how to get each ddl set to a different selection? If I do a loop and fill each box from the database each time, the selection will be different for each box, but that is much too time consuming. Thanks The wisest of the wise may err. - Aeschylus
-
Checked checkbox says not checkedThank you. It works now thanks to your advice. The wisest of the wise may err. - Aeschylus
-
Checked checkbox says not checkedHello, I dynamically create a check box in each row of a table. (dynamically created rows) When I click a button to check the status of the check boxes, they all come back a not checked. This is how I add the check boxes ----- cell = New TableCell cell.Controls.Add(chkHeaderDelete_Array(HeaderLoop)) row.Cells.Add(cell) tblHeader.Rows.Add(row) ----- and I check them by ----- rowCtr = tblHeader.Rows.Count For ctr = 0 To rowCtr - 1 row = tblHeader.Rows(ctr) chkBox = row.Cells(0).Controls(0) If chkBox.Checked Then .... ----- And every check box in the table will come back as not checked. Is there anything I can do to make it properly recognize when check box is checked or not? Thanks The wisest of the wise may err. - Aeschylus
-
Passing info Between IE WindowsHello, I made a Pop up calendar that opens in a new window [win2] (with a calendar control) and puts the selected date in a text box on the original window [win1]. The window opening and passing the data back is done via Javascript. I would very much like some way of making a specific function on the originating page [win1] to fire or to force the page to refresh. I have a crystal report that loads date dependant information and I use the popup to change the date on the form, but it won't refresh the crystal report right away. Something has to make the CR reload, and that is what I'm not sure of how to do. Any advice, pointers, pages, code snippits would be very greatly appreciated. NijaMunki The wisest of the wise may err. - Aeschylus
-
IIS Sending IE and FF different code, an ASP fix?OK, well, I guess I get to keep looking for stuff on the web. I'm sure something is out there somewhere. :) thx The wisest of the wise may err. - Aeschylus Codito Ergo Sum - (I code, therefor I am)
-
IIS Sending IE and FF different code, an ASP fix?Would a problem in FF's CSS change the HTML the 'View Source' options shows, or is the server sending different code? If I save the source from IE and load it in FF it looks right, and FF's source is still messed up when loaded into IE. I would disagree that recommending a browser other than IE is the same as recomending FF. Opera, iRider, Mozilla (yea same engine) are all also available for use. I'm sure there are more. The wisest of the wise may err. - Aeschylus
-
IIS Sending IE and FF different code, an ASP fix?I do know what pages are sending the poorly formatted HTML, and I can't figure out why. It's just labels and text boxes and standard controls that get shifted so they overlap. So I'm not sure what control would be causing it. Is there a good resource I can use to learn how IIS is detecting different browsers and perhaps modify the detection to result in sending same/similar HTML as it does for IE. Note - I didn't recommend Firefox, I recommened not IE. :) The wisest of the wise may err. - Aeschylus
-
IIS Sending IE and FF different code, an ASP fix?Is there a away to force IE and Firefox to get the same HTML when they attempt to access my pages? IE gets correctly formatted HTML and FF get's messed up HTML. I know the HTML itself is different, (Yay windif) and I've proven that the IE source works fine in FF and the FF is still broken in IE. Any help with this would be great. It hinders my project a great deal. And it kinda sucks to have to be telling our customer that he is having to use a browser we've advised him not to use in the past. The wisest of the wise may err. - Aeschylus Codito Ergo Sum - (I code, therefor I am)
-
Dynamic Control Creation w/VB.NETI want to display, in text and check boxes, some rows from a database that I need to change, then update the database. I don't know how many rows I'll be getting so creating that static number won't be possible. I've found how to display the controls on the screen, but I don't know how to place them. Can anyone point me to a good source of how to tell the items where to be? thanks The wisest of the wise may err. - Aeschylus
-
Limiting type and length in a textboxI have a web page where I need the user to enter a phone number and I have it divided into 3 boxes (I'm in the US) first 2 need 3 numbers and the last 4 digit It currently will accept anything and at any length, obviously not good for a phone number. Is there anyway to using ASP and VB.NET to limit the characters a text box will accept to numeric (without limiting the entire page) and limit how many characters the textbox will accept (again, not the entire page). I've tried putting code in the 'TextChanged' declaraction, but it never seemed to run. Any suggestions would be great. I don't trust the users to always enter the right info in the right places. The wisest of the wise may err. - Aeschylus Codito Ergo Sum
-
C# DLL in VC++This would be in a standard CV++ application. The wisest of the wise may err. - Aeschylus Codito Ergo Sum - (I code, therefor I am)
-
C# DLL in VC++I'm trying to use a form I created in C# in a VC++ program I am creating. (Descriptive subject, no?) I have the C# compiling into a DLL and ... well that's about as far as I can get. I've done some reseach in the MSDN, and it shows how to use console classes, but nothing about how to use a form created in C#. I don't have the code on this computer, but the method I found I was trying last was using the following code (Close as I can 'member) #using //However main CLR dll is spelled. #using "MyCSharpDLL.dll" using namespace MyCSForm;//I tried it with and without this //line and it didn't work either way, so I show it. That's about where I get to. I also try to create an object of the class in the name space using either MyForm Form1; OR MyCSForm::MyForm Form1; Depending on if I use the "using namespace MyCSForm;" line or not. I have also tried to using a slightly more complex method, one that is used to load functions from a DLL. I use that method to pull things out of a C++ dll that uses dllexport to say what comes out. That method can load the C# DLL but I can't figure out what I would be trying to load from it. Tried and failed to do the form, and main and even the namespace. None worked. At least I don't know how to get them to work. Any help would be appreciated and if you have question I will answer them to the best of my abilities. And if I am going all wrong on how to load a DLL made in C# into C++, please point me in the right direction. :) Thanks. Note: I'm sorry if I seem to be flooding the forum, but I'm not sure which of the three (Visual C++, Managed C++, C#) I am posting this in would be the best place for it. Since it deals with all three of them, I believe. Thank you again for any help. The wisest of the wise may err. - Aeschylus
-
C# DLL in VC++I'm trying to use a form I created in C# in a VC++ program I am creating. (Descriptive subject, no?) I have the C# compiling into a DLL and ... well that's about as far as I can get. I've done some reseach in the MSDN, and it shows how to use console classes, but nothing about how to use a form created in C#. I don't have the code on this computer, but the method I found I was trying last was using the following code (Close as I can 'member) #using //However main CLR dll is spelled. #using "MyCSharpDLL.dll" using namespace MyCSForm;//I tried it with and without this //line and it didn't work either way, so I show it. That's about where I get to. I also try to create an object of the class in the name space using either MyForm Form1; OR MyCSForm::MyForm Form1; Depending on if I use the "using namespace MyCSForm;" line or not. I have also tried to using a slightly more complex method, one that is used to load functions from a DLL. I use that method to pull things out of a C++ dll that uses dllexport to say what comes out. That method can load the C# DLL but I can't figure out what I would be trying to load from it. Tried and failed to do the form, and main and even the namespace. None worked. At least I don't know how to get them to work. Any help would be appreciated and if you have question I will answer them to the best of my abilities. And if I am going all wrong on how to load a DLL made in C# into C++, please point me in the right direction. :) Thanks. Note: I'm sorry if I seem to be flooding the forum, but I'm not sure which of the three (Visual C++, Managed C++, C#) I am posting this in would be the best place for it. Since it deals with all three of them, I believe. Thank you again for any help. The wisest of the wise may err. - Aeschylus
-
C# DLL in VC++I'm trying to use a form I created in C# in a VC++ program I am creating. (Descriptive subject, no?) I have the C# compiling into a DLL and ... well that's about as far as I can get. I've done some reseach in the MSDN, and it shows how to use console classes, but nothing about how to use a form created in C#. I don't have the code on this computer, but the method I found I was trying last was using the following code (Close as I can 'member) #using //However main CLR dll is spelled. #using "MyCSharpDLL.dll" using namespace MyCSForm;//I tried it with and without this //line and it didn't work either way, so I show it. That's about where I get to. I also try to create an object of the class in the name space using either MyForm Form1; OR MyCSForm::MyForm Form1; Depending on if I use the "using namespace MyCSForm;" line or not. I have also tried to using a slightly more complex method, one that is used to load functions from a DLL. I use that method to pull things out of a C++ dll that uses dllexport to say what comes out. That method can load the C# DLL but I can't figure out what I would be trying to load from it. Tried and failed to do the form, and main and even the namespace. None worked. At least I don't know how to get them to work. Any help would be appreciated and if you have question I will answer them to the best of my abilities. And if I am going all wrong on how to load a DLL made in C# into C++, please point me in the right direction. :) Thanks. Note: I'm sorry if I seem to be flooding the forum, but I'm not sure which of the three (Visual C++, Managed C++, C#) I am posting this in would be the best place for it. Since it deals with all three of them, I believe. Thank you again for any help. The wisest of the wise may err. - Aeschylus I'm at home right now.
-
Creating controls during runtimeI found the answer. :) I was setting the pointers equal and when I deleted I freed the chunk of memory both were pointing to, and when I created new it created a new chunk. Took a few to get out of sync. I just had to add in a for loop and it works all better now. Thanks for anyway working to try and get me an answer. I changed the IF statement structure section to this ---BEG CODE--- if(cnt < 1) { StaticArr = new HWND[++cnt]; } else if(cnt > 0) { temp = new HWND[cnt]; for(loopctr=0; loopctr < cnt; loopctr++) { temp[loopctr] = StaticArr[loopctr]; } delete [] StaticArr; StaticArr = new HWND[++cnt]; for(loopctr=0; loopctr < cnt; loopctr++) { StaticArr[loopctr] = temp[loopctr]; } delete [] temp; } ---END CODE--- The wisest of the wise may err. - Aeschylus