Categories | Question details Back To List | ||||||||
Dhtml grid i have a grid . which has column coro, i want to on select of the coro type cell getthe option text not value of option . below is my programme . this show on select of this is value but i want text of option . while (r.Read()) { //res += "<row id=\"" + r[xmlDoc.GetElementsByTagName("key")[0].Attributes["name"].Value] + "\">"; res += "<row>"; String strPlaceCode = GetPlaceCode(r[4].ToString()); if (strPlaceCode==null || strPlaceCode=="" ) { strLanguageSpoken = GetLanguageSpoken(r[4].ToString()); if (strLanguageSpoken == "" || strLanguageSpoken == null) { strLanguageSpoken = "English"; } } res += "<cell >" + r[0].ToString() + "</cell >"; res += "<cell >" + r[2].ToString() + "</cell >"; res += "<cell >" + r[3].ToString() + "</cell >"; res += "<cell >" + r[4].ToString() + "</cell >"; res += "<cell >" + strLanguageSpoken + "</cell >"; DataSet ds=new DataSet(); ds = GetGuideInformations(strPlaceCode, strLanguageSpoken); res += "<cell xmlcontent='true'>"; if (ds.Tables.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { string strGuideType = ""; string strGuideType1 = ""; if (int.Parse(dr[5].ToString()) > 0 || int.Parse(dr[6].ToString()) > 0) { strGuideType = "Local Station"; } if (int.Parse(dr[7].ToString()) > 0) { strGuideType1 = "Out Station"; } res += "<option value='" + dr[5].ToString() + "#"+ dr[6].ToString() +"'>" + strGuideType + "</option>"; res += "<option value='" + dr[7].ToString() + "'>" + strGuideType1 + "</option>"; } } else { res += "<option value='NA'> N/A </option>"; res += "<option value='Not In List'>Not In List</option>"; } res += "</cell> "; Answer posted by Support on Dec 24, 2008 01:34 The code which you are using looks correct and must produce valid data for the grid. If you just need a way to access related combo text after value selection, you can use onEditCell event to catch necessary moment and getCustomCombo to locate text by value Please check attached sample. Attachments (1)
|