3 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 03 Sep 2008, 04:02 AM
Hi,
Try the followinng code snippet to disable the slider in Grid Pager.
CS:
Regards
Shinu
Try the followinng code snippet to disable the slider in Grid Pager.
CS:
| protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridPagerItem) |
| { |
| GridPagerItem pager = (GridPagerItem)e.Item; |
| RadSlider radsldr = (RadSlider)pager.FindControl("GridSliderPager"); |
| radsldr.Enabled = false; |
| } |
| } |
Regards
Shinu
0
Luci
Top achievements
Rank 1
answered on 03 Sep 2008, 08:02 AM
oh, I forgot to mention I needed this client-side... I just need to disable a grid and it would be hilarious after all that strive to have all things client-side to make a postback just to disable the slider...
is this possible ? my current setup is to hide it, but it's just plain ugly.
thanks again.
is this possible ? my current setup is to hide it, but it's just plain ugly.
thanks again.
0
Hello Luci,
Take a look at the following code:
Kind regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Take a look at the following code:
| function GridCreated(sender, args) { |
| var footerCell = sender.MasterTableView.get_element().tFoot.rows[0].cells[0]; |
| for (var childNode = 0; childNode < footerCell.childNodes.length; childNode++) { |
| currentItem = footerCell.childNodes[childNode]; |
| if (currentItem.id && currentItem.id.indexOf("Slider") >= 0) { |
| currentItem.disabled = true; //disable text labels |
| if ((sliderObject = $find(currentItem.id))) { |
| sliderObject.set_enabled(false); //disable radSlider |
| sliderObject.repaint(); |
| } |
| } |
| } |
| } |
Kind regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.