Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
47 views
hello sir
I Have A 200000 record in datatable.the datatable initalize the radgrid and page size is 100.then 100 record display then click on page number then the browser display message " Not Found WebPage.".
please solve this Problem
thenku
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Jan 2013
4 answers
175 views
HI,
I have a rad grid. I would like to do the following validations.
1) When the user changes the dropdown value, i want to clear the other row items.
2) when the user does not input any data in the textbox (txtTestId)and tries to insert/edit, i want to provide validation.

Below is the UI of the radgrid:
<telerik:RadGrid ID="radgrid1" runat="server" OnDeleteCommand="radgrid1_DeleteCommand"
                                    OnInsertCommand="radgrid1_InsertCommand" OnUpdateCommand="radgrid1_UpdateCommand"
                                    OnNeedDataSource="radgrid1_NeedDataSource" OnPreRender="radgrid1_PreRender"
                                    CellSpacing="0" GridLines="None" ShowStatusBar="True" 
                                    onitemdatabound="radgrid1_ItemDataBound" 
                                    onitemcommand="radgrid1_ItemCommand">
                                      
<MasterTableView DataKeyNames="TestId" AutoGenerateColumns="false" EditMode="InPlace"
                                        CommandItemSettings-ShowRefreshButton="false" CommandItemDisplay="TopAndBottom"
                                        CommandItemSettings-AddNewRecordText="Add New">
                                        <Columns>
                                            <telerik:GridEditCommandColumn ButtonType="ImageButton">
                                            </telerik:GridEditCommandColumn>
                                            <telerik:GridButtonColumn ConfirmText="Delete?" ConfirmDialogType="RadWindow"
                                                ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="100px"
                                                ConfirmDialogWidth="220px">
                                            </telerik:GridButtonColumn>
  
                                            <telerik:GridTemplateColumn HeaderText="Enter Id" DataField="TestName"
                                                UniqueName="TestName" Visible="true">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtTestName" runat="server" ReadOnly="true" Text='<%# Eval("TestName") %>' />
                                                    <asp:TextBox ID="txtTestId" ReadOnly="true" runat="server" Text='<%# Eval("TestId") %>'
                                                        Width="100px" />
                                                </ItemTemplate>
  
                                                <InsertItemTemplate>
                                                    <asp:DropDownList ID="ddlTestApp" runat="server">
                                                        <asp:ListItem Text="Java" Value="Java"></asp:ListItem>
                                                        <asp:ListItem Text="UIDesign" Value="UIDesign"></asp:ListItem>
                                                    </asp:DropDownList>
                                                    <asp:TextBox ID="txtTestId" runat="server" Width="100px"></asp:TextBox>
                                                    <asp:Button ID="btnInsertFetchData" runat="server" Text="Fetch Details" OnClick="btnInsertFetchData_Click" />
                                                </InsertItemTemplate>
  
                                                <EditItemTemplate>
                                                    <asp:DropDownList ID="ddlTestApp" runat="server" >
                                                       <asp:ListItem Text="Java" Value="Java"></asp:ListItem>
                                                        <asp:ListItem Text="UIDesign" Value="UIDesign"></asp:ListItem>
                                                    </asp:DropDownList>
  
                                                    <asp:TextBox ID="txtNetworkId" runat="server" Text='<%# Eval("TestId") %>'
                                                        Width="100px"></asp:TextBox>
                                                    <asp:Button ID="btnUpdateFetchData" runat="server" Text="Fetch Details" OnClick="btnUpdateFetchData_Click" />
                                                </EditItemTemplate>
                                            </telerik:GridTemplateColumn>
  
                                            <telerik:GridTemplateColumn DataField="FirstName" UniqueName="FirstName"
                                                Visible="true" HeaderText="First Name">
                                                <InsertItemTemplate>
                                                    <telerik:RadTextBox ID="RadtxtFirstName" runat="server" Text="" Width="100px">
                                                    </telerik:RadTextBox>
                                                </InsertItemTemplate>
                                                <EditItemTemplate>
                                                    <telerik:RadTextBox ID="RadtxtFirstName" runat="server" Text='<%# Eval("FirstName") %>'
                                                        Width="100px">
                                                    </telerik:RadTextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <telerik:RadTextBox ID="RadtxtFirstName" ReadOnly="true" runat="server" Text='<%# Eval("FirstName") %>'
                                                        Width="100px" />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
    </Columns>
                                    </MasterTableView>
                                    <ClientSettings EnableRowHoverStyle="true">
                                    </ClientSettings>
                                </telerik:RadGrid>

How to achieve this?
Thanks
Shinu
Top achievements
Rank 2
 answered on 08 Jan 2013
1 answer
136 views
I 've implemented a RadToolBar with some RadToolBarDropDown.
In IE and Firefox it works fine. Only with Google Chrome nothing happens when I click on the DropDown.
Have someone any idea whats wrong with the following code?


    <asp:Panel ID="pnlActions" CssClass="row clearfix" style="position: relative; height: 14px; margin-bottom: 15px" runat="server">
        <telerik:RadWindowManager ID="radWindowManager"
                                  Modal="true"
                                  VisibleStatusbar="false"
                                  Behaviors="Close"
                                  Height="600px"
                                  Width="600px"
                                  OnClientShow="radWindow_ClientShow"
                                  KeepInScreenBounds="true"
                                  runat="server" />
                                  
         <telerik:RadToolBar ID="rtbCultural"
                            CausesValidation="false"
                            AutoPostBack="true"
                            style="float: left"
                            Skin="D21Book"
                            EnableEmbeddedSkins="false"
                            OnButtonClick="rtbCultural_ButtonClick"
                            runat="server">
            <Items>
                <telerik:RadToolBarDropDown ImageUrl="/resources/images/flags/de-DE.gif" Text="SPRACHE [change]" />
                <telerik:RadToolBarDropDown Text="WAEHRUNG [change]" />
            </Items>
        </telerik:RadToolBar>
    </asp:Panel>
Boris
Top achievements
Rank 1
 answered on 08 Jan 2013
1 answer
153 views
Hi there,

is there any way i can debug (go through step by step) for automatic insert event??

the reason behind the question is that i have the following code snippet:
<telerik:RadPageView ID="pvSitePlan" runat="server">
            <telerik:RadGrid ID="rgSitePlans" runat="server" CellSpacing="0" GridLines="None"
                DataSourceID="edsSitePlans" AutoGenerateDeleteColumn="True" AllowAutomaticUpdates="True"
                AllowAutomaticDeletes="True" Skin="WebBlue" AllowAutomaticInserts="True" AutoGenerateEditColumn="True"
                AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" ShowFooter="true">
                <MasterTableView DataSourceID="edsSitePlans" AutoGenerateColumns="False" DataKeyNames="id"
                    CommandItemDisplay="Top">
                    <CommandItemSettings AddNewRecordText="Add Site Plan" ExportToPdfText="Export to PDF">
                    </CommandItemSettings>
                    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="name" FilterControlAltText="Filter name column"
                            HeaderText="Name" SortExpression="name" UniqueName="name">
                        </telerik:GridBoundColumn>
                        <%--<telerik:GridBoundColumn DataField="Building.name" FilterControlAltText="Filter Building column"
                            HeaderText="Building" SortExpression="building.name" UniqueName="building.name">
                        </telerik:GridBoundColumn>--%>
                        <telerik:GridBoundColumn DataField="showInMobile" FilterControlAltText="Filter Mobile column"
                            HeaderText="Show In Mobile" SortExpression="showInMobile" UniqueName="showInMobile">
                        </telerik:GridBoundColumn>
                        <telerik:GridHyperLinkColumn DataTextFormatString="Edit Mapping" DataTextField="id"
                            DataNavigateUrlFields="id" UniqueName="editLink" DataNavigateUrlFormatString="SiteMapMapping.aspx?id={0}"
                            HeaderText="Edit">
                        </telerik:GridHyperLinkColumn>
                    </Columns>
                    <EditFormSettings EditFormType="Template">
                        <FormTemplate>
                            <table cellpadding="0" cellspacing="0" class="dataView">
                                <tr>
                                    <td colspan="4">
                                        <asp:Button ID="btnInsertSitePlan" runat="server" CommandName="Insert" Text="Add" />
                                        <asp:Button ID="Button4" runat="server" CommandName="Update" Text="Update" />
                                        <asp:Button ID="Button5" runat="server" CommandName="Cancel" Text="Cancel" CausesValidation="false" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label73" runat="server" SkinID="viewDataLabel">
                                    Name:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox21" Text='<%# Bind("name") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label19" runat="server" SkinID="viewDataLabel">
                                    Show In Mobile:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <uc1:CheckBoxControl ID="CheckBoxControl2" runat="server" Checked='<%# Bind("showInMobile") %>' />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label86" runat="server" SkinID="viewDataLabel">
                                    Building:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <telerik:RadComboBox ID="RadComboBox3" runat="server" DataSourceID="edsBuildings"
                                            DataTextField="name" DataValueField="id" SelectedValue='<%#Bind("buildingId") %>'
                                            EmptyMessage="--Please Select--" AppendDataBoundItems="true">
                                            <Items>
                                                <telerik:RadComboBoxItem Text="Select a Building" />
                                            </Items>
                                        </telerik:RadComboBox>
                                    </td>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label87" runat="server" SkinID="viewDataLabel">
                                    Type:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <%--  <asp:TextBox ID="TextBox34" Text='<%# Bind("PlanType") %>' runat="server">
                                        </asp:TextBox>--%>
                                        <telerik:RadComboBox ID="rcbSitePlanType" runat="server" DataSourceID="odsSitePlan_Type"
                                            DataTextField="Text" DataValueField="Value" AppendDataBoundItems="true" SelectedValue='<%# Bind("PlanType") %>'>
                                        </telerik:RadComboBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label74" runat="server" SkinID="viewDataLabel">
                                    Refresh Frequency:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox22" Text='<%# Bind("refreshFrequency") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label75" runat="server" SkinID="viewDataLabel">
                                    Status Transparency:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox23" Text='<%# Bind("unitTransparency") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label76" runat="server" SkinID="viewDataLabel">
                                    Image URL:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox24" Text='<%# Bind("imageUrl") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label77" runat="server" SkinID="viewDataLabel">
                                    Unit Cell Width:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox25" Text='<%# Bind("tableCellWidth") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label78" runat="server" SkinID="viewDataLabel">
                                    Select Color:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox26" Text='<%# Bind("mobileSelectColor") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label79" runat="server" SkinID="viewDataLabel">
                                    Available Color:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox27" Text='<%# Bind("mobileAvailableColor") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label80" runat="server" SkinID="viewDataLabel">
                                    Pre-Reserved Color:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox28" Text='<%# Bind("mobilePreReservedColor") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label81" runat="server" SkinID="viewDataLabel">
                                    Sold Color:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox29" Text='<%# Bind("mobileSoldColor") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label82" runat="server" SkinID="viewDataLabel">
                                    Show Interest:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <uc1:CheckBoxControl ID="CheckBoxControl31" runat="server" Checked='<%# Bind("showInterest") %>' />
                                    </td>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label83" runat="server" SkinID="viewDataLabel">
                                    Interest Radius:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox31" Text='<%# Bind("interestRadius") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label84" runat="server" SkinID="viewDataLabel">
                                    Interest Transparency:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox30" Text='<%# Bind("interestTransparency") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                    <td class="dataLabel">
                                        <asp:Label ID="Label85" runat="server" SkinID="viewDataLabel">
                                    Interest Color:</asp:Label>
                                    </td>
                                    <td class="dataField">
                                        <asp:TextBox ID="TextBox32" Text='<%# Bind("interestColor") %>' runat="server">
                                        </asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4">
                                        <asp:Button ID="btnInsertSitePlan2" runat="server" CommandName="Insert" Text="Add" />
                                        <asp:Button ID="Button3" runat="server" CommandName="Update" Text="Update" />
                                        <asp:Button ID="Button10" runat="server" CommandName="Cancel" Text="Cancel" CausesValidation="false" />
                                    </td>
                                </tr>
                            </table>
                        </FormTemplate>
                    </EditFormSettings>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>
        </telerik:RadPageView>

and i'm kinda suspicious that the insert event does not fired,

there is no onItemCommand or onEditCommand in the code behind yet the edit process is working smoothly..
can someone enlight me about this?
Nahwin
Top achievements
Rank 1
 answered on 08 Jan 2013
1 answer
206 views
Hi All,

Can i have feature like "Virtual scrolling and paging" in RadListView similar to RadGrid?
I have large amount of data to bind with ListView and it is taking too long to bind.
Is there any option for lazy binding data when user scroll within listview?(server side)

Thanks,
Dipal
Princy
Top achievements
Rank 2
 answered on 08 Jan 2013
3 answers
203 views
Hi all,

I have a RadGrid. I need to give tooltip for each cell in the Grid. How can I do that?

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 08 Jan 2013
4 answers
208 views
Hello Telerik Team

Hope you are doing great.

I am looking for Drag and Drop Cell in Asp.net MVC Data grid.

I have gone through telerik Datagrid , but i could not success.

Can you please provide sample or approach for drag and drop Cell data in Asp.net MVC Data grid.

It is very Urgent
Princy
Top achievements
Rank 2
 answered on 08 Jan 2013
1 answer
195 views
Hi,

We have recently updated telerik controls. Earlier We were using 2009 version. Now we updated to 2012 3.5 version. After Updating the telerik treeview controls and applying skins, there are lot of gap between two nodes. Earlier it was not like that. It was having proper gaps between two nodes. As we have around 500 nodes, Height of page is now increased and user has to scroll for getting desired node.

Can you provide us the proper skin\stylesheet which will minimize the gap between two nodes?

Thanks,
Ankit Trivedi
Princy
Top achievements
Rank 2
 answered on 08 Jan 2013
1 answer
161 views
Community,

I have a RadGrid that I define my columns. Most of them are visible and read only; however, a few are updated. I also have a few columns that are not visible. I use these in my SQL update as my primary key. When you enter the RadGrid I automatically enable edit in every row of the entire grid for the editable columns. When a user is done doing a bulk update, they click my Update All button and the following code is ran:

protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        if (e.CommandName == "EditAll")
        {
            foreach (GridItem item in RadGrid1.MasterTableView.Items)
            {
                if (item is GridEditableItem)
                {
                    GridEditableItem editableItem = item as GridDataItem;
                    editableItem.Edit = true;
                }
            }
        }
        if (e.CommandName == "UpdateAll")
        {
            //-- foreach (GridEditableItem editedItem in RadGrid1.EditItems)
            foreach (GridDataItem dataItem in RadGrid1.MasterTableView.Items)
            {
                Hashtable newValues = new Hashtable();
                e.Item.OwnerTableView.ExtractValuesFromItem(newValues, dataItem);
                SqlDataSource1.UpdateCommand = String.Format("UPDATE MY_TABLE SET AOScan_Num='{0}', PLANNED_REMEDIATION_STATUS_ID='{1}', " +
                    "ServiceNow_Num='{2}', TICKET_CREATION_DATE='{3}' WHERE QID='{4}' AND IP='{5}' AND PORT='{6}'",
                    newValues["AOScan_Num"], 
                    newValues["PLANNED_REMEDIATION_STATUS_ID"], 
                    newValues["ServiceNow_Num"], 
                    newValues["TICKET_CREATION_DATE"],
                    dataItem["QID"].Text, 
                    dataItem["IP"].Text, 
                    Convert.ToInt32(dataItem["PORT"].Text));
                SqlDataSource1.Update();
                dataItem.Edit = false;
            }
        }
        RadGrid1.Rebind(); 
    }

The problem I am running into is, when my code executes the SQL it returns the correct values from RadGrid for each row; however, the fields that are not visible and not editable are empty instead of holding the correct value. I was hoping someone has an idea of what might be going on.

Kind Regards,

Ben
Shinu
Top achievements
Rank 2
 answered on 08 Jan 2013
1 answer
97 views

Hi there,

At the moment I am using both the auto-generated edit form and the FormTemplate for my grid.
When I use the FormTemplate I want to have the update and cancel buttons the same skin for the buttons as the ones from the auto-generated edit form.


At the moment I use the code below inside the FormTemplate for the Cancel button.
Is there a way the button does not use the ImageUrl="~/Images/Cancel.gif" property but the skin set of my project?

Regards,

Marcel

 

<asp:ImageButton ID="ibCancel"
ImageUrl="~/Images/Cancel.gif"                                              
runat="server" Text="Cancel" CausesValidation="false" CommandName="Cancel" />

Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?