Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
43 views
Is there an example, someone can point me to, where I could find out how to add 2 linkbuttons to a single column, rather than having 2 defined columned as linkbutton columns?
Mike Causi
Top achievements
Rank 1
 answered on 17 May 2010
5 answers
96 views
The code is basicly from the demo example, however, update results in error: ...object reference not set to an instance of an object. any help is appreciated.

VB:
If e.CommandName = "UpdateRating" Then  
                Dim item As GridEditableItem = TryCast(e.Item, GridEditableItem)  
                Dim values As New Hashtable()  
                item.ExtractValues(values)  
                values("ChangeRequestID") = item.GetDataKeyValue("ChangeRequestID")  
                values("Completed") = Int16.Parse(values("Completed"))  
                values("Accepted") = Int16.Parse(values("Accepted"))  
                values("Reviewed") = Int16.Parse(values("Reviewed"))  
                  
                For Each entry As DictionaryEntry In values  
                    SqlDataSource1.UpdateParameters(entry.Key.ToString()).DefaultValue = entry.Value.ToString()  
                Next  
                SqlDataSource1.Update()  
            End If 

And the grid:
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="True" 
              AllowAutomaticInserts="True" AllowAutomaticUpdates="True" OnItemCommand="RadGrid1_ItemCommand" Height="900px" PageSize="25" Skin="Black" DataSourceID="SqlDataSource1">  
            <PagerStyle Mode="Slider" /> 
 
            <MasterTableView CommandItemDisplay="Top" DataKeyNames="ChangeRequestID" AllowMultiColumnSorting="True" DataSourceID="SqlDataSource1" AllowFilteringByColumn="True">  
                <Columns> 
                    <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="Images/Update.gif" CommandName="UpdateRating" UniqueName="UpdateColumn" HeaderText="Update" /> 
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="Images/Edit.gif" HeaderText="Edit" /> 
                    <telerik:GridRatingColumn DataField="Accepted" UniqueName="Accepted" Precision="Item" ReadOnly="False" ItemCount="1" HeaderText="Accepted" AllowRatingInViewMode="true" /> 
                    <telerik:GridRatingColumn Datafield="Reviewed" UniqueName="Reviewed" Precision="Item" ReadOnly="False" ItemCount="1" HeaderText="Reviewed" AllowRatingInViewMode="true" /> 
                    <telerik:GridRatingColumn Datafield="Completed" UniqueName="Completed" Precision="Item" ReadOnly="False" ItemCount="1" HeaderText="Completed" AllowRatingInViewMode="true" /> 
                    <telerik:GridRatingColumn Datafield="Priority" UniqueName="Priority" Precision="Item" ReadOnly="false" ItemCount="5" HeaderText="Priority" AllowRatingInViewMode="false" /> 
                    <telerik:GridBoundColumn DataField="ChangeRequestID" UniqueName="ChangeRequestID" HeaderText="ID" Visible="false" /> 
                </Columns> 
                <EditFormSettings EditFormType="Template">  
                <EditColumn UniqueName="EditCommandColumn1" /> 
                    <FormTemplate> 
.... 

And the datasource:
<asp:SqlDataSource ID="SqlDataSource1" DataSourceMode="DataSet" runat="server" ConnectionString="<%$ ConnectionStrings:hldbConnectionString %>" 
             
              InsertCommand="INSERT INTO ChangeRequestTracker(Accepted, Completed, Reviewed, Priority) VALUES (0, 0, 0, @Priority)"   
                                          
              SelectCommand="SELECT * FROM ChangeRequestTracker ORDER BY ChangeRequestID DESC" 
                 
              UpdateCommand="UPDATE ChangeRequestTracker SET Priority=@Priority, Accepted=@Accepted, Reviewed=@Reviewed, Completed=@Completed  WHERE ChangeRequestID = @ChangeRequestID">  
              <UpdateParameters> 
                  <asp:Parameter Name="ChangeRequestID"/>  
                  <asp:Parameter Name="Priority"/>  
                  <asp:Parameter Name="Accepted"/>  
                  <asp:Parameter Name="Reviewed"/>  
                  <asp:Parameter Name="Completed"/>  
              </UpdateParameters> 
              <InsertParameters> 
                  <asp:Parameter Name="Priority"/>  
                  <asp:Parameter Name="Accepted"/>  
                  <asp:Parameter Name="Reviewed"/>  
                  <asp:Parameter Name="Completed"/>  
              </InsertParameters> 
          </asp:SqlDataSource> 

Iana Tsolova
Telerik team
 answered on 17 May 2010
2 answers
109 views
Hi buddies!

I'm facing a little problem with the RadGrid control.

I've got a simple RadGrid:
 <telerik:RadGrid ID="RadGrid1" runat="server"   OnNeedDataSource="RadGrid1_NeedDataSource"
     
    </telerik:RadGrid> 


When i use this code eveything works and the data is well displayed :

 Protected Sub RadGrid1_NeedDataSource(ByVal [source] As Object, _ 
         ByVal e As GridNeedDataSourceEventArgs) _ 
         Handles RadGrid1.NeedDataSource 
        Dim list As New ArrayList 
        list.Add("string1") 
        list.Add("string2") 
        list.Add("string3") 
        RadGrid1.DataSource = list 
 
     
 
    End Sub 
But when i try to use a custom class (Acontact) this is the class :

Public Class AContact 
    Private _name As String 
    Private _email As String 
 
 
 
 
    Public Property Name() As String 
        Get 
            Return _name 
        End Get 
        Set(ByVal value As String) 
            _name = Name 
        End Set 
    End Property 
 
    Public Property Email() As String 
        Get 
            Return _email 
        End Get 
        Set(ByVal value As String) 
            _email = Email 
        End Set 
    End Property 
 
 
 
 
End Class 

i try this, but the grid stays empty:

Protected Sub RadGrid1_NeedDataSource(ByVal [source] As Object, _ 
         ByVal e As GridNeedDataSourceEventArgs) _ 
         Handles RadGrid1.NeedDataSource 
        
 
        Dim maListe As New List(Of SABerni.Gateway.AContact) 
 
 
        Dim Contact1 As New SABerni.Gateway.AContact 
        Contact1.Name = "demo" 
        Contact1.Email = "emaildemo" 
 
        maListe.Add(Contact1) 
 
 
        RadGrid1.DataSource = maListe 
 
    End Sub 

Does anybody have an idea? Thanks a lot..

Nicolas







le N
Top achievements
Rank 1
 answered on 17 May 2010
6 answers
179 views

Hi,

I need to implement several level nested hierarchy with possibility to check (or select) multiple rows, but also whole groups or sub-groups of rows (let say that for rows of orders for customers from different countries I need to group every orders of each customer together and every customers from each country together and then be able to select multiple orders – one by one or every for selected customers or every for selected country – so that after selecting one subgroup, each row of this sub-group will be selected).

I would like to use grouping for this – but I was not able to simply add check-boxes in header lines.

<telerik:GridGroupByExpression>

        <SelectFields>

            <telerik:GridGroupByField FieldName="countryName" HeaderText=" <input type='checkbox' onClick='CountryRowSelecting()'> " />

        </SelectFields>

        <GroupByFields>

            <telerik:GridGroupByField FieldName="countryId" SortOrder="Descending" HeaderText="Country" />

        </GroupByFields>

</telerik:GridGroupByExpression>

<telerik:GridGroupByExpression>

        <SelectFields>

            <telerik:GridGroupByField FieldName="customerName" HeaderText=" <input type='checkbox' onClick='CustomerRowSelecting()'> " />

        </SelectFields>

        <GroupByFields>

            <telerik:GridGroupByField FieldName="customerId" SortOrder="Descending" HeaderText="Customer" />

        </GroupByFields>

</telerik:GridGroupByExpression>

But then I was not able to properly handle these events, I think there should be some easier way.

I was also trying hierarchical grid (but I would like it with grouping more), but there with multi-rows grouping, when I selected whole category, just one sub-level subcategories was selected (but I need it for each level- e.g. after selecting some country, each order for each customer from this country would be selected).

Does radgrid somehow enable this desired behaving?

Thanks

Jan

Iana Tsolova
Telerik team
 answered on 17 May 2010
2 answers
97 views

I have a rotator within a user control.  The content size of the screen is being set via JavaScript with scroll bars turned on.  The browser scroll bars are turned off so not to confuse the user with two sets.  The images within the rotator work just fine except for one major issue.  The image “hovers” over the page and does not position itself within the rotator.  Only when the browser scroll bars are active and the content scroll bars are turned off does the image behave correctly.  Attached is the code and any assistance would be greatly appreciated.

<telerik:RadRotator ID="thumbRotator" runat="server" RotatorType="ButtonsOver" Height="120px" Width="600px" ItemHeight="120px" ItemWidth="150px" FrameDuration="1" ScrollDuration="500" ScrollDirection="Left,Right" EnableEmbeddedSkins="false" OnItemClick="ShowImage">  
<ItemTemplate> 
<div style="text-align:center; padding:20px;">  
<asp:Image ID="imgRotator" runat="server" Height="50px" Width="50px" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"Source") %>' /> 
<br /> 
<%# DataBinder.Eval(Container.DataItem, "TypeDescription")%> 
<br /> 
(<%# DataBinder.Eval(Container.DataItem, "Size")%>)  
</div> 
</ItemTemplate> 
<ControlButtons LeftButtonID="img_left" RightButtonID="img_right" /> 
</telerik:RadRotator> 
 

Jeff
Top achievements
Rank 1
 answered on 17 May 2010
3 answers
534 views
How can i override/change just the font color of disabled textboxes. I am using radformdecorator and windows7 skin? I find the current font color too light. Thanks.
Petio Petkov
Telerik team
 answered on 17 May 2010
1 answer
80 views
I have a grid with a custom edit form with a tree view. When the custom edit form is loaded, the tree nodes are programatically created based on the grid row being edited. I also programatically select a node based on the grid row being edited. I need to have the tree view scrolled to the selected node when the edit form loads. I'm trying to implement the "selectedNode.scrollIntoView();" method, but I'm having trouble "finding" the tree view from the page that has the grid. Suggestions on how this can be accomplished?
Princy
Top achievements
Rank 2
 answered on 17 May 2010
4 answers
109 views
Hi

I'm implementing the TabStrip with RadMultipage. Each of the user controls has a grid which is refreshed with a timer. What I want to be able to do is turn off the relavent timers when I change the tab.

I hope this makes sense, I suppose the minimum I need is how to identify which tab was clicked from the user control (ascx page)

Andy
Yana
Telerik team
 answered on 17 May 2010
3 answers
333 views
Hi all (and thanks in advnace for your help),

I have a hyperlink set as follows:
<asp:HyperLink  
ID="HyperLink1" 
runat="server" 
NavigateUrl = "\\server\share\SomeDoc.doc>  
</asp:HyperLink> 
This works fine & is what the client wants. It opens the file "SomeDoc.doc" in MS Word.

Now the question. I have a table as follows:
"John""\\server\share\John.doc" 
"Mary""\\server\share\Mary.doc" 
etc...
 

I would like to use th RadGrid control with a HyperLink column so that the NavigateUrl is set to the UNC Path of the file in the table so when the user clicks the Hyperlink, the file "\\server\share\John.doc" opens up in MS Word.

I am have difficulty doing this.

Any ideas would be greatly appreciated.

Thanks, Kevin
Princy
Top achievements
Rank 2
 answered on 17 May 2010
4 answers
264 views
I'm using a single Windows 2008 server - not a web farm environment.  When I implement the captcha control in my application, everything works flawlessly in Internet Explorer (all versions).  However, when viewing my form in Firefox, sometimes all I get is a grey box.  When I click "Refresh Image", nothing happens.  This is only an issue in Firefox.

I have pasted the code control and parameters below, and have also attached a screenshot of the CAPTCHA properties window.  Please let me know of any other information you need from me to troubleshoot.

Thank you.

        <telerik:RadCaptcha ID="RadCaptcha1" Runat="server" ErrorMessage="You have entered an invalid code"
            ValidationGroup="Group" EnableRefreshImage="True"></telerik:RadCaptcha>

Pero
Telerik team
 answered on 17 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?