Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
160 views
Here's my code to create dynamic grid. My grid width is 500px and I have 6 columns of 100px each. My problem is that my grid can't display horizontal scrollbar. Do you know why ?

Me

 

.Grid.Columns.Clear()

 

 

'Set grid settings section

 

 

Me.Grid.Width = Width

 

 

Me.Grid.Height = Height

 

 

Me.Grid.ShowStatusBar = True

 

 

Me.Grid.AutoGenerateColumns = False

 

 

Me.Grid.AllowPaging = False

 

 

Me.Grid.Skin = "Office2007"

 

 

'Set client settings section

 

 

Me.Grid.ClientSettings.Scrolling.AllowScroll = True

 

 

Me.Grid.ClientSettings.Scrolling.UseStaticHeaders = True

 

 

Me.Grid.ClientSettings.Scrolling.ScrollHeight = Height - 20

 

 

'Set mastertableview section

 

 

'Me.Grid.MasterTableView.Width = Unit.Percentage(100)

 

 

Me.Grid.MasterTableView.TableLayout = GridTableLayout.Auto

 

 

Me.Grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top

 

 

Me.Grid.MasterTableView.EditMode = GridEditMode.InPlace

 

 

Me.Grid.MasterTableView.DataKeyNames = New String() {"ID"}

 

 

'Add GridEditCommandColumn

 

 

Dim EditCommandColumn As GridEditCommandColumn = New GridEditCommandColumn

 

 

Me.Grid.MasterTableView.Columns.Add(EditCommandColumn)

 

EditCommandColumn.ButtonType = GridButtonColumnType.ImageButton

EditCommandColumn.CancelText =

"Annuler la modification de la donn‚e"

 

EditCommandColumn.UniqueName =

"EditCommandColumn"

 

EditCommandColumn.CancelImageUrl =

"../RadControls/Grid/Skins/Outlook/Cancel.Gif"

 

EditCommandColumn.InsertText =

"Ajouter une donn‚e"

 

EditCommandColumn.InsertImageUrl =

"../RadControls/Grid/Skins/Outlook/Update.Gif"

 

EditCommandColumn.UpdateText =

"Mettre … jour la donn‚e"

 

EditCommandColumn.UpdateImageUrl =

"../RadControls/Grid/Skins/Outlook/Update.Gif"

 

EditCommandColumn.EditText =

"Modifier la donn‚e"

 

EditCommandColumn.EditImageUrl =

"../RadControls/Grid/Skins/Outlook/Edit.Gif"

 

EditCommandColumn.HeaderStyle.Width = Unit.Pixel(40)

EditCommandColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center

 

'Add GridButtonColumn

 

 

Dim GridButtonColumn As GridButtonColumn = New GridButtonColumn

 

 

Me.Grid.MasterTableView.Columns.Add(GridButtonColumn)

 

GridButtonColumn.ButtonType = GridButtonColumnType.ImageButton

GridButtonColumn.CommandName =

"Delete"

 

GridButtonColumn.Text =

"Supprimer la donn‚e"

 

GridButtonColumn.ConfirmText =

"D‚sirez-vous supprimer cette donn‚e ?"

 

GridButtonColumn.ConfirmDialogType = GridConfirmDialogType.RadWindow

GridButtonColumn.UniqueName =

"DeleteColumn"

 

GridButtonColumn.ImageUrl =

"../RadControls/Grid/Skins/Outlook/Delete.Gif"

 

 

If Columns.Count = 0 Then

 

GridButtonColumn.HeaderStyle.Width = Unit.Pixel(100)

 

Else

 

GridButtonColumn.HeaderStyle.Width = Unit.Pixel(20)

 

End If

 

GridButtonColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center

 

'Add columns to grid

 

 

For Each col As GridColumnDefinition In Columns

 

 

Dim column As GridBoundColumn = New GridBoundColumn

 

 

Me.Grid.MasterTableView.Columns.Add(column)

 

 

If col Is Columns.Last Then

 

 

'column.HeaderStyle.Width = Unit.Percentage(100)

 

 

'column.ItemStyle.Width = Unit.Percentage(100)

 

 

Else

 

column.HeaderStyle.Width = col.Width

column.ItemStyle.Width = col.Width

 

End If

 

column.HeaderText = col.HeaderText

column.DataField = col.Name

column.UniqueName = col.Name

 

Next

 

 

'Add key column

 

 

Dim GridBoundColumn As GridBoundColumn = New GridBoundColumn

 

 

Me.Grid.MasterTableView.Columns.Add(GridBoundColumn)

 

GridBoundColumn.DataField =

"ID"

 

GridBoundColumn.UniqueName =

"ID"

 

GridBoundColumn.Display =

False

 

ericc34
Top achievements
Rank 1
 answered on 12 Dec 2008
1 answer
122 views
Hi,
 I'm looking to add some text/html to a rad editor on page load.

The Rad Editor is being used on a NewForm.aspx page as a replacement for the default rich text editor. As the control is being added dynamically, i can't obtain a reference using the control name:

var editor = $find("<%=RadEditor1.ClientID%>"); 


So my approach is to traverse over the DOM and find the ID of the RAD editor control. I can do this successfully using the below javascript:

 

<script type="text/javascript">  
 
_spBodyOnLoadFunctionNames.push("fillDefaultValues");  
function fillDefaultValues() {  
 
 var oJobBrief = getTagFromIdentifierAndTitle("textarea", "TextField", "Job Brief");  
   
 var temp1 = oJobBrief.parentNode.previousSibling;   
 var oRadEditor = $find(temp1.id);  
 oRadEditor._contentArea.innerHTML = "test";  
 
 
}  
 
    function getTagFromIdentifierAndTitle(tagName, identifier, title) {  
 
      var len = identifier.length;  
      var tags = document.getElementsByTagName(tagName);  
 
      for (var i=0; i < tags.length; i++) {  
        var tempString = tags[i].id;  
        if (tags[i].title == title && (identifier == "" || tempString.indexOf(identifier) == tempString.length - len)) {  
          return tags[i];  
        }  
      }  
      return null;  
    }  
</script>  
 
 


Using the $find function on Firefox returns a reference to the Rad editor instance. However I get nothing back when doing this from IE.

Can you help? Is there an easier way to set text in the rad editor for a specific page?

Stanimir
Telerik team
 answered on 12 Dec 2008
1 answer
83 views
Hello,
Does ImageManager provides advanced security like group level access?
I couldnt find a way to handle this there fore I am planning to customize the image manager so that the images will be saved in a different way with security
For example when wiki article is edited, I want to have seperate folder created (in SPList may be with name=GUID) and upload the  images/media files into it and provide the relevant group level access to the media.
Can anyone help me on this, if you have any kind of previous experince like this?

Regards,
Prashanth
Stanimir
Telerik team
 answered on 12 Dec 2008
4 answers
152 views
Dear Staff,

i would like to do the following task.

I have severall rooms (defined at Design Time) and i want to show/hide this rooms depending on the current users rights. These rights are stored i a seperate database table (None/View/Edit).

i found that it is posible to hide a resource header and to disable a timeslot depening on resource text, but when i hide the header the needed space in radscheduler is still occupied.

Any suggestion how to simply hide a resource ? 

another possible way would be to create the resource at design time.

Kind Regards

Martin
Martin Gartmann
Top achievements
Rank 2
 answered on 12 Dec 2008
3 answers
204 views
I need to show a vertical line representing the current time vertically across the scheduler in timeline view.
Peter
Telerik team
 answered on 12 Dec 2008
1 answer
194 views
The horizontal scrolling that you all have added with Q3 is great, works very nicely. I wanted to see if it would be possible to add a new feature to enable auto-scrolling of the scheduler during a drag & drop operation? However, now when I use that in conjunction with the vertical scrolling in a timeline view, if my resource or timeslot that I want to drop onto is not scrolled into view, I need to manually scroll the scheduler in order to be able to drag & drop. In some cases this is not possible; e.g when I have a long listing of resources (and want to drag from the first to the last resource) or a large width set on my slots (or a large number of timeslots, like 24) and want to drag from the first to the last timeslot.

We are also performing drag & drop from a RadGrid onto the RadScheduler and if there were some way to enable auto-scrolling of the RadScheduler during this operation that would be fantastic.

Thanks.
Paige
Peter
Telerik team
 answered on 12 Dec 2008
1 answer
140 views
Thank you for implementing the ability to resize an appointment via dragging within the timeline view in the Q3 release. Would it be possible to implement the following functionality related to this?

  • Auto-scrolling when dragging the end time of an appointment (related to this post).
  • Capabaility to drag and change the start time of an appointment in the timelineview.

Thank You,
Paige
Peter
Telerik team
 answered on 12 Dec 2008
5 answers
136 views
I am trying to enter values in a row that have half the fileds with values and the other half of the fields as nulls.
I used the update command to set values to the null cells with no lack.
Any ideas?
Thank you.
Georgi Krustev
Telerik team
 answered on 12 Dec 2008
7 answers
249 views
I took a look at the example below...Which is similar to what I want..
http://demos.telerik.com/aspnet-ajax/Window/Examples/BrowserDialogBoxes/DefaultCS.aspx


Now I have a delete button...On Delete Button click I need a confirm that User is sure to delete
if he is sure then i run code -behind to delete the stuff and after deleting I need to the user to know
that delete in confrmed
Georgi Tunev
Telerik team
 answered on 12 Dec 2008
2 answers
117 views
Hi,
We have extended your radInput and added some new properties. We would like to add these properties to the smart tag, but I can't seem to find the designer/actionlist class. Is this even doable? If this is doable, could I have a small example on how to do it?
staron
Top achievements
Rank 1
 answered on 12 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?