Advertisement
Guest User

Untitled

a guest
Aug 1st, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. myButton.Click += (sender, args) => {
  2. if (!this.DataGrid.Enabled) {
  3. this.DataGrid.Enabled = true;
  4. this.DataGrid.ClientSettings.EnablePostBackOnRowClick = true;
  5. this.DataGrid.ClientSettings.Resizing.AllowColumnResize = true;
  6. this.DataGrid.ClientSettings.Selecting.AllowRowSelect = true;
  7. this.DataGrid.ClientSettings.AllowKeyboardNavigation = true;
  8. } else {
  9. this.DataGrid.Enabled = false;
  10. this.DataGrid.ClientSettings.EnablePostBackOnRowClick = false;
  11. this.DataGrid.ClientSettings.Resizing.AllowColumnResize = false;
  12. this.DataGrid.ClientSettings.Selecting.AllowRowSelect = false;
  13. this.DataGrid.ClientSettings.AllowKeyboardNavigation = false;
  14. }
  15. this.DataGrid.Rebind();
  16. }
  17.  
  18. [GridException: Please set ClientSettings.Selecting.AllowRowSelect to "True" to start using GridClientSelectColumn.]
  19.  
  20. <ClientSettings>
  21. <Selecting AllowRowSelect="True"></Selecting>
  22. </ClientSettings>
  23.  
  24. <telerik:RadGrid ID="mygrid"
  25. runat="server" AutoGenerateColumns="false"
  26. AllowSorting="true"
  27. OnNeedDataSource="mygrid_NeedDataSource"
  28. AllowFilteringByColumn="False">
  29. <ClientSettings>
  30. <Selecting AllowRowSelect="True"></Selecting>
  31. </ClientSettings>
  32. <MasterTableView DataKeyNames="myColumn" Name="PoHeader">
  33. <Columns>
  34. <telerik:GridClientSelectColumn ItemStyle-Width="25px" />
  35. <telerik:GridBoundColumn DataField="myColumn" HeaderText="My Column" />
  36. </Columns>
  37. </MasterTableView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement