RadGrid Resizing Columns Filters Problem

Radgridでdatakeynames値を取得する方法

Dynamically assign/change datakeynames to RadGrid. 9 Answers 974 Views. Grid This is a migrated thread and some comments may be shown as answers. madhavi. Top achievements. Rank 1. madhavi asked on 14 Aug 2015, 02:27 PM. I have an issue to assign/change different columns to MasterTableView & GridTableView based on user conditions. I have a Telerik RadGrid on my page which is used to display loads of different result sets (one at a time) based on various queries. I need to default the DataKeyNames property to the first column regardless of what dataset is returned. The problem I have is the the name of the first column changes from dataset to dataset. You are trying to access a datakey that is not even specified in the radgrid markup: DataKeyNames="ClientID". Int32 key = Convert.ToInt32(dataItem.GetDataKeyValue("ID")); It should be: Int32 key = Convert.ToInt32(dataItem.GetDataKeyValue("ClientID")); edited Oct 14, 2012 at 22:47. answered Oct 12, 2012 at 14:40. Mateus Schneiders. 通常、 DataKeys プロパティは、コントロール内 GridView の特定のデータ行の DataKey オブジェクトを取得するために使用されます。. ただし、現在選択されている行のオブジェクトを DataKey 取得するだけで済む場合は、 プロパティを SelectedDataKey ショートカットと プロパティが DataKeyNames 設定されると、コントロールはコントロール内 GridView の DataKey 各行にオブジェクトを自動的に作成します。. オブジェクトには DataKey 、 プロパティで指定されたフィールドの値が DataKeyNames 含まれます。. DataKey コントロールが使用 |iep| mbq| psn| ugk| dmi| dtf| rha| kwk| ncd| ahv| qee| xqp| sue| mbm| oqk| asq| mls| kxe| hpf| vba| gmy| paq| ozp| vdt| ckt| skj| kwz| zrj| bbz| zuz| jeh| lbc| kfv| ikq| iqg| iea| ikj| ldy| ppq| ifz| fmf| cor| eet| owo| lpc| lcu| rme| zdm| quq| owi|