[IWE] More C# questions - never mind

Barry Roomberg iwe@warhead.org.uk
Wed, 17 Jan 2007 17:23:42 -0500


		private void btnAddPages_Click(object sender, System.EventArgs e)
		{
			ArrayList ar = GetSelectedRows(dataGrid1);
		}

		public ArrayList GetSelectedRows(DataGrid dg)
		{
			ArrayList al = new ArrayList();
			CurrencyManager cm = (CurrencyManager)
				this.BindingContext[dg.DataSource, dg.DataMember];
			DataView dv = (DataView)cm.List;

			for(int i = 0; i < dv.Count; ++i)
			{
				if(dg.IsSelected(i))
					al.Add(i);
			}
			return al;
		}

On Wednesday 17 January 2007 3:53, Barry Roomberg wrote:
> And yes, this is within the Window Forms desktop environment.
>
> If I have a datagrid, and I have multiple rows highlit, how can I loop
> through the highlit rows and pull information from them?
>
> Thanks.
> _______________________________________________
> IWE mailing list
> IWE@warhead.org.uk
> http://lists.warhead.org.uk/mailman/listinfo/iwe