Search Results

Search found 1863 results on 75 pages for 'populate'.

Page 9/75 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Instant Messenger: How does gtalk/yahoo messenger populate the contact list?

    - by Owen
    Hi All, We are currently working on a small IM project which pretty much works like gtalk and yahoo messenger. We came across a problem that puzzled us how gtalk/ym populate their contact lists. Given that the user has let's say more or less 500 contacts, both IMs seem to readily load the contacts pretty fast and already sorted. Here are my questions(referring to either): Does it cache its contacts, like saving it in a file somewhere upon exit so that upon log-in it readily extracts the contacts and displays it in its contact list? Does it always request for the VCARDS upon log in? OR they have a VCARD push or whatever that simply updates the contacts' profiles (like that of their status [presence push - available, busy, etc...] )?

    Read the article

  • How to detect popup of a sub-menu of a popup menu (and how to populate it dynamically)?

    - by Heinrich Ulbricht
    Hi everyone, I have a popup menu which contains several menu items and one of them can have child items. This entry has a little arrow on the right and when you hover your mouse over it, a sub-menu will open. Now I want to populate this sub-menu at runtime, but only if the user actually opens it. If the user never opens the sub-menu, it will be empty (maybe contain a placeholder). How could I accomplish this? Is it even possible to modify a popup-menu when it is already visible? Thanks for your help!

    Read the article

  • How does one pre-populate a Python Formish form?

    - by Jace
    How does one pre-populate a Formish form? The obvious method as per the documentation doesn't seem right. Using one of the provided examples: import formish, schemaish structure = schemaish.Structure() structure.add( 'a', schemaish.String() ) structure.add( 'b', schemaish.Integer() ) schema = schemaish.Structure() schema.add( 'myStruct', structure ) form = formish.Form(schema, 'form') If we pass this a valid request object: form.validate(request) The output is a structure like this: {'myStruct': {'a': 'value', 'b': 0 }} However, pre-populating the form using defaults requires this: form.defaults = {'myStruct.a': 'value', 'myStruct.b': 0} The dottedish package has a DottedDict object that can convert a nested dict to a dotted dict, but this asymmetry doesn't seem right. Is there a better way to do this?

    Read the article

  • How to populate gridview on button_click after searching from access database?

    - by Usman
    I am creating a form in c#.net . I want to populate the gridview only on button click with entries meeting search criteria. I have tried but on searching ID it works but on searching FirstName it gives error plz check SQL also. My Code behind private void button1_Click(object sender, EventArgs e) { try { string strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=L:/New project/Project/Project/Data.accdb"; string sql = "SELECT * FROM AddressBook WHERE FirstName='" + textBox1.Text.ToString(); OleDbConnection connection = new OleDbConnection(strConn); OleDbDataAdapter dataadapter = new OleDbDataAdapter(sql, connection); DataSet ds = new DataSet(); connection.Open(); dataadapter.Fill(ds, "AddressBook"); connection.Close(); dataGridView1.DataSource = ds; dataGridView1.DataMember = "AddressBook"; } catch (System.Exception err) { this.label27.Visible = true; this.label27.Text = err.Message.ToString(); } }

    Read the article

  • How does the VS XAML designer know what to auto-populate certain values with?

    - by Pwninstein
    <Button Name="MyButton" Content="Test" FontStyle="Italic" /> In the above XAML definition of a button, the FontStyle property is set to Italic. The designer is somehow able to populate a list for me to choose from when I hit the = sign. How is this achieved? Before you answer, consider that the FontStyle property is, appropriately enough, of type FontStyle (which is a struct). It's not an enumeration, which would be trivial for VS to list out at design time, so how are the valid list of options chosen to be displayed? There is also a completely separate FontStyles class which contains three static fields, Italic, Normal, and Oblique which just so happen to be the three items VS provides in the drop down list. Is there some mapping going on behind the scenes between the FontStyle struct and FontStyles class, because I've looked in many places in both the object browser and in .NET Reflector and couldn't determine anything from either. Thanks!! I NEED to know!* *Not really, but it would be nice to :)

    Read the article

  • populate a listbox from a.. function?

    - by andrew
    hello first of all i'm kinda new to C# I'm trying to do something like this in a C# winforms application when my app starts, a form starts minimized in the system tray. when i double click it, it opens and sends a request to a qpid broker for some info. then a message is sent back, and received in a listener in my app (i'm not sure code is relevant but i'll post it anyway) namespace MyApp { public class MyListener : IMessageListener { public void MessageTransfer(IMessage m) { //do stuff with m } } } what i'm trying to do is populate a listbox that's in that form with the message received in that function, but i have no idea how to communicate with that specific form from the MessageTransfer function

    Read the article

  • How to keep Varnish cached populate after backend down for an extended period?

    - by Nicholas Tolley Cottrell
    We have Varnish 3.0.2 running on Amazon's Linux and it works great. We have a ttl of 48 hours for most content pages and much longer for images, PDFs etc. This weekend we've taken the backend down for some maintenance, so I upped the ttl to 5 days earlier in the week. I had assumed that anything in cache would continue to be served for up to 5 days, but much to our disappointment we checked varnishstat this morning and the cache was almost completely empty and varnish was serving "page not found" messages. I know that this is not what Varnish is designed to do, but why would it reset its cache when the backend is down? And how can I prevent it for next time?

    Read the article

  • How do I populate multiple records of data into a PDF form like a mail-merge?

    - by user38801
    I have Acrobat Pro, and I have a PDF with a form on it. Assuming the fields in the form correspond to a data source (like rows in an RDBMS table or xml file), I want to then print multiple copies of the PDF file, with each copy having the values of a different row in the data source. It is preferable to directly interface with an actual database, rather than having to save an XML file every time I do this. If this involves programming that's cool too, I only posted here because the question didn't seem appropriate for StackOverflow. Thanks!

    Read the article

  • ILOG CPLEX: how to populate IloLPMatrix while using addGe to set up the model?

    - by downer
    I have a queatoin about IloLPMatrix and addGe. I was trying to follow the example of AdMIPex5.java to generate user defined cutting planes based on the solution to the LP relaxation. The difference is that eh initial MIP model is not read in from a mps file, but set up in the code using methods like addGe, addLe etc. I think this is why I ran into problems while copying the exampe to do the following. IloLPMatrix lp = (IloLPMatrix)cplex.LPMatrixIterator().next(); lp from the above line turns to be NULL. I am wondering 1. What is the relationship between IloLPMatrix and the addLe, addGe commands? I tried to addLPMatrix() to the model, and then used model.addGe methods. but the LPMatrix seems to be empty still. How do I populate the IloLPMatrix of the moel according to the value that I had set up using addGe and addLe. Is the a method to this easily, or do I have to set them up row by row myself? I was doing this to get the number of variables and their values by doing lp.getNumVars(). Is there other methods that I can use to get the number of variables and their values wihout doing these, since my system is set up by addLe, addGe etc? Thanks a lot for your help on this.

    Read the article

  • How do I populate these fields from existing data?

    - by dmanexe
    I'm not sure how to make a few parts of my form to populate from data from an array I'm passing from the database. First is this <select> object. The key estimate_lead_id in the database holds the value, and I want the dropdown to auto-select based on the value from the database. <select name="estimate_lead_id"> <? foreach($leads->result() as $lead) { ?> <option value="<?=$lead->id?>"><?=$lead->lead_name?></option> <? } ?> </select> Second (this is a little more complex), I have created a script that loops through and gets all of the items from each respective category. What I can't get it to do though is loop through these items and only display the items in the estimate, and then fill the fields with the respective values from the database. <?php foreach ($items['items_poolconcretedecking']->result() as $item) { ?> <input type="checkbox" name="measure[<?=$item->id?>][checkmark]" value="<?=$item->id?>"> <input class="item_mult" value="" type="text" name="measure[<?=$item->id?>][quantity]" /> <?php } ?>

    Read the article

  • How to populate data from .txt file into Excel in VBA?

    - by swei
    I'm trying to create something to read data from a .txt file, then populate data into .xls, but after open the .txt file, how do I get the data out? Basically I'm trying to get the the third column of the lines dated '04/06/2010'. After I open the .txt file, when I use ActiveSheet.Cells(row, col), the ActiveSheet is not pointing to .txt file. My .txt file is like this (space delimited): 04/05/10 23 29226 04/05/10 24 26942 04/06/10 1 23166 04/06/10 2 22072 04/06/10 3 21583 04/06/10 4 21390 Here is the code I have: Dim BidDate As Date BidDate = '4/6/2010' Workbooks.OpenText Filename:=ForecastFile, StartRow:=1, DataType:=xlDelimited, Space:=True If Err.Number = 1004 Then MsgBox ("The forecast file " & ForecastFile & " was not found.") Exit Sub End If On Error GoTo 0 Dim row As Integer, col As Integer row = 1 col = 1 cell_value = activeSheet.Cells(row, col) MsgBox ("the cell_value=" & cell_value) Do While (cell_value <> BidDate) And (cell_value <> "") row = row + 1 cell_value = activeSheet.Cells(row, col) ' MsgBox ("the value is " & cell_value) Loop If cell_value = "" Then MsgBox ("A load forecast for " & BidDate & " was not found in your current load forecast file titled '" + ForecastFile + ". " + "Make sure you have a load forecast for the current bid date and then open this spreadsheet again.") ActiveWindow.Close Exit Sub End If Can anyone point out where it goes wrong here?

    Read the article

  • Design PDF template and populate data at runtime using java,xml etc..

    - by Samant
    well i have been looking for a java based PDF solutions...we dont have a clean way i guess-still.. all solutions are primitive and kind of workarounds... No easy solution for this requirement - 1. Designing a PDF template using a IDE (eg. Livecycle designer ..which is not free) 2. Then at runtime using java, populate data into this PDF template...either using xml or other datasources... such a simple requirement and NONE has a good "open-source and free" solution yet ! Is anyone aware of any ? I have been searching for since 3-4 years now..for a clean way out... Eclipse BIRT comes close.. but does not handle Barcode elements ..OOB. Jasper - ireport is also good but that tool does not have a table concept and is kind of annoying ! Also barcode support is not good. XSL-FO has not free IDE for design . Looking for a better answer .. got one ?

    Read the article

  • How do I populate a MEF plugin with data that is not hard coded into the assembly?

    - by hjoelr
    I am working on a program that will communicate with various pieces of hardware. Because of the varied nature of the items it communicates and controls, I need to have a different "driver" for each different piece of hardware. This made me think that MEF would be a great way to make those drivers as plugins that can be added even after the product has been released. I've looked at a lot of examples of how to use MEF, but the question that I haven't been able to find an answer to is how to populate a MEF plugin with external data (eg. from a database). All the examples I can find have the "data" hard-coded into the assembly, like the following example: [Export( typeof( IRule ) )] public class RuleInstance : IRule { public void DoIt() {} public string Name { get { return "Rule Instance 3"; } } public string Version { get { return "1.1.0.0"; } } public string Description { get { return "Some Rule Instance"; } } } What if I want Name, Version and Description to come from a database? How would I tell MEF where to get that information? I may be missing something very obvious, but I don't know what it is. Thanks! Joel

    Read the article

  • How to fetch and populate backbone model for Google Places JS API?

    - by code-gijoe
    I'm implementing a system that require access to Google Places JS API. I've been using rails for most of the project, but now I want to inject a bit of AJAX in one of my views. Basically it is a view that displays places near your location. For this, I'm using the JS API of Google places. A quick workflow would be: 1- The user inputs a text query and hits enter. 2- There is an AJAX call to request data from Google Places API. 3- The successful result is presented to the user. The problem is primarily in step 2. I want to use backbone for this but when I create a backbone model, it requests to the 'rootURL'. This wouldn't be a problem if the requests to Places was done from the server but it is not. A place call is done like this: service = new google.maps.places.PlacesService(map); service.nearbySearch(request, callback); Passing a callback function: function callback(results, status) { if (status == google.maps.places.PlacesServiceStatus.OK) { for (var i = 0; i < results.length; i++) { var place = results[i]; createMarker(results[i]); } } } Is it possible to override the 'fetch' method in backbone model and populate the model with the successful Places result? Is this a bad idea?

    Read the article

  • Populate a column as a result of performing math on two columns in a jqGrid.

    - by HacksawOnRye
    Background: Our company selected a workflow tool that has some "interersting" UI restrictions. jqGrid has been identified as one of best ways to overcome these restrictions. Consequently, the answers to this question need to be restricted to functionlity available within the jqGrid space. It pains me to pose this question and I know you will tempted to go down a million other paths - most that we have already traveled before. :( Question: Can jqGrid populate a column as a result of performing math on two other columns. The source of those two columns is in our control so we can "guarantee" that numeric data will be returned. Also, the result is something that we simplay want to display on demand but not store yet. On the example below, is there a function that allow the 'total' column to be populated from the following calculation: 'amount' * 'tax' Example jqGrid javascript: jQuery("#list3").jqGrid({ url:'server.php?q=2', datatype: "json", colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'], colModel:[ {name:'id',index:'id', width:60, sorttype:"int"}, {name:'invdate',index:'invdate', width:90, sorttype:"date"}, {name:'name',index:'name', width:100}, {name:'amount',index:'amount', width:80, align:"right",sorttype:"float"}, {name:'tax',index:'tax', width:80, align:"right",sorttype:"float"}, {name:'total',index:'total', width:80,align:"right",sorttype:"float"}, {name:'note',index:'note', width:150, sortable:false} ], rowNum:20, rowList:[10,20,30], pager: '#pager3', sortname: 'id', viewrecords: true, sortorder: "desc", loadonce: true, caption: "Load Once Example" });

    Read the article

  • How to populate a listview in ASP.NET 3.5 through a dataset?

    - by EasyDot
    Is it possible to populate a listview with a dataset? I have a function that returns a dataset. Why im asking this is because my SQL is quite complicated and i can't convert it to a SQLDataSource... Public Function getMessages() As DataSet Dim dSet As DataSet = New DataSet Dim da As SqlDataAdapter Dim cmd As SqlCommand Dim SQL As StringBuilder Dim connStr As StringBuilder = New StringBuilder("") connStr.AppendFormat("server={0};", ConfigurationSettings.AppSettings("USERserver").ToString()) connStr.AppendFormat("database={0};", ConfigurationSettings.AppSettings("USERdb").ToString()) connStr.AppendFormat("uid={0};", ConfigurationSettings.AppSettings("USERuid").ToString()) connStr.AppendFormat("pwd={0};", ConfigurationSettings.AppSettings("USERpwd").ToString()) Dim conn As SqlConnection = New SqlConnection(connStr.ToString()) Try SQL = New StringBuilder cmd = New SqlCommand SQL.Append("SELECT m.MESSAGE_ID, m.SYSTEM_ID, m.DATE_CREATED, m.EXPIRE_DATE, ISNULL(s.SYSTEM_DESC,'ALL SYSTEMS') AS SYSTEM_DESC, m.MESSAGE ") SQL.Append("FROM MESSAGE m ") SQL.Append("LEFT OUTER JOIN [SYSTEM] s ") SQL.Append("ON m.SYSTEM_ID = s.SYSTEM_ID ") SQL.AppendFormat("WHERE m.SYSTEM_ID IN ({0}) ", sSystems) SQL.Append("OR m.SYSTEM_ID is NULL ") SQL.Append("ORDER BY m.DATE_CREATED DESC; ") SQL.Append("SELECT mm.MESSAGE_ID, mm.MODEL_ID, m.MODEL_DESC ") SQL.Append("FROM MESSAGE_MODEL mm ") SQL.Append("JOIN MODEL m ") SQL.Append(" ON m.MODEL_ID = mm.MODEL_ID ") cmd.CommandText = SQL.ToString cmd.Connection = conn da = New SqlDataAdapter(cmd) da.Fill(dSet) dSet.Tables(0).TableName = "BASE" dSet.Tables(1).TableName = "MODEL" Return dSet Catch ev As Exception cLog.EventLog.logError(ev, cmd) Finally 'conn.Close() End Try End Function

    Read the article

  • How to populate a dropdownlist with json data in jquery?

    - by Pandiya Chendur
    I am developing a country state cascading dropdown list... I returned json result based on countryId but i dont know how to populate/fill it in a new dropdown listbox... Here is what i am using, function getstate(countryId) { $.ajax({ type: "POST", url: "Reg_Form.aspx/Getstates", data: "{'countryId':" + (countryId) + "}", contentType: "application/json; charset=utf-8", global: false, async: false, dataType: "json", success: function(jsonObj) { alert(jsonObj.d); } }); return false; } And alert gave this, {"Table" : [{"stateid" : "2","statename" : "Tamilnadu"}, {"stateid" : "3","statename" : "Karnataka"}, {"stateid" : "4","statename" : "Andaman and Nicobar"}, {"stateid" : "5","statename" : "Andhra Pradesh"}, {"stateid" : "6","statename" : "Arunachal Pradesh"}]} And my aspx page has this is, <td> <asp:DropDownList ID="DLCountry" runat="server" CssClass="dropDownListSkin" onchange="return getstate(this.value);"> </asp:DropDownList> </td> <td> <asp:DropDownList ID="DLState" runat="server" CssClass="dropDownListSkin"> </asp:DropDownList> </td> Any suggestion how to fill it DLState dropdown...

    Read the article

  • Easier way to populate form data and validation data in Code Igniter?

    - by John
    I'm new to code igniter. I'm following the form validation tutorial found at: http://www.codeignitor.com/user_guide/libraries/validation.html I find I am typing too much in the view to get the form to re-populate. For example, here's what one of my INPUT fields look like: <input type="text" name="email" value="<?=$this->validation->email ? $this->validation->email : $array_db_values['email'] ?>" /> Basically, when the form first loads, it should show a value from the database. If the user alters the value and it fails validation, then the form should post the erroneously submitted value. Does code igniter have a "cleaner" way of rendering this kind of output? Otherwise, I'm going to do something like this in my controller: $array_db_values = getdbresults(); if($_POST['submit']) foreach($_POST as $key=>$val) $array_db_values[$key] = $val; That way, if postback data exists, it will always override database values. Then input fields in my view can simply be: <input type="text" name="email" value="<?=$array_db_values['email'] ?>" /> Is there a better/native CI way to handle this scenario?

    Read the article

  • How do I create and populate a non-uniformly structured array in PHP?

    - by stormist
    I am trying to decide on a data structure for an array that has a date for the key and the amount of bandwidth consumed as values. examples Key Consumed Policy October 50 Basic November 75 Basic December 100 Basic Some months, but not all, will have more than one policy. In that case, I need break them down by policy once the total is shown. So for the above example, assume December had 3 policies. The table i construct from my array would then need to show: Key Consumed Policy October 50 Basic November 75 Basic December 100 .. December 25 Basic December 25 Extended December 50 Premium Could all this data be represented in an array ? $myArray['december'] would be a different data structure than the others because it would need a last entry, probably another array, that had the policy names as keys and the amount of data consumed as values. Does PHP allow for arrays that are not structured uniformly? i.e. key october and November have only 2 entries under their key while December has 2 entries plus a 3rd which is an additional array. My best guess is something like: Array ( [October] => "50", "Basic" [November] => "75", "Basic" [December] => "100", "..", Array( [Basic] => 25 [Extended] =>25 [Premium] => 50 ) ) My question is if this is possible and how to declare it and populate it with values with PHP. Thanks in advance for any clarifications or assistance!

    Read the article

  • How to populate the span tags between specific tags.

    - by Rachel
    I want to populate span tags for all text nodes between the self closing tags s1 and s2 having the same id.If the transformation of the input to the output form requires the list of ids of the s1 , s2 tag pairs say 1, 2 etc i can assume that it is in place in any form if required.The input can have any structure and not exactly the same as seen in the sample input. It can have any number of s1, s2 tag pairs but each pair will have a unique id. Hope i am clear. How can this be achieved using XSL? Input: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>This is my title</title> </head> <body> <h1 align="center">This <s1 id="1" />is my <s2 id="1" />heading</h1> <p> Sample content <s1 id="2" />Some text here. Some content here. </p> <p> Here you <s2 id="2" />go. </p> </body> </html> Desired output: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>This is my title</title> </head> <body> <h1 align="center">This <span id="1">is my </span>heading</h1> <p> Sample content <span id="2">Some text here. Some content here.</span> </p> <p> <span id="2">Here you </span>go. </p> </body> </html>

    Read the article

  • How to populate the span tags for all text nodes between specific self closing tags.

    - by Rachel
    I want to populate span tags for all text nodes between the self closing tags s1 and s2 having the same id. Eg. For the input: <a> <b>Some <s1 id="1" />text here</b> <c>Some <s2 id="1"/>more text <s1 id="2"/> here<c/> <d>More data</d> <e>Some <s2 id="2" />more data</e> </a> In the above input i want to enclose every text node between <s1 id="1"/> and <s2 id="1" /> with span tags. Also all the text node between <s1 id="2" /> and <s2 id="2" /> Expected Output: <a> <b>Some <span class="spanClass" id="1a">text here</span></b> <c><span class="spanClass" id="1b">Some </span>more text <span class="spanClass" id="2a"> here</span></c> <d><span class="spanClass" id="2b">More data</span></d> <e><span class="spanClass" id="2c">Some </span>more data</e> </a> I am not concened about the pattern of the id tag populated for the span as along it is unique. If the transformation of the input to the output form requires the list of ids of the s1 , s2 tag pairs say 1, 2 etc i can assume that it in place in any form if required. Hope i am clear. How can this be achieved using XSL? EDIT: The input can have any structure and not exactly the same as seen in the sample input. It can have any number of s1, s2 tag pairs but each pair will have a unique id.Adding another sample input and output pattern for more information. Input: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>This is my title</title> </head> <body> <h1 align="center">This <s1 id="1" />is my <s2 id="1" />heading</h1> <p> Sample content <s1 id="2" />Some text here. Some content here. </p> <p> Here you <s2 id="2" />go. </p> </body> </html> Desired output: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>This is my title</title> </head> <body> <h1 align="center">This <span id="1">is my </span>heading</h1> <p> Sample content <span id="2">Some text here. Some content here.</span> </p> <p> <span id="2">Here you </span>go. </p> </body> </html>

    Read the article

  • ASP.NET treeview populate child nodes. How can I avoid a postback to server?

    - by mas_oz2k1
    I am trying to test populate on demand for a treeview. I follow the procedure from these links: http://msdn.microsoft.com/en-us/library/e8z5184w.aspx But the treeview still make a postback to the server if I expanded one of the tree nodes (If you put a breakpoint in the first line of Page_load event), thus refreshing the whole page. I am using VS2005 and Asp.net 2.0 (but the same issue occurs in VS2008) My simple test page markup is: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="aspTreeview.aspx.cs" Inherits="aspTreeview" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <table> <tr> <td style="height: 80%; width: 45%;"> <asp:Panel ID="Panel1" runat="server" BorderColor="#0033CC" BorderStyle="Solid" ScrollBars="Both"> <asp:TreeView ID="TreeView1" runat="server" ShowLines="True" PopulateNodesFromClient="True" EnableClientScript="True" NodeWrap="True" ontreenodepopulate="TreeView1_TreeNodePopulate" ExpandDepth="0"> </asp:TreeView> </asp:Panel> </td> <td style="width: 10%; height: 80%;" > <div> <asp:Button ID="Button1" runat="server" Text="->" onclick="Button1_Click" /> </div> <div> <asp:Button ID="Button2" runat="server" Text="<-" /> </div> </td> <td style="width: 136px; height: 80%"> <asp:Panel ID="Panel2" runat="server" BorderColor="Lime" BorderStyle="Solid"> <asp:TreeView ID="TreeView2" runat="server" ShowLines="True" ExpandDepth="0"> </asp:TreeView> </asp:Panel> </td> </tr> <tr> <td> </td> <td> </td> <td style="width: 136px"> </td> </tr> </table> </div> </form> </body> </html> The code behind is: protected void Page_Load(object sender, EventArgs e) { Debug.WriteLine("Page_Load started."); if (!IsPostBack) { if (Request.Browser.SupportsCallback) Debug.WriteLine("Browser supports callback scripts."); for (int i = 0; i < 3; i++) { TreeNode node = new TreeNode("ENTRY " + i.ToString()); node.Value = i.ToString(); node.PopulateOnDemand = true; node.Expanded = false; TreeView1.Nodes.Add(node); } } Debug.WriteLine("Page_Load finished."); } protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e) { TreeNode targetNode = e.Node; for (int j = 0; j < 4200; j++) { TreeNode subnode = new TreeNode(String.Format("Sub ENTRY {0} {1}", targetNode.Value, j)); subnode.PopulateOnDemand = true; subnode.Expanded = false; targetNode.ChildNodes.Add(subnode); } }

    Read the article

  • Populate a combo box with one data tabel and save the choice in another.

    - by Scott Chamberlain
    I have two data tables in a data set for example lets say Servers: | Server | Ip | Users: | Username | Password | Server | and there is a foreign key on users that points to servers. How do I make a combo box that list all of the servers. Then how do I make the selected server in that combo box be saved in the data set in the Server column of the users table. EDIT -- I havent tested it yet but is this the right way? this.bsServers.DataMember = "Servers"; this.bsServers.DataSource = this.dataSet; this.bsUsers.DataMember = "FK_Users_Servers"; this.bsUsers.DataSource = this.bsServers; this.serverComboBox.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsUsers, "Server", true)); this.serverComboBox.DataSource = this.bsServers; this.serverComboBox.DisplayMember = "Server"; this.serverComboBox.ValueMember = "Server";

    Read the article

  • I'm trying to populate a MySQL table with some data, but, mysqli won't let me insert every 10th stat

    - by Tunji Gbadamosi
    I want to initialise a 'ticket' table with some ticket IDs. To do this, I want to insert 120 ticket IDs into the table. However, at every 10th statement, MySQL tells me that the ID already exists and thus won't let me insert it. Here's my code: //make a query $insert_ticket_query = "INSERT INTO ticket (id) VALUES (?)"; $insert_ticket_stmt = $mysqli->stmt_init(); $insert_ticket_stmt->prepare($insert_ticket_query); $insert_ticket_stmt->bind_param('s', $ticket_id); $mysqli->autocommit(FALSE); //start transaction for($i=0;$i<NO_GUESTS;$i++){ $id = generate_id($i); $ticket_id = format_id($id, $prefix['ticket'], $suffix['ticket']); $t_id = $ticket_id; //echo '<p>'.$ticket_id.'</p>'; //$result = $mysqli->query("SELECT * FROM ticket WHERE id='".$ticket_id."'"); //$row_count = $result->num_rows; if(($result = $mysqli->query("SELECT * FROM ticket WHERE id='".$t_id."'")) == FALSE){ $result->close(); if($insert_ticket_stmt->execute()){ $mysqli->commit(); echo "<p>".$t_id."added to the ticket table!</p>"; } else{ $mysqli->rollback(); echo "problem inserting'".$t_id."' to the ticket table"; } } else{ echo "<p>".$t_id."already exists, so not adding it!</p>"; $result->close(); } } $mysqli->autocommit(TRUE); $insert_ticket_stmt->close(); ?>

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >