Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
891 views
Hello,

Could you please advise? I get this error when trying to run my webpage.

The RadGrid code is:

<telerik:RadGrid ID="gridSurveys" runat="server" AutoGenerateDeleteColumn="True" AllowAutomaticInserts="True" AutoGenerateEditColumn="True" OnNeedDataSource="gridSurveys_NeedDataSource" OnItemDataBound="gridSurveys_ItemDataBound" AutoGenerateColumns="False" CellSpacing="-1" GridLines="Both">
    <MasterTableView>
        <Columns>
            <telerik:GridBoundColumn DataField="VesselDescription" HeaderText="Vessel" UniqueName="VesselDescription" ReadOnly ="true"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="VesselID" DataType="System.Int32" FilterControlAltText="Filter VesselID column" HeaderText="VesselID" SortExpression="VesselID" UniqueName="VesselID" Visible="false" ReadOnly="True"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CruiseID" DataType="System.Int32" FilterControlAltText="Filter CruiseID column" HeaderText="Cruise" SortExpression="CruiseID" UniqueName="CruiseID" ReadOnly="True"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Year" DataType="System.Int32" FilterControlAltText="Filter Year column" HeaderText="Year" ReadOnly="True" SortExpression="Year" UniqueName="Year"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Amalgamation" HeaderText="Amalgamation" ReadOnly="True" UniqueName="Amalgamation" Visible ="false"></telerik:GridBoundColumn>
            <telerik:GridDropDownColumn DataField="TargetSurveyDescription" HeaderText="Target Survey" ListTextField="TargetSurveyDescription" ListValueField="TargetSurveyID" UniqueName="TargetSurveyDescription" ColumnEditorID="TargetSurveyDescription" DropDownControlType="DropDownList" Visible="false"></telerik:GridDropDownColumn>
            <telerik:GridBoundColumn DataField="TargetSurveyID" DataType="System.Int32" HeaderText="TargetSurveyID" UniqueName="TargetSurveyID" ReadOnly="true" Visible ="false">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    </telerik:RadGrid>

And my VB.NET code for binding the dropdownlist is:

Protected Sub gridSurveys_ItemDataBound(sender As Object, e As GridItemEventArgs) Handles gridSurveys.ItemDataBound
       ' Build up the Target Survey dropdown
       Dim editItemTargetSurvey As GridEditableItem = DirectCast(e.Item, GridEditableItem)
       Dim editManagerTargetSurvey As GridEditManager = editItemTargetSurvey.EditManager
       Dim editorTargetSurvey As GridDropDownListColumnEditor = DirectCast(editManagerTargetSurvey.GetColumnEditor("TargetSurveyDescription"), GridDropDownListColumnEditor)
       Dim dsTargetSurvey As New DSSurveyTableAdapters.spGetTargetSurveyTableAdapter
       Dim selectedTargetSurvey As Integer = DataBinder.Eval(editItemTargetSurvey.DataItem, "TargetSurveyID")
       Dim rComboBoxTargetSurvey As DropDownList = editorTargetSurvey.DropDownListControl
       ' Set the width of the dropdown
       rComboBoxTargetSurvey.Width = Unit.Pixel(165)
       ' Populate the dropdown
       rComboBoxTargetSurvey.DataTextField = "TargetSurveyDescription"
       rComboBoxTargetSurvey.DataValueField = "TargetSurveyID"
       rComboBoxTargetSurvey.DataBind()
       rComboBoxTargetSurvey.SelectedValue = selectedTargetSurvey
   End Sub
Eyup
Telerik team
 answered on 05 Feb 2015
2 answers
331 views
I have created a ListView that uses the Datapager, and have set them up as follows:

<telerik:RadListView ID="RadListImageAsset" ItemPlaceholderID="ImageAssetContainer" runat="server" AllowPaging="true" Width="100%">

</telerik:RadListView>
 
and 

<telerik:RadDataPager EnableEmbeddedSkins="false" ID="RadDataPager1"
                                            runat="server" PagedControlID="RadListImageAsset" PageSize="10">
                                            <Fields>
                                                <telerik:RadDataPagerPageSizeField PageSizeText="Show Results: " PageSizeComboWidth="40" />
                                                <telerik:RadDataPagerGoToPageField HorizontalPosition="RightFloat"  />
                                                <telerik:RadDataPagerButtonField FieldType="Numeric" HorizontalPosition="RightFloat" />
                                            </Fields>
</telerik:RadDataPager>

However, my RadDataPagerButtonField and RadDataPagerGoToPageField do not work. Only the RadDataPagerPageSizeField works when I increase or decrease the number of dataitems to be displayed. Does anyone have any ideas about what may be causing the Datapager not to work when I want to view the next page using the GoTopageField and ButtonField.

The datasource is being set each time, but the control isnt displaying the appropriate page.

Please let me know if you need me to provide anything.

Thanks,
Akin
Meet
Top achievements
Rank 1
 answered on 05 Feb 2015
6 answers
114 views
Hi,

I am having 50 columns in a row. In this 5 are frozen columns. When i am scrolling to end, suddenly scrollbar length increases and i can't scroll upto last column.I set width for each column.

The other problem is while scrolling at end suddenly scrollbar moves to start position.

Regards
Vignesh
Pavlina
Telerik team
 answered on 05 Feb 2015
5 answers
320 views
Hello Admins,

I'm having a location grid user control. Each grid item contains check boxes. I can select the multiple check boxes  and delete all at once when i click on the link button which i have defined. Everything is working fine. But, if i don't select any of the checkboxes to delete or there is no data in the grid, how to do the client side validation for this scenario. Please help me in this regard.

And also whenever i select any check boxes, post back is happening. How to overcome this problem as well.

My checkbox code:
   <telerik:GridTemplateColumn UniqueName="CheckboxId"  HeaderText="View"  DataField="View" > 
                             <ItemTemplate> 
                                 <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true"/>  
                            </ItemTemplate> 
                          </telerik:GridTemplateColumn>

My checkbox code behind:

foreach (GridDataItem item in rgLocations.MasterTableView.Items)
                {
                    
                    chk = (CheckBox)item.FindControl("CheckBox1");
                    if (!chk.Checked)
                    {
                        DataRow newRowAdd = myDataTable.NewRow();
                        newRowAdd["Id"] = item["Id"].Text;
                        newRowAdd["Name"] = item["Name"].Text;
                        newRowAdd["CTID"] = item["CTID"].Text;
                        myDataTable.Rows.Add(newRowAdd);
                        myDataTable.AcceptChanges();
                    }
                }
                rgLocations.DataSource = myDataTable.DefaultView;
                rgLocations.Rebind();

My link button code:
<asp:LinkButton ID="lnkDeleteLoc" runat="server" OnClick="lnkDeleteLoc_Click">Delete the Location(s)</asp:LinkButton>
Eyup
Telerik team
 answered on 05 Feb 2015
2 answers
201 views
Is there any way to get the creation date of a file on upload? The control only exposes the last modified field not the creation date. I don't really understand why this is. Is this at all possible? It is a requirement for a project. Thanks for any help.
Hristo Valyavicharski
Telerik team
 answered on 05 Feb 2015
2 answers
108 views
Hi,

I am using the following RadToolBarSplitButton declaration:

<telerik:RadToolBarSplitButton runat="server" Value="textColor">
                        <Buttons>
                            <telerik:RadToolBarButton runat="server" Text="Black" Value="#text#000000" ImageUrl="Images/Navvia/standard_color_black_16x16.png">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="White" Value="#text#ffffff" ImageUrl="Images/Navvia/standard_color_white_16x16.png">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Dark Red" Value="#text#cc0000" ImageUrl="Images/Navvia/standard_color_dark_red_16x16.png">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Red" Value="#text#ff0000" ImageUrl="Images/Navvia/standard_color_red_16x16.png">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Orange" Value="#text#ffcc00" ImageUrl="Images/Navvia/standard_color_orange_16x16.png">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Yellow" Value="#text#ffff00" ImageUrl="Images/Navvia/standard_color_yellow_16x16.png">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Light Green" Value="#text#99cc66" ImageUrl="Images/Navvia/standard_color_light_green_16x16.png">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Green" Value="#text#009966" ImageUrl="Images/Navvia/standard_color_green_16x16.png">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Light Blue" Value="#text#0099ff" ImageUrl="Images/Navvia/standard_color_light_blue_16x16.png">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Blue" Value="#text#0066cc" ImageUrl="Images/Navvia/standard_color_blue_16x16.png">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Dark Blue" Value="#text#003366" ImageUrl="Images/Navvia/standard_color_dark_blue_16x16.png">
                            </telerik:RadToolBarButton>
                            <telerik:RadToolBarButton runat="server" Text="Purple" Value="#text#663399" ImageUrl="Images/Navvia/standard_color_purple_16x16.png">
                            </telerik:RadToolBarButton>
                        </Buttons>
                    </telerik:RadToolBarSplitButton>

When I select an item from the dropdown, the corresponding image is placed in the splitbutton automatically.

I would like to place a "different" image in the splitbutton (not the one from the child item).

I have tried the following in the OnClientButtonClicked event handler, but it does nothing:

var toolBar = $find("<%=RadToolBar1.ClientID%>");
var textColorButton = toolBar.get_items().getItem(16);
textColorButton.set_imageUrl('Images/Navvia/text_color_16x16.png');

I know I have the right index (16), because when I bump it to 17 I see the desired image appear in the next toolbar button.

Any suggestions?

Thanks in advance.

Jim
Nencho
Telerik team
 answered on 05 Feb 2015
1 answer
67 views
Hi all,
I am able to click only on the text area of radcombo box.
But the requirement is it should be easy enough to click on any area in the radcombo box. if i try this in a separate solution it is working. 
but not with in my project.
i am perplexed. please help.

-Thanks
Gayathri
Nencho
Telerik team
 answered on 05 Feb 2015
0 answers
112 views
Dear friends,
How to add Infragistics WebDateChooser inside our RadGrid.

I have added it inside GridTemplateColumn. But that control is not getting enabled in edit mode.

So please help me in this.

Thanks.

Regards,
Rajendran
Raj
Top achievements
Rank 1
 asked on 05 Feb 2015
16 answers
500 views

I have a radgrid that has Hide/Unhide feature via theContextMenu, basically I have EnableHeaderContextMenu="true".When I right click on the Header bar the RadMenu is shown with all myColumns. I can check/uncheck and the column appears and disappears respectively.  Also I have about 20 columns therefore I havea horizontal scrollbar. Finally I have a frozen column, say column 3 (Store Name).

The problem is when I hide column 4 (called Region) and move the scrollbar to the nextcolumn called Status (District will scrolloff the Grid which is GREAT) and scroll back left, than the District column is lost or notdisplayed. If I click the next page button it will reappear but as soon as Imove the scrollbar to right to the next column (Status) and back than theDistrict is lost.

Note: These are some of the column names

Detail, Store, Store Name, Region, District, Status 

Just take the Frozen column online live demo and set EnableHeaderContextMenu="true"  in the MasterTableView smart tag and hide a column after the frozen column. Next just move the scrollbar to right and back to the left to recreate the problem.

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/frozencolumns/defaultcs.aspx


Pavlina
Telerik team
 answered on 04 Feb 2015
3 answers
143 views
I have page named change Summary where I have a radcombobox named " Change Level " .

Currently we are facing a weird issue where in the radcombobox ( " Change Level " ) is getting disabled on click of button save event.I have attached the aspx and .cs file for your reference. During the initial analysis, I found that the items are not getting binded again so I tried to bind the items to the dropdown again.I ran Fiddler and it appears that the items are still being pushed to the page.

Now that I try to look at it more, it appears that they may still be there, but are being moved to different areas of the page and sometimes are not always in the same location. This may explain why it appears that they weren't where they should be before.I do see that a JavaScript error is occurring in the console, but it’s difficult to track back to exactly what might be causing it. It could be something in the Telerik code.

That error may be keeping the drop down from working the way that it should since a JavaScript error can cause other JavaScript after it to not run.
Nencho
Telerik team
 answered on 04 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?