Hi, I’m a bit stuck. I am using the below to add a custom group by expression to a rad grid. I want the user to be able to group by any of the other fields in the grid, but always have my custom sort last (I have used e.canceled to stop them deleting it and was going to look at removing the group by box from the group by bar as well).
I have tried changing the index of the item, removing the item, then inserting it, but even this doesn’t seem to work. I have tried adding it back intot he collection on prerender, but even this adds it before the new expression.
I’m sure it’s simple, but I can’t see how to do it. All i want is for the user to be able to group as they want, and then add this last grouping after any other group by expressions that they might have added.
Dim thestring As String
thestring = "nominal_id [Nominal ID], first_name [First name],middle_name [Middle name],last_name [Surname],nicknames [Nicknames],dob [DOB],place_of_birth [Place Of Birth],miss_count [Files], photograph [photo] Group By nominal_id"
Dim expression1 As GridGroupByExpression = GridGroupByExpression.Parse(thestring)
Me.RadGrid1.MasterTableView.GroupByExpressions.Add(expression1)
.RadCalendar .rcRow td
{
border-top-width: 0px!important;
border-right-width: 0px!important;
border-bottom-width: 0px!important;
border-left-width: 0px!important;
}
We have a series of management forms that utilize the RadGrid RadControl for Asp.Net Ajax (2010, 3, 1317, 35) and are bound to objects of type List (of T). The issue we are facing is that sorting and filtering, utilizing the grids header sorting/filtering features on fields that are foreign keys to other objects of type List (of T), don’t sort/filter by its textual value. Rather, it filters on the ID as it is the data originally bound to the grid and the only value stored in the data bound List (of T). It can be assumed that each List (of T) object directly correlates to a table. What we are looking for is a reasonable solution given the following constraints:
My hope is that there is a solution to bind on the original object of type List (of T), and sort/filter in some custom fashion (within the constraints of the grid) utilizing the foreign property link between its parent object of type List (of T). I have included an image below of what I am attempting to do as attachment.
Thanks.
Venky Adabala
oCmsBusiness =
new cmsBusiness();
fileExplorerFiles.Configuration.ContentProviderTypeName =
typeof(DBContentProvider).AssemblyQualifiedName;
olistCmsFolder = oCmsBusiness.ReadAllRootFolders();
var query = from entity in olistCmsFolder select entity.FolderName;
fileExplorerFiles.Configuration.ViewPaths = query.ToArray();
fileExplorerFiles.Configuration.UploadPaths = query.ToArray();
fileExplorerFiles.Configuration.DeletePaths = query.ToArray();
I am also set
fileExplorerFiles.EnableCreateNewFolder =
true;
My problem is during run time the Add folder icon is not showing in radfile tool bar and in context menu.In design time its showing.
Please help.
Regards,
Praveen.
protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
SqlDataAdapter da = new SqlDataAdapter("select c.City, s.State from MST_State as s inner join MST_City as c on c.StateID = s.ID ", con);
DataTable mydatatable = new DataTable();
da.Fill(mydatatable);
RadGrid1.DataSource = mydatatable.DefaultView;
}
//protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)
//{
//
//}
protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)
{
//GridEditableItem editedItem = e.Item as GridEditableItem;
//UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
GridEditFormInsertItem inserteditem = (GridEditFormInsertItem)e.Item;
//Create new row in the DataSource
//Insert new values
string City = (inserteditem["City"].Controls[0] as TextBox).Text;
DropDownList list = (inserteditem.FindControl("State") as DropDownList);
string State = list.SelectedValue;
con.Open();
string insertquery = String.Format("insert into MST_City values('{0}', '{1}')", City, State);
SqlCommand sql = new SqlCommand();
sql.CommandText = insertquery;
sql.Connection = con;
sql.ExecuteNonQuery();
con.Close();
}