Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
143 views
I have a RadGrid with a ContextMenu appearing when you right click.  When you click on an item in the context menu, I want to open a new window using Javascript.  I get into the ItemClick sub on the menu, but my Javascript is not firing.  I'm certain that I have something wrong in the RegisterStartupScript line.  I even think it's my first parameter.  What should go there?  The grid is ajaxed, so there's no postback, I tried the name of the menu as well.  Help?

Dim

 

strScript As String = ""

 

strScript =

"<script type='text/javascript'>window.open('http://www.google.com'); </script>"

 

ScriptManager.RegisterStartupScript(GridFees,

Me.GetType(), "myKey", strScript, True)

 

TPerry
Top achievements
Rank 1
 answered on 12 Feb 2009
1 answer
78 views
Hello,

My code does not use a RadAjaxManager or panel to async postback.  It's a pretty standard grid definition, using filtering and sorting, and include a select button.

When clicking the select button, the very first time the SelectedIndexChanged event fires and the command name is select, but the selectedindexes collection is empty.  Any time after that, it works fine.

Any ideas why?

Thanks.
Daniel
Telerik team
 answered on 12 Feb 2009
2 answers
238 views
I looked through all the online help but can't seem to find the option to only have one column out of 5 with the option for filtering.  Example:  On the gridboundcolumn when i set the currentfilterfunction="nofilter" that doesn't work.  I'm assuming that is used for programmatically assigning the filter as a default preset and it doesn't work for what I am trying to do.  so can anyone suggest how i'd go about assigning a single column with filter options and the others without?  Thanks in advance.

     <telerik:RadGrid ID="RadGridZoneList" runat="server" GridLines="None" Skin="Vista" 
                    AutoGenerateColumns="False" AllowPaging="True"   
                    OnPageIndexChanged="RadGridZoneList_PageIndexChanged"   
                    GroupingSettings-CaseSensitive="false" EnableLinqExpressions="False" 
                    CellPadding="0" AllowFilteringByColumn="True" AllowSorting="True"   
                    OnItemCommand="RadGridZoneList_ItemCommand" OnInit="RadGridZoneList_Init">  
                    <HeaderContextMenu EnableTheming="True" Skin="Vista">  
                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                    </HeaderContextMenu> 
                    <MasterTableView> 
                        <NoRecordsTemplate> 
                            No Records Found  
                        </NoRecordsTemplate> 
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </RowIndicatorColumn> 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
                        <Columns> 
                            <telerik:GridBoundColumn HeaderText="Zone Id" UniqueName="Zone_id" DataField="Zone_id" CurrentFilterFunction="NoFilter">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="CS#" UniqueName="Cs_no" DataField="Cs_no">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Event Id" UniqueName="Event_id" DataField="Event_id" CurrentFilterFunction="NoFilter">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Event Description" UniqueName="Event_description" DataField="Event_description" CurrentFilterFunction="NoFilter">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Comment" UniqueName="comment" DataField="comment" CurrentFilterFunction="NoFilter">  
                            </telerik:GridBoundColumn> 
                        </Columns> 
                    </MasterTableView> 
                    <GroupingSettings CaseSensitive="False" /> 
                    <FilterMenu EnableTheming="True" Skin="Vista">  
                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                    </FilterMenu> 
                </telerik:RadGrid> 
Jon-Jon Kershaw
Top achievements
Rank 2
 answered on 12 Feb 2009
1 answer
151 views
Sorry for the cryptic thread name but i am not sure exactly what to call this...

Currently i use TooltipManagers that load user control OnDemand. I pass the control a parameter and the control then uses this parameter to retrieve data OnAjaxUpdate.

Now i have a slightly different senario. The data i want the tooltip to display is available on the page where the TooltipManager sits. The control i want to load in the tooltip does not have to retrieve any data.

That said the ToolTipUpdateEventArgs being a string value is very limiting in this senario... I would like to pass the control an entire XML node to display the data...

So here is the questions...

1) case ToolTipUpdateEventArgs be anything other than a string?
2) is this the correct way of doing this. i want to dynamically add a control to the tooltip[ to load OnDemand but i want to pass it all the data it needs. So i guess the question is is there a way to dynamically build a tooltip without using a control to load into it?

Sorry this question is a little bit confusing, but maybe someone understand what i am getting at or at least it will open up discussion and i can explain further.

Duncan
Tervel
Telerik team
 answered on 12 Feb 2009
3 answers
144 views
Dear Sir,

I have three pages in one page i have taken rad splitter. In one splitter pane i am calling to second page.
In Second page i have again taken a splitter and calling third page.
on third page when i open a radwindow and add a close handler. then it was giving an error
"Stack overflow at line:0"

Does anybody know then please tell me how to resolve this.

Thanks
Brijendra
Georgi Tunev
Telerik team
 answered on 12 Feb 2009
1 answer
120 views

When using the online demo for alpahbetic paging in the Rad Grid, when I click the edit button for the 3rd record on the "P" page the grid opens the edit for the 3rd record on the "A" page.

 

 

 
The stored Procedure is basically the "SELECT * FROM [People] WHERE [Name] LIKE @Letter"

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>" 
             SelectCommand = "GetSeminarSpeakers" SelectCommandType="StoredProcedure">   
            <SelectParameters> 
                <asp:Parameter Name="Letter" DefaultValue="%" /> 
            </SelectParameters> 
         </asp:SqlDataSource> 

 Protected Sub rgSpeakers_ItemCommand(ByVal source As Object, ByVal e As Telerik.WebControls.GridCommandEventArgs) Handles rgSpeakers.ItemCommand  
 
 
        Dim value As String = Nothing 
        Select Case e.CommandName  
            Case ("alpha")  
                value = String.Format("{0}%", e.CommandArgument)  
                Exit Select  
            Case ("nofilter")  
                value = "%" 
                Exit Select  
        End Select  
   
        Me.SqlDataSource1.SelectParameters("Letter").DefaultValue = value 
        rgSpeakers.Rebind()  
 
 
    End Sub  
 
    Protected Sub rgSpeakers_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles rgSpeakers.ItemCreated  
        If TypeOf e.Item Is GridPagerItem Then  
            Dim pagerItem As GridPagerItem = CType(e.Item, GridPagerItem)  
            pagerItem.PagerContentCell.Controls.Clear()  
 
            Dim i As Integer  
            For i = 65 To 65 + 25  
                Dim linkButton1 As New LinkButton  
                Dim lc As New LiteralControl("&nbsp;&nbsp;")  
                linkButton1.Text = "" + ChrW(i)  
 
                linkButton1.CommandName = "alpha" 
                linkButton1.CommandArgument = "" + ChrW(i)  
 
                pagerItem.PagerContentCell.Controls.Add(linkButton1)  
                pagerItem.PagerContentCell.Controls.Add(lc)  
            Next i  
 
            Dim lcLast As New LiteralControl("&nbsp;")  
            pagerItem.PagerContentCell.Controls.Add(lcLast)  
 
            Dim linkButtonAll As New LinkButton  
            linkButtonAll.Text = "All" 
            linkButtonAll.CommandName = "NoFilter" 
            pagerItem.PagerContentCell.Controls.Add(linkButtonAll)  
        End If  
 
    End Sub 

Georgi Krustev
Telerik team
 answered on 12 Feb 2009
1 answer
144 views
I notice than when I click the text of a node element that it highlights.  I am using checkboxes in my treeview so how do I highlight the text anytime the checkbox is selected for each node?

Also - how can I make a click of the text also check and uncheck the node so that as long as I click anywhere on that node it toggles its checked state?
Yana
Telerik team
 answered on 12 Feb 2009
9 answers
214 views
hi

I have gone thru the demo and i still not sure how to go about it

Ok, i have a table(ID, ImagePath). The ID is an autonumber, the ImagePath is nvarchar(200)

The is a folder called ProdImage and this is used to store all product images.

I have a stored Proc for insert and it has a return value of Scope_Identity. The purpose of the return value is to rename the image file using the return value.

I have a RadUpload in a grid and am using In-Form editing for Insert and Update.

Based in the sample demo code, I couldn't not figure out how i should accomplish my task. Please help. Thanks

Protected

 

Sub RadGrid1_ItemInserted(ByVal source As Object, ByVal e As Telerik.Web.UI.GridInsertedEventArgs) Handles RadGrid1.ItemInserted

 

InitializeUpdateParameter(

DirectCast(e.Item.FindControl("RadUpload1"), RadUpload))

 

 

End Sub

 

 

Protected Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)

 

InitializeUpdateParameter(

DirectCast(e.Item.FindControl("RadUpload1"), RadUpload))

 

 

End Sub

 

 

Private Sub InitializeUpdateParameter(ByVal currentUpload As RadUpload)

 

 

If currentUpload.UploadedFiles.Count > 0 Then

 

 

Dim data As Byte() = New Byte(currentUpload.UploadedFiles(0).ContentLength) {}

 

currentUpload.UploadedFiles(0).InputStream.Read(data, 0, data.Length)

Session(

"DataVB") = data

 

 

End If

 

 

End Sub

 

L
Top achievements
Rank 1
 answered on 12 Feb 2009
3 answers
161 views
I like the skins for the file uploads, but I'm very short on space and I want to display ONLY the file input box (and 'select' button) and not the surrounding div.

The actual aim will be to populate a grid with a list of uploaded files. I've seen the grid-input example, but I don't want the file upload to be inside the grid, I want it just above.

Any help would be much appreciated.
Veselin Vasilev
Telerik team
 answered on 12 Feb 2009
4 answers
266 views
Below is the code of my grid:

<telerik:RadGrid ID="rgAnalysisResults"  
                 runat="server"  
                 AutoGenerateColumns="False"  
                 AllowPaging="True" 
                 AllowSorting="True" 
                 ShowStatusBar="True"  
                 Skin="BDB" EnableEmbeddedSkins="False" GridLines="None" > 
    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> 
    <CommandItemStyle /> 
    <MasterTableView> 
 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridBoundColumn DataField="DocumentDate" HeaderText="DocumentDate"  
                UniqueName="DocumentDate" DataFormatString="{0:dd/MM/yyyy}" 
                DataType="System.DateTime" /> 
            <telerik:GridBoundColumn DataField="Parcel" HeaderText="Parcel" UniqueName="Parcel" /> 
            <telerik:GridBoundColumn DataField="LaboNbr" HeaderText="LaboNbr" UniqueName="LaboNbr" /> 
          <%--  <telerik:GridButtonColumn ButtonType="ImageButton" CommandArgument="FileName" ImageUrl="~/images/pdf.gif" 
                DataTextField="" CommandName="ShowPDF" UniqueName="FileName" HeaderText="" />--%> 
             
              <telerik:Gridtemplatecolumn UniqueName="PDF" HeaderText="Pdf"
                <ItemTemplate> 
                    <asp:ImageButton ID="DownloadPDFButton" CommandName="Download" runat="server" CommandArgument="FileName" ImageUrl="~/images/pdf.gif" /> 
                </ItemTemplate> 
                </telerik:Gridtemplatecolumn> 
               <%-- <telerik:Gridtemplatecolumn> 
                <ItemTemplate> 
                    <asp:ImageButton ID="DownloadXMLButton" CommandName="DownloadXML" runat="server" CommandArgument="FileNameXML" ImageUrl="~/images/xml.gif" /> 
                </ItemTemplate> 
                </telerik:Gridtemplatecolumn>--%> 
</Columns> 
        <NoRecordsTemplate> 
            <asp:Label ID="lblNoRecords" runat="server" Text="" ForeColor="Red" resourcekey="lblNoRecords" /> 
        </NoRecordsTemplate> 
 
<EditFormSettings> 
<EditColumn InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif" EditImageUrl="Edit.gif" CancelImageUrl="Cancel.gif"></EditColumn> 
</EditFormSettings> 
        </MasterTableView> 
 
<FilterMenu Skin="BDB" EnableEmbeddedSkins="False" EnableTheming="True"
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</FilterMenu> 
</telerik:RadGrid> 

I have a column called DocumentDate which contains dates. I am trying  to only show the date (no time), but 0:00:00 is added to all the dates. What am I doing wrong?
Jen
Top achievements
Rank 1
 answered on 12 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?