Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
115 views
Hello,

I'm trying to add some client-side context sensitivity (button showing/hiding, enabling/disabling) to a RadToolBar which I've nested inside the CommandItemTemplate of a RadGrid, but my attempts to get a handle to the toolbar and its buttons aren't working.
I've gone through the various examples and forum threads, and found similar subjects (which I've tried to adapt) but nothing I've been able to figure out how to make use of for this situation.

What I have:
RadToolBar1, with three Buttons and one separator ("Extract", "Separator 1", "Save", "Delete"), inside of the CommandItemTemplate of RadGrid1.

Does anyone have an example of how to get a client-side reference to the nested toolbar or its buttons?

Thanks,
Christopher
Christopher H.
Top achievements
Rank 1
 answered on 12 May 2009
2 answers
136 views
Hi,

I'm just evaluating the RadControls an trying to figure out how to get the value of a cell from a RadGrid if I use ItemTemplates.
I read this article from the manual but it doesn't work as espected.
This is my grid and JS code:

        function RowSelected(sender, eventArgs) { 
            var MasterTable = sender.get_masterTableView(); 
            var row = eventArgs.get_gridDataItem(); 
            alert(MasterTable.getCellByColumnUniqueName(row, "ID").innerHTML); 
        } 

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None" 
                Skin="Office2007" ShowHeader="False"> 
                <ClientSettings> 
                    <Selecting AllowRowSelect="True" /> 
                    <ClientEvents OnRowSelected="RowSelected" OnRowCreated="RowCreated" /> 
                </ClientSettings> 
                <MasterTableView AllowAutomaticUpdates="True" DataSourceID="SqlDataSource1" HorizontalAlign="Left"> 
                    <Columns> 
                        <telerik:GridTemplateColumn UniqueName="Other"> 
                            <ItemTemplate> 
                                <span style="display: block; float: left;"> 
                                    <%# Eval("by")%></span> <span style="display: block; float: right;"> 
                                        <%# Eval("date")%></span> 
                                <br /> 
                                <span style="font-weight: bold;"> 
                                    <%# Eval("subject")%> 
                                </span> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn UniqueName="ID"> 
                            <ItemTemplate> 
                                <%# Eval("ID")%> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                    </Columns> 
                </MasterTableView> 
            </telerik:RadGrid> 


I'm able to get the id, but the problem is, that all columns are displayed (I retrieve about 10 columns from DB while showing only 3) using the markup but I need to display a selection of them with a custom template and retrieving data of other columns which are not displayed (for instance ID).
If I define a new ItemTemplate after the closing <columns> tag the grid is displayed correctly but I cant access the id.




Cutting a long story short I'm looking for a clean and clientside way to access the content of specific cells which are not displayed.
I don't like something like <span style="display:none"> <%# Eval("ID")%></span> and MasterTable.getCellByColumnUniqueName(row, "Info").document.getElementByTagName('span')[int].innerHTML because this is a dirty workaround.

Any help is highly appreciated.

Kind regards Jay

Jasper
Top achievements
Rank 1
 answered on 12 May 2009
3 answers
166 views
Hi,

How to create duplicate copy of dock.


Nirakar.
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 12 May 2009
2 answers
166 views
For legacy reasons I have a grid with a GridCheckBoxColumn.

I have a button which needs to check all the chekboxes serverside.   Following an example in another thread I coded it this way.  Unfortunately it only produces an indexing error.

Anyone see where I'm going wrong?

Thanks.

Protected Sub btnChkAll_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnChkAll.Click
        'resize the grid to the maximum number of rows
        RadGridResult.MasterTableView.PageSize = hfGridRows.Value
        RadGridResult.Rebind()
        'check all the checkboxes

        Dim chbox As CheckBox = RadGridResult.MasterTableView.GetItems(GridItemType.CommandItem)(0).FindControl("colCheckBox")
        chbox.Enabled = True

    End Sub

<rad:RadGrid ID="RadGridResult" runat="server" GridLines="None"  EnableAJAX="True" Skin="WebBlue" EnableAJAXLoadingTemplate="True"
         AutoGenerateColumns="False" Height="370px" Width="950px" AllowPaging="True" AllowMultiRowSelection=true>
        
            <MasterTableView>           
                <ExpandCollapseColumn Resizable="False" Visible="False">
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <Columns>                
                    
                    
                    <rad:GridCheckBoxColumn UniqueName="colCheckBox">
                    </rad:GridCheckBoxColumn>
                    <rad:GridButtonColumn ButtonType="ImageButton" UniqueName="colImage">
                        <ItemStyle Width="10px" />
                    </rad:GridButtonColumn>
                    <rad:GridButtonColumn CommandName="LessonID" DataTextField="LessonID" HeaderText="Lesson ID" UniqueName="column">
                    </rad:GridButtonColumn>
                    <rad:GridButtonColumn DataTextField="LearningTitle" HeaderText="Lesson Title" UniqueName="colLearningTitle"
                        CommandArgument="LearningTitle">
                    </rad:GridButtonColumn>
                    <rad:GridBoundColumn DataField="LessonDate" HeaderText="Lesson Date" UniqueName="colLessonDate">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn DataField="Discipline" HeaderText="Discipline" UniqueName="colDiscipline">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn DataField="Area" HeaderText="Area of Op." UniqueName="colArea">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn DataField="Category" HeaderText="Category" UniqueName="colCategory">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn DataField="subCategory" HeaderText="Subcategory" UniqueName="colSubCategory">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn DataField="Field" HeaderText="Project" UniqueName="column1">
                    </rad:GridBoundColumn>
                    <rad:GridBoundColumn DataField="NIDP" HeaderText="NIDP Stage" UniqueName="column2">
                    </rad:GridBoundColumn>
                  
                </Columns>
                <AlternatingItemStyle Wrap="True" />
            </MasterTableView>
            <PagerStyle Mode=NextPrevNumericAndAdvanced/>            
        </rad:RadGrid>
Mike
Top achievements
Rank 1
 answered on 12 May 2009
1 answer
86 views
Hi

I have a beautiful horizontal RadMenu (black skin ) that works fine, except when one of the main buttons is
clicked. 

On page load and on mouseover the buttons, all is well. However when a button is clicked, the text moves to the
right briefly, until the destination page loads.

I have not (knowingly) set margins, spacings or widths of top level buttons, ( except the total width of the control),
so I can't understand this inconsistency.

Can anyone shed some light?

Thanks

Clive
Atanas Korchev
Telerik team
 answered on 12 May 2009
5 answers
164 views
Hi

I am trying to figure out if RadControls can be integrated in a Dynamicweb CMS. For that to be possible all controls must be dynamicly loaded and written to a Placeholder. This seems to be possible with the smaller RadControls but I am having problems with the Scheduler.

I have taken the "first look" example, and put it into an ascx control. This is then loaded into the DOM with the LoadControl() method. First I did it the "normal" way, loading it in the frontend markup. That worked perfectly. But with LoadControl() the ajax works first time I click on something. After the controls have done their thing (Per example loading another day or changing the view from day to month) the whole Ajax part of the controls seems to disappear. If I click again the page reloads as if clicking on a <a href="#">link</a> tag.

This seems very strange to me. Am I doing anything wrong?

Regards
Rune
Peter
Telerik team
 answered on 12 May 2009
3 answers
154 views

Hi,

There seems to be a problem when adding background image for  table in editor. When you add image -- editor displayes it fine, but after publishing page, image disappers and won't come back in edit mode. 

Radeditor's version is 5.3.2.0

Stanimir
Telerik team
 answered on 12 May 2009
2 answers
67 views
How do I localize the drop-down calendar that allows you to select a date on the Scheduler control?

Or how do I stop the scheduler from showing that option?
NEX
Top achievements
Rank 1
 answered on 12 May 2009
2 answers
116 views
Following your dynamic dock example, i see there is an issue with closing dynamic docks. 

When obtaining the GetRegisteredDocksState(), all closed (removed from dock zones) docks are still showing up as being registered to the dock zone. Is this by design ? or does the DockCloseCommand() not automatically un-register these closed docks ?

Thanks


Adrian
Top achievements
Rank 1
 answered on 12 May 2009
3 answers
154 views



Hello everyone,

My problem is that RadDockLayout_SaveDockLayout is processed when any event on the page is fired.
I want the code in RadDockLayout_SaveDockLayoutto be executed only when a raddock position change.



Best Regards,



Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 12 May 2009
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?