Skip to content

Instantly share code, notes, and snippets.

@follesoe
Created December 24, 2010 15:05
Show Gist options
  • Save follesoe/754320 to your computer and use it in GitHub Desktop.
Save follesoe/754320 to your computer and use it in GitHub Desktop.
Bridging windows and web applications using JSON
function SelectItem(orderID)
{
window.external.SelectItem(orderID);
}
public void SelectItem(string orderID)
{
int id = Convert.ToInt32(orderID);
foreach (ListViewItem li in listOrders.Items)
{
if (((Order)li.Tag).OrderID == id)
{
li.Font = new Font(li.Font, FontStyle.Bold);
li.BackColor = Color.Maroon;
li.ForeColor = Color.White;
li.Checked = true;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment