我想创建一个切换按钮,在我的KENDO网格中添加/删除可分组选项。在初始化中,我没有属性'groupable'。
int currIndex = 0;
string key, value;
while(!EndOfFile){
currIndex = find('=');
key = getWordBeforeCurrentIndex();
currIndex = find('>');
value = getWordAfterCurrentIndex();
myDictionary.Add(key, value);
}
但这不起作用!
行!!我找到了它!
Dictionary myDict = new HashTable<string, string>();
InputStream wordDictionary = getResources().openRawResource(R.raw.wordDictionary);
DataInputStream myDIS = new DataInputStream(wordDictionary);
ArrayList<string> lines = new ArrayList<Lines>();
string currLine;
//Read document into arraylist:
while((myLine=myDIS.readline())!=null) list.add(myLine);
//Take each line, add left word as key, add right word as value:
foreach(line : lines){
myDict.add(line.substring(0, line.indexOf(" ")), line.substring(line.indexOf(" ", line.indexOf(" ")+1));
}
现在播放
答案 0 :(得分:0)
如果不重新创建网格,则无法动态更改groupable
设置。使用网格的setOptions
方法,或k-rebind
来实现这一点。
http://docs.telerik.com/kendo-ui/api/javascript/ui/widget#methods-setOptions
http://docs.telerik.com/kendo-ui/AngularJS/introduction#widget-update-upon-option-changes