Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
151 views
I'm wondering how can I resolve this problem?

I've written this piece of code to select row items on My RadGrid Control, which has the following select parameters...

SelectCommand="SELECT CityPinnacleDeals.DealID, CityPinnacleDeals.UserID FROM CityPinnacleDeals WHERE (CityPinnacleDeals.DealCategory <> 13) ORDER BY CityPinnacleDeals.DealID DESC"

The statement is valid and selecting the appropriate data, the RadGrid has created all the selected columns

RadGrid DataKeyNames="UserID, DealID"

The Code for selecting the rows is contained in the Linkbutton or Imagebutton Click event (both buttons are components of Template Columns added to the RadGrid Control) and is written thus...

Image Button
Protected Sub SelectGadgetFilterTwo_Click(ByVal sender As Object, ByVal e As System.EventArgs)




CType(CType(sender, ImageButton).Parent.Parent, GridItem).Selected = CType(sender, ImageButton).Visible
        RadGridFilterTwo_SelectedIndexChanged(sender, e)


End Sub

Link Button
Protected Sub SelectGadgetFilterTwo_Click(ByVal sender As Object, ByVal e As System.EventArgs)

CType(CType(sender, LinkButton).Parent.Parent, GridItem).Selected = CType(sender, LinkButton).Visible
        RadGridFilterTwo_SelectedIndexChanged(sender, e)


End Sub

The ImageButton contains images, while the Linkbutton contains the names of the displayed images, when either of the buttons is clicked, users are expected to be redirected to another page with the following code...,

Protected Sub RadGridFilterTwo_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGridFilterTwo.SelectedIndexChanged
       
Dim MyGadgetID As Integer = RadGridFilterTwo.SelectedItems(0).OwnerTableView.DataKeyValues(RadGridFilterTwo.SelectedItems(0).ItemIndex)("DealID")

Dim MyGadgetUserID As Integer = RadGridFilterTwo.SelectedItems(0).OwnerTableView.DataKeyValues(RadGridFilterTwo.SelectedItems(0).ItemIndex)("UserID")

Response.Redirect("GadgetsHome.aspx?.diresu=" & Str(StaffNumber.Text) & "&.diresulead=" & MyGadgetUserID & "&.dilead=" & MyGadgetID)


End Sub

but I keep receiving the error message...

"UserID is neither a DataColumn nor a DataRelation for table DefaultView"


Now I'm wondering how can I resolve this problem?



Pavlina
Telerik team
 answered on 27 Jan 2010
2 answers
147 views
I have a grid with the following columns

<telerik:GridCheckBoxColumn DataField="Dhcp" HeaderText="DHCP"></telerik:GridCheckBoxColumn>    
<telerik:GridBoundColumn DataField="Address" HeaderText="Address"></telerik:GridBoundColumn>    
<telerik:GridBoundColumn DataField="Mask" HeaderText="Mask" ></telerik:GridBoundColumn>    
<telerik:GridBoundColumn  DataField="Gateway" HeaderText="Gateway" ></telerik:GridBoundColumn>    
    
 


in ItemCreate of the grid I add CustomValidators to the edit controls contained in the columns: Address, Mask, and Gateway.

In the static ServerValidate handler, I need to be able to determine the current value of the GridCheckboxColumn, DHCP. 

How would I go about finding that value?

Thanks,
Steve
Steve Wolfe
Top achievements
Rank 1
 answered on 27 Jan 2010
2 answers
184 views
I have a grid that has the following column definition:

            <telerik:GridCheckBoxColumn DataField="Dhcp" HeaderText="DHCP"></telerik:GridCheckBoxColumn> 
            <telerik:GridBoundColumn DataField="Address" HeaderText="Address"></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Mask" HeaderText="Mask" ></telerik:GridBoundColumn> 
            <telerik:GridBoundColumn  DataField="Gateway" HeaderText="Gateway" ></telerik:GridBoundColumn> 
 

I want to add a client side click handler to the DHCP CheckBox column.  Inside the handler I want to be able enable/disable all of the other GridBoundColumns based on whether or not the CheckBox is checked or not.

So a couple of questions:
  1. How do you add a client side event handler to the GridCheckBoxColumn
  2. How do you access the edit controls of the GridBoundColumns in that event handler.

Thanks,
Steve

Steve Wolfe
Top achievements
Rank 1
 answered on 27 Jan 2010
5 answers
241 views
I just installed a new skin designed by our graphic designer using Visual Style Builder.  It works great except for the icons that enable you to move from page to page, which are missing.  Any ideas?  I'm attaching a screenshot of what I see along with the zip file generated by VSB.

Thanks.

Laurie
Dimo
Telerik team
 answered on 27 Jan 2010
5 answers
121 views
I deployed the rad editor solution and everything went fine. However, when using the image manager, the users are unable to upload new images. The 'Upload Image' tab is disabled. How can we resolve this so our users will be able to upload images? Thanks
Stanimir
Telerik team
 answered on 27 Jan 2010
1 answer
129 views
Hi,

I'm trying to create a simple inline edit template, but when I double-click on an appointment in the Scheduler I seem to get some default appointment editing dialog with "Save" and "Cancel" buttons near the bottom right-hand corner.

Here is the code I'm using:
        <telerik:RadScheduler runat="server" ID="RadScheduler1" 
            Width="750px" 
            Height="650px" 
            SelectedView="MonthView"  
            FirstDayOfWeek="Monday"  
            LastDayOfWeek="Friday"             
            SelectedDate="2008-06-01" 
            StartInsertingInAdvancedForm="false" 
            EnableCustomAttributeEditing="true"  
            ProviderName="ReadOnlySchedulerData"  
            OnAppointmentDataBound="RadScheduler1_AppointmentDataBound">     
                 <InlineEditTemplate> 
                   <div id="InlineEditTemplate" class=""
                        
                       <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Subject") %>' Width="90%" TextMode="MultiLine" Height="20px"></asp:TextBox> 
                  
                       <asp:LinkButton ID="InsertButton" runat="server" CommandName="Update" Text="Cancel"></asp:LinkButton> 
                  
                       <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel"></asp:LinkButton> 
                  
                       <asp:LinkButton ID="InsertMoreButton" runat="server" CommandName="More" CssClass="rsAdvancedEditLink">Advanced</asp:LinkButton> 
                    
                   </div> 
                </InlineEditTemplate>                    
        </telerik:RadScheduler>             
 
Can someone tell me what I'm doing wrong?

Thanks,
Greg


Shinu
Top achievements
Rank 2
 answered on 27 Jan 2010
1 answer
124 views
Hi,

I'm using the Radgrid in some projects. I defined that i can eidt the items inline in the radgrid.

I pass from one field to the next one with the tab button. When I reach the last field, I would like to hit enter and that the row get saved.

To save, I have a method in the code behind.

How can I setup the grid to call the code behind saving method when enter get pressed?

I would like that it react like in SQL server management studio for example, passing from field to field with tab, and enter to save the data at the end of the line.

Is it possible with the grid? How can I do that?

Thanks already for xour help

Cheers,

R.
Shinu
Top achievements
Rank 2
 answered on 27 Jan 2010
4 answers
159 views

Setting a custom skin on a datapager integrated into a radlistview control fails when the control renders the RadDataPagerButtonFields since it can't find any custom skin for the controls.

<telerik:RadDataPager ID="ListViewPager" EnableEmbeddedSkins="false" Skin="Custom" ...> 
  <Fields> 
<telerik:RadDataPagerButtonField FieldType="FirstPrev" /> 
<telerik:RadDataPagerButtonField FieldType="Numeric" /> ... 

Is there a way to control the pagers skin/css without the RadDataPagerButtonFields underlying controls inherits the custom skin of the datapager?

Best regrads
Søren Denmark
Eliza Sahoo
Top achievements
Rank 1
 answered on 27 Jan 2010
7 answers
188 views
I've used the following desing for the InlineInsert.

<InlineInsertTemplate> 
        <div id="InlineInsertTemplate" class="rsCustomAppointmentContainer"
            <asp:Label ID="lblTitle" runat="server" Text="Add New Appointment"></asp:Label>  
            <hr /> 
            <table cellspacing="5" width="400px"
            <tr> 
            <td><asp:Label ID="lblSubject" runat="server" Text="Title"></asp:Label> </td> 
            <td><Telerik:RadTextBox ID="txtInlineInsertTitle" runat="server" Width="150px" Text='<%# Bind("Subject") %>'></Telerik:RadTextBox></td
            </tr> 
            <tr> 
            <td><asp:Label ID="lblList" runat="server" Text="Source List"></asp:Label> </td> 
            <td><Telerik:RadComboBox ID="cbxInlineInsertLists" runat="server"></Telerik:RadComboBox></td
            </tr> 
            <tr> 
            <td align="center"
            <asp:Button ID="btnInlineInsert" runat="server" Text="Add" CommandName="inlineInsert" ValidationGroup="grpInlineInsert" /> 
            &nbsp;&nbsp;&nbsp;&nbsp; 
            <asp:Button ID="btnInlineCancel" runat="server" Text="Cancel" CommandName="inlineCancel" /> 
            </td> 
            </tr> 
            <tr> 
            <td colspan="2"
            <asp:RequiredFieldValidator ID="rfvTitle" runat="server" Display="dynamic" ControlToValidate="txtInlineInsertTitle" Text="Title cannot be empty" ValidationGroup="grpInlineInsert" /> 
            </td> 
            </tr> 
            </table> 
        </div> 
    </InlineInsertTemplate> 

Check out the attachments for the rendering problem.


NLV
Top achievements
Rank 1
 answered on 27 Jan 2010
2 answers
165 views
I have a RadGrid with 3 columns defined in markup.  The remaining X number of columns are auto-generated.  Auto-generated columns are always added to the right of the grid appearing after the 3 pre-defined columns.  Is it possible to have the auto-generated columns inserted into a specific column position?  Or is there an event that knows when the last auto-generated column was added, so I can then programmatically add one or more pre-defined columns?  To date, I have used SwapColumns method to move 2 predefined columns to the right-side of the grid, but I have a scenario where that may not work.  TIA, Gary.
Gary
Top achievements
Rank 2
 answered on 26 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?