Search Results

Search found 6151 results on 247 pages for 'controls'.

Page 15/247 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • What causes markup-controls to be null?

    - by Earlz
    Ok, I have a very strange problem. I have a regular UserControl with some controls in the markup. At Page_Load these controls are still null. And I have tried EnsureChildControls It is laid out like this: Masterpage - Page - mycontrol1 - mycontrol2 - problemcontrol ProblemControl is where the controls are null. MyControl1 contains MyControl2. MyControl2 is another UserControl which contains ProblemControl in it's markup. Masterpage is nothing special and Page contains MyControl1 in it's markup. The only oddity is that ProblemControl is created dynamically at Page_Init. Everything works fine until I get to ProblemControl where none of the controls are being created. ProblemControl has the proper things all set such as the Page and Parent property. I do not see any problems. The source code for all of these(except ProblemControl) is pretty extensive, so I'm hoping someone can just give me some troubleshooting tips for this problem and if anyone has encountered it before. Also, I can place ProblemControl on another Page control and it will work fine, it's something about mycontrol1 and/or mycontrol2. But we've never had any problems with mycontrol1 and mycontrol2 doesn't have anything I can see wrong with it. (which I've been tediously analyzing for the past few hours). Has anyone else had this same problem? Are there any common things to check for?

    Read the article

  • Updating a Database from DataBound Controls

    - by Avatar_Squadron
    Hi. I'm currently creating a WinForm in VB.NET bound to an access database. Basically what i have are two forms: one is a search form used to search the database, and the other is a details form. You run a search on the searchForm and it returns a list of Primary Keys and a few other identifying values. You then double click on the entry you want to view, and it loads the details form. The Details form has a collection of databound controls to display the data: mostly text boxes and checkboxs. The way i've set it up is i used the UI to build the form and then set the DataBindings Property of each control to "TblPropertiesBindingSource - " where value name is one of the values in the table (such as PropertyID or HasWoodFloor). Then, when you double click an entry in the searchform, I handle the event by parsing the Primary Key (PropertyID) out of the selected row and then storing this to the details form: Note: Detail is the details form that is opened to display the info Private Sub propView_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles propView.CellDoubleClick Dim detail As frmPropertiesDetail = New frmPropertiesDetail detail.id = propView.Rows(e.RowIndex).Cells(0).Value detail.Show() End Sub Then, upon loading the details form, it set's the filter on the BindSource as such: TblPropertiesBindingSource.Filter() = "PropertyID=" & id This works great so far. All the controls on the details form will display the correct info. The problem is updating changes. Scenario: If i have the user load the details for say, property 10001, it will show a description in a textBox named descriptionBox which is identical to the value of the description value of for that entry in the database. I want the user to then be able to change the text of the text box (which they can currently do) and click the save button (saveBut) and have the form update all the values in the controls to the database. Theorectically, it should do this as the controls are DataBound, thus i can avoid writing code that tells each entry in the database row to take the value of the aligned control. I've tried calleding PropertiesTableAdapter.Update(PropertiesBindingSource.DataSource), but that doesnt seem to do it.

    Read the article

  • Programatically adding,changing and removing controls bound to model objects (MVVM)

    - by Ittai
    I have the following scenario and I'm trying to decide how it can and should be implemented in silverlight and c# via MVVM. Scenario: I have the following objects in my scenario: MyModel, MyModelControl, MyView and MyViewModel. MyModelcontrol is a custom UserControl of mine and the rest I think are pretty much self explanatory. MyViewModel is a Subscriber of a message which hands it a Collection<MyModel> newCol and let's mark curCol as the current Collection<MyModel> that MyViewModel holds. I then want to programatically add MyModelControl controls for each MyModel instance which belongs to newCol and not to curCol. I also want to bind the MyModelControl instance to the corresponding MyModel instance. In a similar manner I want to remove the controls which don't belong now to the collection and I want to update a property for those which belong to both. I do not want to remove all controls which belong to curCol and then add all controls for newCol as the creation of MyModelControl is "expensive". I'd appreciate help with how this should be implemented in SL as I'm new to it and to the MVVM pattern. Comments regarding the design would also be welcomed. B.T.W This will run on Windows Phone 7 so I think there are some limitations on versions, if this is an issue please comment and I'll verify which versions exactly I can use on the phone.

    Read the article

  • Which Java Framework is best suited for a web application with reusable content/behavior

    - by Jacob
    I come from a .NET background and need to do a web project in Java. I have read a bit on all the different Java web frameworks out there: JSF, Stripes, Wicket, Tapestry etc. But I would like to hear from people with real-life expertise with these frameworks. Of course I want a framework that is up to date, supports AJAX, is cool and so on, but one of my main criteria is the ability to somehow create reusable components / tags. The customer needs to be able to move tags/components around without too much problem in order to customize it for their specific needs. In ASP.NET Webforms I would use custom controls and user controls for this, and in ASP.NET MVC I would use user controls as well as home made custom controls. So what Java frameworks excel in this? My own superficial research seems to conclude that JSF supports some kind of custom controls (Bear in mind i am not only talking about layout reuse, but also behavior reuse, so if for example the customer / client wants a customer list on page x and not only on page Y, he would simply put in a <jr:CustomerList runat="server" .... /> (fictional example with ASP.NET Webforms syntax)).

    Read the article

  • How to Access value of dynamically created control?

    - by sharad
    i have asp.net web application in which i need to create form dynamically depend upon table which user selected.however,i created form dynamically with it's control like text box,drop downlist etc. but not able to access those controls at particular button click event. My form scenario is like this: i have dropdownlist in which i display list of tables,button control say display( on click event which i redirect page with some addition in querystring so that at page init it dynamically genrate controls) and another button control which used to access this controls value say Submit and store in database. This is my code: At Display button Click event: Response.Redirect("dynamic_main.aspx?mode=edit&tablename=" + CMBTableList.SelectedItem.ToString()); This is code For page.Init level if (Request.QueryString["mode"] != null) { if (Request.QueryString["mode"].ToString() == "edit") { Session["tablename"] = Request.QueryString["tablename"].ToString(); // if (Session["tablename"].ToString() == CMBTableList.SelectedItem.ToString()) //{ createcontrol(Session["tablename"].ToString()); // } } } i have used createcontrol() which genrate controls Code For Submit Button: string[] contid=controlid.Value.Split(','); MasterPage ctl00 = FindControl("ctl00") as MasterPage; ContentPlaceHolder cplacehld = ctl00.FindControl("ContentPlaceHolder2") as ContentPlaceHolder; Panel panel1 = cplacehld.FindControl("plnall") as Panel; Table tabl1 = panel1.FindControl("id1") as Table; foreach (string sin in contid) { string splitcvalu = sin.Split('_')[0].ToString(); ControlsAccess contaccess = new ControlsAccess(); if (splitcvalu.ToString() == "txt") { TextBox txt = (TextBox)tabl1.FindControl(sin.ToString()); //TextBox txt = cplacehld.FindControl(sin.ToString()) as TextBox; val = txt.ID; } else { DropDownList DDL = cplacehld.FindControl(sin.ToString()) as DropDownList; } } Here i am no able to access this textbox or drop downlist.i am getting id of particular control from hidden field controlid in which i have stored it during genrating controls. i have used findcontrol() it works in case of finding masterpage,contentplaceholder,table etc. but in case of textbox or other control it doesnt work it shows it returns null. Anyone can help me. Thanks

    Read the article

  • WinForms - Localization - UI controls positions different in additional Culture

    - by binball
    Hi, I did my UI settings.Original language is English. After that I set Localizable property to True. Copied original resx file to frmMain.de-De.resx (for example). Translated all strings. Everything works. But now I would like to change positions of controls. After that changes are visible only for original/primary Culture (En). When I change Culture to de-De then UI controls are on the "old positions"(?!) Is this normal behaviour? :O I'm unable to change controls positions on my form after localization? Can someone explain me this and give some best solution. I really have to change UI design but I don't want to manual copy all translated strings again. If my description is not clear then I can post source code, just please let me know. I use VS 2008. Greetz!

    Read the article

  • Add controls dynamically on button click in asp.net mvc

    - by Ashwani K
    Hello All: I am creating an asp.net MVC application in which I want to provide a functionality to add a controls dynamically. I have a form in which there are 2 text boxes for First Name and Last name which serve as a single control. Now an user can add any number of this group of controls. I am able to add these controls on the page using java script. But I do not know how to access the values of these control when the user submits. Please help in this or suggest another approach Thanks

    Read the article

  • auto-scaling size with anchors - overlapping controls

    - by Shane.C
    I'm having some trouble with resizing and scaling of controls in a windows form. I've set anchors up so that the controls stay in ratio with the form, which works great. However, perhaps i was expecting too much when i thought that the control origin points would also scale and change with the form scaling, but this is not the case and i'm finding my controls overlapping. here's some screenshots; anyone know of an approach i can take to solve this problem? perhaps i need to set control origins to dynamic drawing points that scale, but then do these redraw on scaling the form, or only on creation?

    Read the article

  • Create method to handle multiple types of controls

    - by Praesagus
    I am trying to create a method that accepts multiple types of controls - in this case Labels and Panels. The conversion does not work because IConvertible doesn't convert these Types. Any help would be so appreciated. Thanks in advance public void LocationsLink<C>(C control) { if (control != null) { WebControl ctl = (WebControl)Convert.ChangeType(control, typeof(WebControl)); Literal txt = new Literal(); HyperLink lnk = new HyperLink(); txt.Text = "If you prefer a map to the nearest facility please "; lnk.Text = "click here"; lnk.NavigateUrl = "/content/Locations.aspx"; ctl.Controls.Add(txt); ctl.Controls.Add(lnk); } }

    Read the article

  • User controls do not properly fit on the screen

    - by Royson
    Hi, My application has several controls. Like in one screen has TreeView on left side, GridView with paging in the middle and 4 buttons at right side. The controls properly appear when the form is in a maximized state, but if I minimize it the controls do not properly fit on the screen. I tried with different different tricks like table layout.. in dat I added a panel, etc... But I could not solve the problem. How can I create such type of screens which fits independently of size of my window? Thanks

    Read the article

  • Code for adding Content Controls Word 2007 C#

    - by AProgrammer
    Hey all, I was wondering if anyone has any idea how I can add Content Controls to a Word Document (Office 2007) from the Document Task/Action Pane via C#. The goal is the following: I want to have categorized information in the Task/Action Pane and have the user fill out the info there. Once they have filled out that information they'll click on a button and it will insert content Controls into the Word Document that has that Data. The reason I want to use Content Controls is because the data will be bound to a database. Is this possible? I would like links that do this without WordProcessingML or OpenXML. There has to be a way to do this via server side code and such that doesn't require long blocks of ,, etc. Thanks!

    Read the article

  • Accessing controls defined inside DataRepeater within Page_Load

    - by xander
    I have a series of controls, 3 of which I need to disable. protected void AddToCart_Click(object sender, CommandEventArgs e) { //some other code... LinkButton ctrl = (LinkButton)sender; RepeaterItem rpItem = ctrl.NamingContainer as RepeaterItem; if (rpItem != null) { LinkButton btn = (LinkButton)rpItem.FindControl("btnRemoveFromCart"); btn.Visible = true; btn = (LinkButton)rpItem.FindControl("btnAddToCart"); btn.Visible = false; Image img = (Image)rpItem.FindControl("imgAdded"); img.Visible = true; } I want to access the DataRepeater and get to the controls to disable them. Only on Page_Load. protected void Page_Load(object sender, EventArgs e) { string galleryID = Session["selectedGalleryID"].ToString(); getItems(); if (!IsPostBack) { h1GalleryTitle.InnerText = Session["selectedGalleryName"].ToString(); //the code will go here to initially disable the controls that need to be disabled... } }

    Read the article

  • Unit testing custom controls in Silverlight

    - by Hrvoje
    I have several custom controls (some kind of frames for content and layout management, like wrap panel), and would like to write unit tests for them. It's hard to find any good examples except Silverlight control toolkit, which has some helper classes to do unit tests and it's quite complicated. For MVVM classes it's easy to write tests because they don't use SL dependency system and infrastructure. Questions: how to unit test DepedenyProperty, what do I need to test how to test attached property do I test bindings with theme or UserControl, like simple textblock content binding, or command/event binding in MVVM with UserControl what else do I test in my custom controls, beside my business logic any good tutorial to achieve tests like those in control toolkit How do I start? Is SL controls toolkit only option for learning? For testing framework i'm using one from control toolkit, and for continuus integration on TFS build server I planned to use Statlight (from codeplex). Any advice on that?

    Read the article

  • ASP.NET validation controls

    - by mehmet6parmak
    Hi All, I want to use Validation Controls but I dont want them to show their Error Messages when invalid data exist. Instead I'm going to iterate through the validation controls and show error messages inside my little ErrorMessage Control for (int i = 0; i < Page.Validators.Count; i++) { if (!Page.Validators[i].IsValid) { divAlert.InnerText = Page.Validators[i].ErrorMessage; return false; } } I'm doing this because i have little space to show the error message. You can ask why are you using validation control if you dont want to show them My asnwer is "I use them for validation logic they handle" I looked the properties of the validation controls and cant find something that wil help me doing this. Any Idea? Thanks

    Read the article

  • ASP.NET Controls Not Recognized

    - by Liam
    I just installed the release version of Visual Studio 2010, and it looks like there's something wrong with the standard ASP.NET server controls. When I create a basic server control, such as a TextBox, the editor underlines it in green and says (I also get no intellisense for ASP.NET controls): Element 'TextBox' is not a known element. This can occur if there is a compilation error in the Web site, or the Web.config file is missing. The web site builds fine, and the Web.config file is not missing: <?xml version="1.0"?> <configuration> <system.web> <compilation debug="false" targetFramework="4.0" /> </system.web> </configuration> The controls work just fine in the code-behind, and they function correctly when I run the site. Is there some configuration problem here?

    Read the article

  • How to fix the flickering in User controls.

    - by Royson
    In my application i am constantly moving from one control to another. I have created no. of user controls, but during navigation my controls gets flicker. it takes 1 or 2 sec to update. I tried to set this SetStyle(ControlStyles.OptimizedDoubleBuffer, true); or SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); but it didn't help... Each control has same background image with different controls. So what is the solution for it.. Thanks.

    Read the article

  • C Builder TForm not allocated or created properly all its controls

    - by ergey
    Hi, I would know how i can check that all the controls on the form is created and initialized. I have form i am showing when user presses the 'update' button. It have only TProgressBar control. The handle is not NULL for this control and at random stages it can or can't set the Position/Max values. When i set TProgressBar-Max value to some integer it remains 0 after. So the question is: 1) How to really create the form and all controls on it (i am currently using just Form-Show() method, which as i can check calls the constructor) 2) How to check that all controls on the form is created and PAINTED (showed) Thanks

    Read the article

  • Problem with layout of control when dynamically creating winform and controls for the Form

    - by Ashwani Roy
    I get this response from a web service call. Something like this <Response> <Control1 type = "DropdownList" value= "USA,UK,Sweden,UAE"/> <Control2 type = "Textbox" value= "Contries"/> <Control3 type = "Button" value= "None"> </Response> Based on this I de-serialize it into List<Controls>. Now I need to be able to dynamically create a winform based on these controls. My problem is the layout. I want to be able to create them nicely separated (If possible vertically aligned) in batches of lets say 5.So If I need 15 controls I have 3 columns and 5 rows. What would be best way to achieve this? I know that I can use the inbuilt positioning properties like top, width etc., but maybe someone out there has done something similar in a better way.

    Read the article

  • should i lisense 3rd party controls?

    - by jhon
    some of you will say that this post is not programming related, i think it is! i developed a WebApplication that uses several 3rd party controls using asp.net (c#). i did not buy any license for the 3rd party controls that i am using because i am a freelancer and the controls are too much expensive for me to buy. i already sold the application to several mini-companies that don't care about the license issue. so my question: is it possible that i get sued or caught because of this crime? if yes, then how can they know who am i?

    Read the article

  • Should I license 3rd party controls?

    - by jhon
    some of you will say that this post is not programming related, i think it is! i developed a WebApplication that uses several 3rd party controls using asp.net (c#). i did not buy any license for the 3rd party controls that i am using because i am a freelancer and the controls are too much expensive for me to buy. i already sold the application to several mini-companies that don't care about the license issue. so my question: is it possible that i get sued or caught because of this crime? if yes, then how can they know who am i?

    Read the article

  • Accessing controls created dynamically (c#)

    - by Aliens
    In my code behind (c#) I dynamically created some RadioButtonLists with more RadioButtons in each of them. I put all controls to a specific Panel. What I need to know is how to access those controls later as they are not created in .aspx file (with drag and drop from toolbox)? I tried this: foreach (Control child in panel.Controls) { Response.Write("test1"); if (child.GetType().ToString().Equals("System.Web.UI.WebControls.RadioButtonList")) { RadioButtonList r = (RadioButtonList)child; Response.Write("test2"); } } "test1" and "test2" dont show up in my page. That means something is wrong with this logic. Any suggestions what could I do?

    Read the article

  • Brightness controls not adjusting the brightness in ubuntu 10.10 64 bit on hp dm3t notebook

    - by user26768
    I picked up an hp dm3t laptop with intel HD graphics and installed ubuntu 10.10 64 bit on it. It works great -- the only problem is that the brightness controls don't work. The brightness is always at full. When I try to adjust it down, the indicator graphic indicates that it's going down but the actual brightness doesn't change. Is there anything that I can try to make this work? I'd really appreciate any help.

    Read the article

  • Best Silverlight Controls

    - by rip
    Who’s provides the best 3rd party Silverlight controls for LOB applications? In the past I’ve used Infragistics for WinForm controls which were very good and they also provide good support. However seem to be a bit behind the likes of Telerik in the Silverlight space? I’ve also noticed the Silverlight toolkit as well – are these as robust as Telerik’s? I'd be grateful if anyone could share any opinions or experiences that they may have.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >