TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Denmark Puso
NA
232
49.8k
Sorting not working
Jul 20 2019 12:03 AM
im trying to sort state, city and town but my code is not working plss help
if (model.Id > 0)
{
var order = _orderService.Get(model.Id);
model.ClientId = order.ClientId;
model.StateId = order.StateId;
model.CityId = order.CityId;
model.TownId = order.TownId;
model.Postcode = order.Postcode;
model.Address = order.Address;
model.DeliveryDate = order.DeliveryDate;
model.Quantity = order.Quantity;
model.Notes = order.Notes;
model.Status = order.Status;
model.States = _stateService.GetStatesByCountryId(order.Client.CountryId).Select(x => new SelectListItem
{
Text = x.Name,
Value = x.Id.ToString()
}).OrderBy(x => x.Text);
model.Cities = _cityService.GetCitiesByStateId(order.StateId).Select(x => new SelectListItem
{
Text = x.Name,
Value = x.Id.ToString()
}).OrderBy(x => x.Text);
model.Towns = _townService.GetTownsByCityId(order.CityId).Select(x => new SelectListItem
{
Text = x.Name,
Value = x.Id.ToString()
}).OrderBy(x => x.Text);
}
return model;
Reply
Answers (
1
)
Exvcel Download in Nested Gridview in asp.net with example
Routing in asp.net