У нас вы можете посмотреть бесплатно Formatting gridview using rowdatabound event Part 8 или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Link for csharp, asp.net, ado.net, dotnet basics and sql server video tutorial playlists / kudvenkat Link for text version of this video http://csharp-video-tutorials.blogspo... Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help. / @aarvikitchen5572 This video is in response to one of my youtube subscriber's question. The subscriber's question is How can we have multiple cultures for a single page. For example, each row of the grid displays a record for a person belonging to a different country. When, data is displayed in a gridview control, we want the country specific currency symbol to be displayed, next to their salary. To achieve this, we can make use of RowDataBound event of GridView control. RowDataBound event is raised when a record in the datasource is bound to a row in gridview control. Please note that in RowDataBound event, we are first checking, if the row, that is being bound, is a datarow. This event is also raised for other row types like Header, Footer etc. protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { // Check if the row that is being bound, is a datarow if (e.Row.RowType == DataControlRowType.DataRow) { if (e.Row.Cells[3].Text == "US") { int salary = Convert.ToInt32(e.Row.Cells[2].Text); string formattedString = string.Format(new System.Globalization.CultureInfo("en-US"), "{0:c}", salary); e.Row.Cells[2].Text = formattedString; } else if (e.Row.Cells[3].Text == "UK") { int salary = Convert.ToInt32(e.Row.Cells[2].Text); string formattedString = string.Format(new System.Globalization.CultureInfo("en-GB"), "{0:c}", salary); e.Row.Cells[2].Text = formattedString; } else if (e.Row.Cells[3].Text == "India") { int salary = Convert.ToInt32(e.Row.Cells[2].Text); string formattedString = string.Format(new System.Globalization.CultureInfo("en-IN"), "{0:c}", salary); e.Row.Cells[2].Text = formattedString; } else if (e.Row.Cells[3].Text == "South Africa") { int salary = Convert.ToInt32(e.Row.Cells[2].Text); string formattedString = string.Format(new System.Globalization.CultureInfo("en-ZA"), "{0:c}", salary); e.Row.Cells[2].Text = formattedString; } else if (e.Row.Cells[3].Text == "Malaysia") { int salary = Convert.ToInt32(e.Row.Cells[2].Text); string formattedString = string.Format(new System.Globalization.CultureInfo("en-MY"), "{0:c}", salary); e.Row.Cells[2].Text = formattedString; } } } Use the code below, to get the list of all supported cultures in asp.net foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.AllCultures)) { Response.Write(ci.Name + " - " + ci.DisplayName + " | "); }