Jump to content
Xtreme .Net Talk

IxiRancid

Avatar/Signature
  • Posts

    104
  • Joined

  • Last visited

Everything posted by IxiRancid

  1. I tried both ways - set Checked=true in properties of control at design-time - and in Page_Load as you said: rbShowWearersAll.Checked = true; Reading my previous post again, I discovered I didn't make it clear: The solution JohnsHandle suggested (UpdatePanel) works! It does solve OP's problem, but I'm interested in that "no onclick event" behavior of this RadioButton. Will check it when I get some time.
  2. I don't think that solves the problem. Indeed, I had OP's radiobuttons outside of UpdatePanel, but I recoded my test page to this: <asp:UpdatePanel ID="UpdatePanel88" runat="server" UpdateMode="Always"> <ContentTemplate> <asp:RadioButton ID="rbShowWearersAll" runat="server" GroupName="showWearers" oncheckedchanged="rbShowWearers_CheckedChanged" Text="All" AutoPostBack="True" /> <asp:RadioButton ID="rbShowWearersActive" runat="server" oncheckedchanged="rbShowWearers_CheckedChanged" GroupName="showWearers" Text="Active" AutoPostBack="True" /> <asp:RadioButton ID="rbShowWearersInactive" runat="server" oncheckedchanged="rbShowWearers_CheckedChanged" GroupName="showWearers" Text="Inactive" AutoPostBack="True" /> </ContentTemplate> </asp:UpdatePanel> It still works as described in my post above. There is no onclick and it remains as "checked" all the time (in Page Source). This behaviour occurs only when Checked="True" is set in properties or in Page_Load. But, it does change a postback for the first RadioButton. So, if they are inside an UpdatePanel all three postback, but the first one retains it's values - no onclick.
  3. Interesting issue indeed. This is what I get if I look at the page source: [b]<input id="rbShowWearersAll" type="radio" name="showWearers" value="rbShowWearersAll" checked="checked" />[/b] <label for="rbShowWearersAll">All</label> <input id="rbShowWearersActive" type="radio" name="showWearers" value="rbShowWearersActive" onclick="javascript:setTimeout('__doPostBack(\'rbShowWearersActive\',\'\')', 0)" /> <label for="rbShowWearersActive">Active</label> <input id="rbShowWearersInactive" type="radio" name="showWearers" value="rbShowWearersInactive" onclick="javascript:setTimeout('__doPostBack(\'rbShowWearersInactive\',\'\')', 0)" /> <label for="rbShowWearersInactive">Inactive</label> If I set this radiobutton to checked="true" or even do it on Page_Load it doesn't set his onclick properties. And if I change my selection to any other radiobuttons the property "checked" remains unchanged. Don't know what the issue is right now, but below is a solution that works: <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True"> <asp:ListItem Selected="True">all</asp:ListItem> <asp:ListItem>act</asp:ListItem> <asp:ListItem>inact</asp:ListItem> </asp:RadioButtonList> And in codebehind: Protected Sub RadioButtonList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButtonList1.SelectedIndexChanged If Me.RadioButtonList1.Items(0).Selected = True Then 'process ElseIf Me.RadioButtonList1.Items(1).Selected = True Then 'process ElseIf Me.RadioButtonList1.Items(2).Selected = True Then 'process End If End Sub The example was tested, but I didn't put a Tab control on it, also I didn't set any Triggers. Should work just fine, if not try with some triggers. A simillar issue with Panel control, which enabled/disabled doesn't update it's child controls to a new state in this blog
  4. When you say: e.RowItem = 0 that is the row index which user has clicked in. So you can use this like this: GridUsers.DataKeys(e.RowItem).Value.ToString() '(sorry it's in vb.net) [/Code] Let me know if this works.
  5. I'm need a solution that behaves something like this: (A) application (outside company) - this application is the front-end used as user data input (lots of webpages, one for each specific Report) - this application should use one common Web Service which hosts Crystal Reports and exports them (B) application (my Web Service) - hosts all Crystal Reports (at first 30, then should be an option to add more) - primary source for reports is DataSet or Class object (created with XSD.exe on DataSets for each report) - it exports Crystal Report as RPT file which is then used in application C. © application - an utility (DLL) I created that is set into client GAC which is used to print reports directly to printer (a very wanted solution I guess. When I tried to find something like that, there was none) Now the problem: (A) application is an outside solution that has no insight into (B) crystal reports and their datasources, thus I need to serve all Data objects (or DTO) for (A) so they can fill the data, send it to (B) which exports filled report. Here's how I do it (currently): (B) application (separate public Class generated by XSD.exe) Namespace nBCInspc <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42"), _ System.SerializableAttribute(), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="http://tempuri.org/dsBCI.xsd")> _ Partial Public Class dsBCIB1_1 Private cusNameField As String '''<remarks/> Public Property cusName() As String Get Return Me.cusNameField End Get Set(ByVal value As String) Me.cusNameField = value End Set End Property End Class (B) Main class (service) <WebMethod()> _ <System.Xml.Serialization.XmlInclude(GetType(nBCInspc.dsBCIB1_1))> _ Public Function crSerRPT(ByVal myDTO As Object) 'processes IN parameter from (A) and exports filled RPT End Function --------------------------------------------------- (A) application calling (B) service Dim neS As New nPrint.dsBCIB1_1 neS.cusName = "Best Customer" Dim np As New nPrint.Service np.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials Dim fname As String fname = np.crSerRPT(neS) ---------------------------------------------------- The main problem is that when I use this part of code neS.cusName = "Best Customer" I cannot fill more than one value. This of course is not good, because I need to fill multiple values (tables in reports etc.). When they write neS. intellisense gives them all available fields because of this line: <System.Xml.Serialization.XmlInclude(GetType(nBCInspc.dsBCIB1_1))> _ I need to: - (DONE) provide to (A) full list of parameters for each report so they can fill it and send it - allow them to fill multiple values Any ideas welcome, I can try to explain better if needed, or even a completely different hint for a solution! Thanks!
  6. Hi, I can only give you my code I use. It's intention is dynamic addition of buttons and place them into a Placeholder. Dim LinkB11 As New LinkButton Dim oCnt As Integer = 1 LinkB11.Text = oCnt LinkB11.ID = "LinkB" & oCnt LinkB11.Attributes.Add("href", "javascript:__doPostBack('LinkB11','" & Trim(drSELECT1(1)) & "/" & Trim(drSELECT1(0)) & "')") PlaceHolder1.Controls.Add(LinkB11) oCnt += 1 And then in Page_Load event this code: If Microsoft.VisualBasic.Left(Request.Form("__EVENTTARGET"), 5) = "LinkB" Then LinkB11_Click(Request.Params.Get("__EVENTARGUMENT")) End If The main Click Sub is this: Private Sub LinkB11_Click(ByVal mFf As String) Response.Redirect("http://localhost/retailforms/subweb/" & Trim(mFf) & ".aspx") End Sub Don't know how this would act if you had premade HTML Buttons on the page. But perhaps it can help you catch the Button Click event.
  7. Actually that is what I already have, let me explain why I need this: - the company where I work needs some kind of Technical documentation about our software and we were given the assignment of creating a Relation diagram with additional explanation of the tables and it's structures. I would need the field description of each field in our tables: filed name - type - description CONO - INT - 'Company number' CNME - CHAR(50) - ' Company name' Here's how I make my XSD's and later XML's (ds being a filled DataSet) swXMLschema = New StreamWriter(knjiznica & "_" & DB2file & ".xsd") Dim srSchema As String = ds.GetXmlSchema Dim srReplace1 As String srReplace1 = srSchema.Replace("Table", DB2file) srReplace1 = srReplace1.Replace("utf-16", "windows-1250") swXMLschema.Write(srReplace1) Me.TextBox1.Text = srReplace1 swXMLschema.Close()
  8. I would like to get a table schema from my DB2 server. The usual methods with Iseries Navigator don't work, so I resorted to XML GetSchema. It actually works perfect, but I would need the Table's Field Descriptions in my XML Schema also! Are there any other ways I could achieve this?
  9. I cannot make printing a report on a network printer to work, by PrintToPrinter method. I read all articles about it, and still I haven't found the solution. Tried changing the "machine" to "SYSTEM" in machine.config. Shared printer has Everyone in the Security tab set ON for all options. this is the exact same error I get: this link Can anyone help me, or prehaps is there another way to print a readymade PDF file?!?
  10. OK, I said it is a dumb question :) Just rightclick Database Fileds in Crystal Designer and choose Verify Database. It says (when a column is added to a DataSet) that a newer version is found and if you wish to add new fields -> yes. That's it.
  11. Pretty stupid question, but I'm having some problems: How can I rafresh a datasource in Crystal Report designer? I usually use coded datasets, "handfilled" without adapters etc. Whenever I change or add a column in my DataSet schema I can't see the change in the CR Designer. I delete the DataSet in CR then re-add it and put on all the fileds again.
  12. OK ok... problem solved. This was it, if you cehck the TXT file: ... While drPOSTAVKE.Read cmdPostavka = New OleDbCommand(strINSERT, myConnPostavke) s_IDopisa = drPOSTAVKE(2) ... just initialize the Command again. Thanks anyway.
  13. I know that a connection with two different DataReaders cannot exist at the same time. I'm doing this: 1. reading from a table and replicating these same rows 2. then these replicated rows should have Updated linked columns (IDfak - not the pirmary ID though!) pseudocode: connection open Reader1 SELECT statement (Command1) While read add parameters from Reader1 to Command2, except IDfakt (new value) Command2 INSERT (replicate) these rows - executenonquery End While connection close Is there another way to do this. I attached a TXT file with the code snip. code1.txt
  14. Thanks to both, but those Parameters are really time consuming (I write my code by hand so I dont use DataAdapters and Designer stuff), however this probably will be the solution. I got something to work with RegEx, but it took a lot of time, I think this will be as it is, and the next pages will use Parameters.
  15. I ran into a nasty problem, perhaps someone can help me: I'm inserting/updating some data into database. Some of the fields are Double type. Now, when I do this: Dim strUPDATE As String strUPDATE = "UPDATE tblPostavke SET " & _ "IDpodjetja = " & s_podjetje & ", " & _ "zunanjast = '" & s_zunanjast & "', " & _ "datumvnosa = " & s_datumvnosa & ", " & _ "datumopravljene = " & s_datumopravljene & ", " & _ "datumzapadlosti = " & s_datumzapadlosti & ", " & _ "znesekSIT = " & s_znesekSIT & ", " & _ "znesekEUR = " & s_znesekEUR & _ " WHERE IDfaktura = 21" Some values (got from s_znesekEUR = txtZnsesek.Text - s_znesekEUR = Double) get this value 123,45. It's because of my local settings in WinXP. Can I somehow change this decimal sign into a dot (.)? Because the UPADTE clearely doesn't work, it's like there is an additional value after the comma. Hope it's clear enough and thanks!
  16. The post from Mister E helped me, that's what I need. Basically just to hide the codebehind, so they won't reuse my lines :)
  17. Big problem with ASP is IIS, this Internet Information Services, when accessed by an ASPX page uses antoher system account (IUSR_machinename or ASPNET). These two users do not have permissions on 'C:\Temp\data.dat' Usually this is the problem. http://www.kdkeys.net/forums/4007/ShowPost.aspx Find some articles about user authentication and IIS, Windows Integrated security etc. OR... just set Read/Write permissions on that folder :)
  18. System.Environment.GetEnvironmentVariable("SystemRoot") this will do the job, however, it won't work in web.config or perhaps some other configuration file. You'd need to code it.
  19. Dont' think so, if the Primary Key is set with Auto_increment. Says: "bound to autonumber" (I checked this in MSAccess).
  20. I found this link, check below a table of possibillities http://lab.msdn.microsoft.com/vs2005/teams/crystalreports/featuresgranville/default.aspx
  21. Can someone please guide me to a link or an article describing how to make and use a DLL on a webpage. I wouldn't like to show the code when the webproject is sold (and deployed on the client's server), or perhaps there's another way to hide my code from the local IT dept.?
  22. An application uses XML file as an INI replacement. All is fine. This app is about to run on Win98, should I expect any problems using this XML file? :confused:
  23. It's a DB2 stored procedure, but actually I figured something out. I got this project unfinished from a collague. He use ADODB conection and pass a SQL call statement. This often took more than 20mins and got Timeout Expired. Now I used CWBX (IBM as400 dll) and just pass this call to the server. Don't know really how it connects to the server, but the thing is now faster. It runs approximately 3mins. Which of course is acceptable. And the crowd went: "ooooh". :)
  24. Can I omit the "wait-time" when I run a Stored procedure? The thing is, my procedure goes on for 20mins, and thus I usually get timeout expired or the user falls asleep and does strange things. I imagine that the application is waitting some out parameters from the server system or what? Can that be omitted?
×
×
  • Create New...