Hi, I am working on a program that uses queries that are hard coded into the program. Within the program, I have pages (radpageview) and then grids on the pages. Then each grid is programmed to load in data from the queries.
I am running into trouble because my grids are based on the first grid... I have this hard coded into the SQL Query and it will look at a specific cell value to then run the query with that in the where statement.
I need a cell value that is in the template, but I am having no luck.
As you can see below, I can get the cells from my main grid... but not from the template.
Example to explain...
I set this: selectedOrder = grdCustPOListing.CurrentRow.Cells["Order Num"].Value.ToString();
So that selectedOrder can now be used in my query:
"Select RMAH.RMANum as [RMA], RMAH.RMADate as [RMA Date], RMAD.RMALine as [RMA Line], RMAD.RefInvoiceLine as [Invoice], " +"RMAD.OrderNum as [Order], RMAD.OrderLine as [Order Line], RMAD.ReturnReasonCode as [Reason], RMAD.Note, RMAD.PartNum as [Part], RMAD.LineDesc as [Description], RMAD.ReturnQty as [Quantity] " +
"from erp.RMAHead RMAH with (nolock) " +
"inner join erp.RMADtl RMAD with(nolock) on RMAH.Company = RMAD.Company and RMAH.RMANum = RMAD.RMANum " +
"inner join erp.Customer C with(nolock) on RMAH.Company = C.Company and RMAH.CustNum = C.CustNum " +
"where RMAH.OpenRMA = 1 and RMAD.OrderNum like '%" + selectedOrder + "%' ";