I was going through the above example from knowledge base.
I did define the band and columns with name and set up all properties but at the run with setbinding method it takea all the properties from the data source. Is there anyway I can keep the setup from the design time to thr run time when I am attaching my table at run time.
Thanks
Sandy
Hi Sandy,
If it's not working, then something about the design-time layout does not match up with the run-time data source. All of the band and column keys must match up exactly. The most common mismatch is in the Key of the Band, since this is often hard to determine.
What kind of data source are you using at run-time? If its a DataSet, remember that the key of the child band is the name of the relation, not the child table.
If that does help, you should Submit an incident to Infragistics Developer Support and include a small sample project demonstrating the problem.
Okay, this is my code. What will be my key, QrmAutoLoadStat or o_DataTable? What is Band key and Column key here...
s_SQL = "SELECT status, source, businessdate, starttime, endtime, jobdesc FROM QrmAutoLoadStat "; s_SQL += "WHERE businessid = " + s_Business + " ORDER BY orderid; "; s_SQL += "SELECT DISTINCT status FROM QrmAutoLoadStat "; s_SQL += "WHERE businessid = " + s_Business; SqlDataAdapter o_SqlDataAdapter = new SqlDataAdapter(s_SQL, o_DBConn); DataSet o_DataSet = new DataSet(); o_SqlDataAdapter.Fill(o_DataSet); DataTable o_DataTable = new DataTable(); o_DataTable = o_DataSet.Tables["Table"]; DataTable o_DataTable1 = new DataTable(); o_DataTable1 = o_DataSet.Tables["Table1"]; grd_Automation.SetDataBinding(o_DataTable, null, true);
okay tablename is the band key and column name is column key, now I underatand. It's coming now. Still trying to fix the readonly property for some columns.
This is done as per you (Activation.NoEdit) for ReadOnly propery.
Sorry, you lost me. Are we still talking about the same thing?
Thanks Mike,
What's the catch here, even if I am making a particular column property as ReadOnly = True, it's changing back to default when I am opening it again.
If ever you are unsure if you got the keys right, you can check them pretty easily. In the InitializeLayout event of the grid, you can loop through the bands and turn on the Band header. This will display the key (by default) of each band on the top of the column headers. The column headers are already displayed, of course.