Hi telerik,
Hopefully this one is easy...
I have a rad grid with following columns: Supplier, ProductName, Product Description. These columns constitute an entity called line item.
On edit/insert I am using inline mode. Now, when in edit/insert mode users are able to search for supplier by supplier name or for a product by product name (I have a search icon next to each entry fields in edit/insert mode which will open a pop-up). Once, values are selected for these fields I also need to store IDs for them behind the scene (for Supplier and for Product),
so for example my OnInsertCommand would look like this:
protected void RadGrid1_OnInsertCommand(object source, GridCommandEventArgs e)
{
GridEditableItem item = null;
string supplierID = String.Empty;
string productID = string.Empty;
item = this.RadGrid1.MasterTableView.GetInsertItem();
// Get supplier ID for and assign to supplierID variable
.................
// Get product ID and assign to productID variable
//Create new LIne Item
LineItem llineItem = new LineItem();
llineItem.GenerateALineItem(supplierID, productID, this.CurrentOrder.OrderID);
this.CurrentOrder.Order.LineItem.Add(llineItem.GetItem());
RadGrid1.MasterTableView.Rebind();
}
How and where can I store these supplierID, productID for edited/new records to retrieve them in these methods (OnInsertCommand
OnItemUpdated)
Hopefully this one is easy...
I have a rad grid with following columns: Supplier, ProductName, Product Description. These columns constitute an entity called line item.
On edit/insert I am using inline mode. Now, when in edit/insert mode users are able to search for supplier by supplier name or for a product by product name (I have a search icon next to each entry fields in edit/insert mode which will open a pop-up). Once, values are selected for these fields I also need to store IDs for them behind the scene (for Supplier and for Product),
so for example my OnInsertCommand would look like this:
protected void RadGrid1_OnInsertCommand(object source, GridCommandEventArgs e)
{
GridEditableItem item = null;
string supplierID = String.Empty;
string productID = string.Empty;
item = this.RadGrid1.MasterTableView.GetInsertItem();
// Get supplier ID for and assign to supplierID variable
.................
// Get product ID and assign to productID variable
//Create new LIne Item
LineItem llineItem = new LineItem();
llineItem.GenerateALineItem(supplierID, productID, this.CurrentOrder.OrderID);
this.CurrentOrder.Order.LineItem.Add(llineItem.GetItem());
RadGrid1.MasterTableView.Rebind();
}
How and where can I store these supplierID, productID for edited/new records to retrieve them in these methods (OnInsertCommand
OnItemUpdated)