protected void RadComboBox1_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) { // Get the Country DropDownList first. RadComboBox ddlBranch = (RadComboBox)sender; // Get the current GridView Row, from which the DropDownList is selected. GridEditableItem currentRow = (GridEditableItem)ddlBranch.NamingContainer; // Now let's find the City DropDownList on the same GridView Row. DropDownList ddlCity = (DropDownList)currentRow.FindControl("ddlAgent"); if (ddlBranch != null && ddlBranch.SelectedIndex > 0 && ddlCity != null) { relife_part2Entities db = new relife_part2Entities(); int? companyidfk=Convert.ToInt32(ddlBranch.SelectedValue); ddlCity.DataSource = db.tbl_policymaster.Where(x => x.companyidfk == companyidfk).ToList(); dd
private void Form1_Load(object sender, EventArgs e) { // Creating a Global culture specific to our application. System.Globalization.CultureInfo cultureInfo =new System.Globalization.CultureInfo("en-US"); // Creating the DateTime Information specific to our application. System.Globalization.DateTimeFormatInfo dateTimeInfo = new System.Globalization.DateTimeFormatInfo(); // Defining various date and time formats. dateTimeInfo.DateSeparator = "/"; dateTimeInfo.LongDatePattern = "dd-MMM-yyyy"; dateTimeInfo.ShortDatePattern = "dd/MM/yyyy"; dateTimeInfo.LongTimePattern = "hh:mm:ss tt"; dateTimeInfo.ShortTimePattern = "hh:mm tt"; // Setting application wide date time format. cultureInfo.DateTimeFormat = dateTimeInfo; // Assigning our custom Culture to t