or
A regular grid like query data from DataTable and binding directly
var context = new FlockWatchEntities();
var forecast = context.ForecastMSTs.Where(i => i.Type == "F").OrderBy(i => i.chrDesc);
grdForecast.DataSource = forecast;private void grdForecast_DefaultValuesNeeded(object sender, Telerik.WinControls.UI.GridViewRowEventArgs e)
{
e.Row.Cells["dtmEntered"].Value = DateTime.Now;
e.Row.Cells["chrEnteredBy"].Value = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
}Hi,
How can I change the width of the current column in the table with using ChangeTableGridColumnWidth method?
How could I get the current table, current gridColumnIndex?
I use 2012.2.912.40 RadControls version.
Regards,
Igor
private void radGridView1_CustomSorting(object sender, GridViewCustomSortingEventArgs e){ MyObjDate row1Freight = new MyObjDate(e.Row1.Cells["colDate"].Value.ToString()); MyObjDate row2Freight =newMyObjDate(e.Row2.Cells["colDate"].Value.ToString()); if (row1Freight > row2Freight) { e.SortResult = 1; } else if (row1Freight < row2Freight) { e.SortResult = -1; } else { e.SortResult = 0; }}