Forgive the cross-post, but I didn't realize until afterwards that GridViewLookUpColumn should be asked here instead.
I have a GridView that has three columns. The first is read only and named RuleKeyGuid. The second is called RuleKey, and the last is called KeyValue. I'd like for the second column to be a drop-down that suggests what the user might be looking for based on a data source. Here's what I entered:
If I make changes in the grid to cells in the third column, it works just fine. But I can't change the second column. When I type, it seems to be accepting whatever I'm typing, but when I hit enter, it goes away.
I have two problems here.
1) The value that I've manually set the cell to doesn't show up unless it's a member of the DataSource.
2) The user cannot enter any value other than what is in the DataSource. If they type something in, it doesn't "stick". You hit Enter and the value reverts to whatever it was before.
How do I go about addressing this? They both seem to be related. Is there a setting I'm missing or am I approaching this problem incorrectly?
I have a GridView that has three columns. The first is read only and named RuleKeyGuid. The second is called RuleKey, and the last is called KeyValue. I'd like for the second column to be a drop-down that suggests what the user might be looking for based on a data source. Here's what I entered:
System.Collections.IDictionaryEnumerator iterator = sortedRuleKeys.GetEnumerator(); while (iterator.MoveNext()) { GridViewRowInfo rowInfo = radGridView_RuleKeys.Rows.AddNew(); rowInfo.Cells[0].Value = ((RuleKey)iterator.Value).RuleKeyGuid.ToString(); rowInfo.Cells[1].Value = ((RuleKey)iterator.Value).keyName; rowInfo.Cells[2].Value = ((RuleKey)iterator.Value).keyValue; } ((GridViewLookUpColumn)radGridView_RuleKeys.Columns[1]).AutoCompleteMode = AutoCompleteMode.SuggestAppend; |
((GridViewLookUpColumn)radGridView_RuleKeys.Columns[1]).DropDownStyle = RadDropDownStyle.DropDown; |
DataTable dt = new DataTable(); |
dt.Columns.Add("RuleKey", typeof(string)); |
dt.Rows.Add("Mobile"); |
dt.Rows.Add("Business"); |
dt.Rows.Add("Fax"); |
((GridViewLookUpColumn)radGridView_RuleKeys.Columns[1]).DataSource = dt; |
If I make changes in the grid to cells in the third column, it works just fine. But I can't change the second column. When I type, it seems to be accepting whatever I'm typing, but when I hit enter, it goes away.
I have two problems here.
1) The value that I've manually set the cell to doesn't show up unless it's a member of the DataSource.
2) The user cannot enter any value other than what is in the DataSource. If they type something in, it doesn't "stick". You hit Enter and the value reverts to whatever it was before.
How do I go about addressing this? They both seem to be related. Is there a setting I'm missing or am I approaching this problem incorrectly?