>>I just was told that I have to do multi selects in a WIN sales form where I can pick a few items out of inventory. Think of a package sale where your getting 5 items for a set price that is defined at the checkout station and probably won't be duplicated ever again.
>>
>>In my mind I'd like to have a textbox display the chosen items as they are Ctrl + clicked so the user can see items that are out of sight on the grid.
>>
>>How do a catch that event?
>
>We have added a SelectedRowCountChanged event to mmDataGrid so you can create a handler for this event.
>
>Regards,
Unfortunatly it's mislabeled. It's not the SelectedRowCount, it should be the TouchedRowCount.
My code:
//Display what is multi selected
if (this.mmDataGrid1.SelectedRows.Count >1)
{
// array to hold my part # for display
int[] a = new int[ this.mmDataGrid1.SelectedRows.Count];
int rn =0;
// strings for filling that are passed back for display to user
string box = "", comm ="";
// grab the data
for (int i =0 ; i < mmDataGrid1.SelectedRows.Count; i++)
{
rn = Convert.ToUInt16(mmDataGrid1.SelectedRows[i].ToString());
a[i] = Convert.ToUInt16(this.dsMerch.Tables[0].Rows[rn]["GMAsset"].ToString());
box = box + comm +this.dsMerch.Tables[0].Rows[rn]["GMAsset"].ToString();
if (i ==0)
{
comm = ", ";
}
}
this.mmTextBox1.Text= box;
this.mmTextBox1.Refresh();
}
here is an image showing a few pieces of inventory with only one selected but my display box shows 3 records that were touched.
http://www.lotmate.com/images/amult.JPGAny ideas?