Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
39 views
Hi,

I recently updated the telerik ASP.NET AJAX controls to 2011.1.519.35. The themes for RadTreeView and RadTabStrip  don't show up correctly in debug mode in IE. In release mode and in other browsers it shows up well. Can any one help meout thank you.

Thank you.
s
Top achievements
Rank 1
 asked on 20 Jul 2011
1 answer
112 views
Hi,

I am D.Srinivasa

in my project i have a  RadTreeView  to display a data from DataBase. when i expand a Radtree view parent node then it checks the condition successfully. if the condition satisfies then i want to display a button in my  page. but in my logic it check the condition successfully but it doesn't display the Button in the Page. Button default state is Visible =False.

The following is the code for RadNodeExpand()

Protected Sub RadTreeView1_NodeExpand(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.NodeExpand
PopulateNodeOnDemands(e, TreeNodeExpandMode.ServerSideCallBack)
    End Sub



Protected Function PopulateNodeOnDemands(ByVal e As RadTreeNodeEventArgs, ByVal expandMode As TreeNodeExpandMode) As TreeNodeExpandMode
Dim data As DataTable = GetChildNode(e.Node.Value)
Dim message As String = ""
For Each row As DataRow In data.Rows
Dim node As New RadTreeNode()
node.Text = row("child_code").ToString()
node.Value = row("child_id").ToString()
'node.ExpandMode = expandMode
If row("job_status").ToString() = "NS" Then
Button.Visible=True
node.BackColor = Color.LightSkyBlue
message = message.ToString() + node.Text
MsgBox(message.ToString())
End If
e.Node.Nodes.Add(node)
Next
e.Node.Expanded = True
End Function

Please Help How can i display the Button Dynamically..

Thank You
D.Srinivas
Nikolay Tsenkov
Telerik team
 answered on 20 Jul 2011
1 answer
84 views
I put a menu control in a pane which has a height of 30px. When I click on the menu the dropdown is cut of by the boarder of the pane.
I tried to set the z-index but it didn't work. It doesn't happen with a normal combobox.

How can I fix this?

Thanks in advance ...
Kate
Telerik team
 answered on 20 Jul 2011
3 answers
116 views
Hi,

My solution not allow to open Popup as javascript with call the <%  %> expressions. I'm work with one Usercontrol inside masterpage. How to open showpopup for Date and Time picking as codebehind not javascript?

System.Web.HttpException: La collection Controls ne peut pas être modifiée, car le contrôle contient des blocs de code (c'est-à-dire <% ... %>).

Not workking expressions in my solution

<script type="text/javascript">
          function OnOpen1()
          {
                     <%= RadDatePicker1.ClientID %>.ShowPopup();
            var datePicker = $find("<%= RadDatePicker1.ClientID %>"); 
            datePicker.get_selectedDate();  */
         }
              

Iana Tsolova
Telerik team
 answered on 20 Jul 2011
1 answer
150 views
Hi,


I am using Radgrid control for my custom Grid control. I am simply wrapping all the properties to RadGrid control internally.
So i wrapped 'AllowAutomaticUpadates' property also.

When i am using my custom grid and set the 'AllowAutomaticUpadates' property from Property window as 'True', The below Bold and Italian font code adding to design code:

 

 

<CSP:CSPGrid ID="ClientiGrid" runat="server" AutoGenerateColumns="False" AutoGenerateHierarchy="True"

 

 

 

GridLines="None" Skin="Web20" AllowAutomaticUpdates="True">

 

 

 

<ClientSettings ColumnsReorderMethod="Swap">

 

 

 

<DataBinding FilterParameterType="List" ResponseType="Json">

 

 

 

<DataService DataServiceType="AdoNet" />

 

 

 

</DataBinding>

 

 

 

</ClientSettings>

 

 

 

<MasterTableView AllowAutomaticUpdates="True" DataKeyNames="ClienteStudioId"

 

 

 

TableLayout="Fixed">

 

 

 

<columns>

 

 

 

<CSP:CSPGridBoundColumn DataField="ClienteStudioId"

 

 

 

HeaderText="ClienteStudioId" Resizable="false" UniqueName="ClienteStudioId"

 

 

 

Visible="false">

 

 

 

</CSP:CSPGridBoundColumn>

 

 

 

<CSP:CSPGridBoundColumn DataField="RagioneSociale" HeaderText="RagioneSociale"

 

 

 

Resizable="false" UniqueName="RagioneSociale" Visible="true">

 

 

 

</CSP:CSPGridBoundColumn>

 

 

 

<CSP:CSPGridBoundColumn DataField="CodFiscale" HeaderText="CodFiscale"

 

 

 

Resizable="false" UniqueName="CodFiscale" Visible="true">

 

 

 

</CSP:CSPGridBoundColumn>

 

 

 

<CSP:CSPGridBoundColumn DataField="PIva" HeaderText="PIva" Resizable="false"

 

 

 

UniqueName="PIva" Visible="true">

 

 

 

</CSP:CSPGridBoundColumn>

 

 

 

<CSP:CSPGridBoundColumn DataField="Fax" HeaderText="Fax" Resizable="false"

 

 

 

UniqueName="Fax" Visible="true">

 

 

 

</CSP:CSPGridBoundColumn>

 

 

 

</columns>

 

 

 

<CommandItemSettings ExportToPdfText="Export to Pdf" />

 

 

 

<EditFormSettings>

 

 

 

<EditColumn FilterControlAltText="Filter EditCommandColumn column">

 

 

 

</EditColumn>

 

 

 

</EditFormSettings>

 

 

 

<ExpandCollapseColumn AndCurrentFilterFunction="NoFilter"

 

 

 

CurrentFilterFunction="NoFilter" DataSecurity="Read" FilterDelay=""

 

 

 

FilterListOptions="VaryByDataType">

 

 

 

</ExpandCollapseColumn>

 

 

 

<RowIndicatorColumn AndCurrentFilterFunction="NoFilter"

 

 

 

CurrentFilterFunction="NoFilter" DataSecurity="Read" FilterDelay=""

 

 

 

FilterListOptions="VaryByDataType">

 

 

 

</RowIndicatorColumn>

 

 

 

</MasterTableView>

 

 

 

<PagerStyle CssClass="rgPager" Mode="NextPrevAndNumeric" Wrap="True" />

 

 

 

</CSP:CSPGrid>

But in RadGrid the above code are not adding.So Please help me in this regards.

Thanks & Regards,
Anita Sahu

 

Mira
Telerik team
 answered on 20 Jul 2011
2 answers
118 views
Hi there,
here my problem:
I have a RadGrid with 3 levels hierarchy created using NestedViewTemplate on 2nd and 3rd levels.
When I dblclick a row in 2nd/3rd level, I want to open a popup form to edit the double clicked record.
When I close the popup form, if data has been saved I want (if possible) to refresh only the grid level of the edited row.
I want that the edit form is an independent form, that contains all the logic to edit/insert a record (so that I can reuse it and call it from different RadGrids and pages).
The edit form should accept a querystring value "ID=x" in order to go into edit mode, or a "ParentID=y" in order to go into insert mode, with ParentID being the ID of the "father table".
Let's suppose that in the calling TableView I've got a column called RowID which contains the key of the record to edit.

I've started to work using you demo Window.ReturningValuesFromDialog...
how to inject the querystring value into the call to the popup ?
how to rebind only the level of the grid that contains the edited row ?

Which is the best strategy to achieve such an application scenario ? Is there any sample that I have not found yet that face this challenge ?

Thanks in advance

Ubaldo
Maria Ilieva
Telerik team
 answered on 20 Jul 2011
2 answers
128 views
I am currently manually databinding a RadGrid via server side. Although when I try to edit a record the Grid clears out, until I bind it again, then the item goes into edit mode. I'm not sure how to resolve this. Below is the code I have so far.

ASPX
<telerik:RadAjaxLoadingPanel ID="itemsLoadingPanel" runat="server" Skin="Vista" Transparency="30"></telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel ID="itemsPanel" runat="server" LoadingPanelID="itemsLoadingPanel">
        <div>
            <telerik:RadTextBox ID="itemSearchPSTxt" runat="server" EmptyMessage="PS #" />
            <telerik:RadTextBox ID="itemSearchDescriptionTxt" runat="server" EmptyMessage="Description"  />
            <telerik:RadTextBox ID="itemSearchPartNumTxt" runat="server" EmptyMessage="Part #"  />
            <telerik:RadButton ID="itemSearchBtn" runat="server" Text="Search" OnClick="itemSearchBtn_Click"/>
            <asp:Label ID="itemSearchErrorlbl" runat="server" Text="*You must input a search value" CssClass="error" Visible="false" />
        </div>
 
            <telerik:RadGrid ID="itemsRadGrid" runat="server" AutoGenerateColumns="true" AutoGenerateEditColumn="true" AllowPaging="true" OnItemCommand="itemsRadGrid_ItemCommand">
                <MasterTableView CommandItemDisplay="Top" NoMasterRecordsText="No Records" EditMode="PopUp">
                <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" />
 
                <EditFormSettings EditFormType="Template" PopUpSettings-Modal="true" PopUpSettings-Width="720px" CaptionFormatString="Edit Item">
                    <FormTemplate>
                    <table>
                        <tr>
                            <td>Description:</td>
                            <td>Part Number:</td>
                            <td>Category:</td>
                        </tr>
                        <tr>
                            <td><telerik:RadTextBox ID="editItemDescription" runat="server" /></td>
                            <td><telerik:RadTextBox ID="editItemPartNum" runat="server" /></td>
                            <td><telerik:RadTextBox ID="editItemCategory" runat="server" /></td>
                        </tr>
                        <tr>
                            <td>Internal Account Number:</td>
                            <td>Status:</td>
                            <td></td>
                        </tr>
                        <tr>
                            <td><telerik:RadTextBox ID="editItemAcctNum" runat="server" /></td>
                            <td><telerik:RadTextBox ID="editItemStatus" runat="server" Text /></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td>Expires: <asp:DropDownList ID="editItemExpires" runat="server"><asp:ListItem Text="Yes" Value="1" /><asp:ListItem Text="No" Value="0" /></asp:DropDownList></td>
                            <td>Serial Numbered: <asp:DropDownList ID="editItemSerialNum" runat="server"><asp:ListItem Text="Yes" Value="1" /><asp:ListItem Text="No" Value="0" /></asp:DropDownList></td>
                            <td>Lot Numbered: <asp:DropDownList ID="editItemLotNum" runat="server"><asp:ListItem Text="Yes" Value="1" /><asp:ListItem Text="No" Value="0" /></asp:DropDownList></td>
                            <td>Consigned: <asp:DropDownList ID="editItemConsigned" runat="server"><asp:ListItem Text="Yes" Value="1" /><asp:ListItem Text="No" Value="0" /></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>OEM:</td>
                            <td>OEM ID:</td>
                            <td>OEM Item ID:</td>
                        </tr>
                        <tr>
                            <td><telerik:RadTextBox ID="editItemOEM" runat="server" /></td>
                            <td><telerik:RadTextBox ID="editItemOEMID" runat="server" /></td>
                            <td><telerik:RadTextBox ID="editItemOEMItemID" runat="server" /></td>
                        </tr>
                        <tr>
                            <td>Vendor:</td>
                            <td>Vendor ID:</td>
                            <td>Vendor Item ID:</td>
                        </tr>
                        <tr>
                            <td><telerik:RadTextBox ID="editItemVendor" runat="server" /></td>
                            <td><telerik:RadTextBox ID="editItemVendorID" runat="server" /></td>
                            <td><telerik:RadTextBox ID="editItemVendorItemID" runat="server" /></td>
                        </tr>
                        <tr>
                            <td>Vendor Price:</td>
                            <td>Price Each:</td>
                            <td>Cost Code:</td>
                            <td>Conversion Rate:</td>
                            <td>Unit of Measure:</td>
                        </tr>
                        <tr>
                            <td><telerik:RadTextBox ID="editItemVendorPrice" runat="server" /></td>
                            <td><telerik:RadTextBox ID="editItemPriceEach" runat="server" /></td>
                            <td><telerik:RadTextBox ID="editItemCostCode" runat="server" /></td>
                            <td><telerik:RadTextBox ID="editItemCoversionRate" runat="server" /></td>
                            <td><telerik:RadTextBox ID="editItemUnitMeasure" runat="server" /></td>
                        </tr>
                        <tr>
                            <td colspan="4"><telerik:RadButton ID="editItemUpdateBtn" runat="server" Text="Update" /></td>
                        </tr>
                    </table>
                    </FormTemplate>
                </EditFormSettings>
                </MasterTableView>
            </telerik:RadGrid>
        </telerik:RadAjaxPanel>


C#
protected void itemSearchBtn_Click (object sender, EventArgs e)
        {
            itemSearchErrorlbl.Visible = false;
 
            string PartNum = itemSearchPartNumTxt.Text;
            string Description = itemSearchDescriptionTxt.Text;
            string PSNum = itemSearchPSTxt.Text;
            string whereStatement = "";
 
            if (PartNum != "" || Description != "" || PSNum != "")
            {
                if (PartNum != "")
                {
                    whereStatement = "items.PartNumber = " + "'" + PartNum + "'";
                }
 
                if (Description != "")
                {
                    // See if there is already a statement to see if we need to add AND
                    if (whereStatement == "")
                    {
                        whereStatement = "items.Description like " + "'%" + Description + "%'";
                    }
                    else
                    {
                        whereStatement = whereStatement + " AND items.Description like " + "'%" + Description + "%'";
                    }
                }
 
                if (PSNum != "")
                {
                    if (whereStatement == "")
                    {
                        whereStatement = "items.CrossRefID = " + "'" + PSNum + "'";
                    }
                    else
                    {
                        whereStatement = whereStatement + " AND items.CrossRefID = " + "'" + PSNum + "'";
                    }
                }
 
 
                itemsRadGrid.DataSource = GetDataTable("SELECT ItemParValues.ID, Min, Max, Locations.Name, ItemID FROM ItemParValues INNER JOIN items on ItemParValues.ItemID = items.ID INNER JOIN Locations on Locations.ID = ItemParValues.LocationID WHERE " + whereStatement);
                itemsRadGrid.DataBind();
                 
            }
 
            else
                // Display error
                itemSearchErrorlbl.Visible = true;
 
        }
 
        protected void itemsRadGrid_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.EditCommandName)
            {
                 
            }
        }
 
        public DataTable GetDataTable(string queryString)
        {
 
            using (SqlCommand cmd = new SqlCommand(queryString, connection))
            {
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                DataTable dt = new DataTable();
                da.Fill(dt);
 
                return dt;
            }
 
              
        }

William
Top achievements
Rank 1
 answered on 20 Jul 2011
2 answers
57 views
Here is my code

 

<telerik:RadGrid ID="RadGrid1" runat="server"

AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"

DataSourceID="GetProvider" GridLines="None" Skin="Windows7" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True">

<MasterTableView AutoGenerateColumns="False" DataSourceID="GetProvider" CommandItemDisplay="Top" DataKeyNames="SuspendedProviderId" >

<Columns>

<telerik:GridBoundColumn DataField="SocialSecurityAct" HeaderText="SocialSecurityAct"

SortExpression="SocialSecurityAct" UniqueName="SocialSecurityAct">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="42CFR" HeaderText="42CFR" SortExpression="42CFR"

UniqueName="42CFR">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="42USC" HeaderText="42USC" SortExpression="42USC"

UniqueName="42USC">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description"

UniqueName="Description">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="SuspendedProviderId" DataType="System.Int32" Visible="false"

HeaderText="SuspendedProviderId" ReadOnly="True" SortExpression="SuspendedProviderId"

UniqueName="SuspendedProviderId">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Id" DataType="System.Int32" HeaderText="Id" Visible="false"

SortExpression="Id" UniqueName="Id">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="SuspendedProviderId" DataType="System.Int32" Visible="false"

HeaderText="SuspendedProviderId" SortExpression="SuspendedProviderId" UniqueName="SuspendedProviderId">

</telerik:GridBoundColumn>

</Columns>

<EditFormSettings EditFormType="Template">

<FormTemplate>

<table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"

style="border-collapse: collapse; background: white;">

<tr class="EditFormHeader">

<td colspan="2" style="font-size: small">

<b>SocialSecurityAct</b>

</td>

</tr>

<tr class="EditFormHeader">

<td colspan="2" style="font-size: small">

<b>42 CFR</b>

</td>

<td>

<asp:TextBox runat="server" ID="txt42CFR" Text='<%# Bind("42CFR") %>' Enabled="false"/>

</td>

</tr>

<tr class="EditFormHeader">

<td colspan="2" style="font-size: small">

<b>42 USC</b>

</td>

<td>

<asp:TextBox runat="server" ID="txt42USC" Text='<%# Bind("42USC") %>' Enabled="false" />

</td>

</tr>

<tr class="EditFormHeader">

<td colspan="2" style="font-size: small">

<b>Description</b>

</td>

<td>

<asp:TextBox runat="server" ID="txtDescription" Text='<%# Bind("Description") %>' Enabled="false"/>

</td>

</tr>

<tr>

<td align="right" colspan="2">

 

<asp:ImageButton ID="btnUpdate" ImageUrl="~/Img/Update.gif" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'

runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>

</asp:ImageButton>&nbsp;

<asp:ImageButton ID="btnCancel" runat="server" ImageUrl="~/Img/Cancel.gif" CausesValidation="False"

CommandName="Cancel"></asp:ImageButton>

</td>

</tr>

 

</table>

 

</FormTemplate>

</EditFormSettings>

<CommandItemSettings AddNewRecordText="Add " />

</MasterTableView>

</telerik:RadGrid>

</fieldset>

<asp:SqlDataSource ID="GetProvider" runat="server"

 

InsertCommand="spInsert" UpdateCommand="spUpdate"

DeleteCommand="spDelete" DeleteCommandType="StoredProcedure"

InsertCommandType="StoredProcedure" UpdateCommandType="StoredProcedure"

onupdating="GetProvider_Updating"

oninserting="GetProvider_Inserting">

<SelectParameters>

<asp:QueryStringParameter Name="SuspendedProviderId" QueryStringField="SuspendedProviderId"

Type="Int32" />

</SelectParameters>

<InsertParameters>

<asp:QueryStringParameter Name="SuspendedProviderId" QueryStringField="SuspendedProviderId" Type="Int32" />

<asp:Parameter Name="Id" Type="Int32" DefaultValue="1" />

</InsertParameters>

<UpdateParameters>

<asp:Parameter Name="Id" Type="Int32" DefaultValue="1" />

<asp:Parameter Name="SuspendedProviderId" Type="Int32" />

</UpdateParameters>

<DeleteParameters>

<asp:Parameter Name="SuspendedProviderId" />

</DeleteParameters>

</asp:SqlDataSource>

During the insert it passes all the column value , but i just want to pass the insert paramenter value. That means
Just pass these values.

<InsertParameters>

<asp:QueryStringParameter Name="SuspendedProviderId" QueryStringField="SuspendedProviderId" Type="Int32" />

<asp:Parameter Name="Id" Type="Int32" DefaultValue="1" />

</InsertParameters>

Help needed ASAP
Thanks
Eva

Iana Tsolova
Telerik team
 answered on 20 Jul 2011
1 answer
40 views
Hi

Is it possible to make a rad grid like the one below

http://www.findmyshift.com/overview?r=3xa00v7l5d53j8z41902ec7875

how to update in db when they enter text in cell and press enter button or click on another cell?
Mira
Telerik team
 answered on 20 Jul 2011
1 answer
102 views
Hello,
I've a Grid that work fine in my pc. It has a lot of functionality like, Sorting, Paging, Filtering by column, etc.
The problem is that the site has deployed in a Testing envirotment, and all the application work fine exept the RadGrid. Every functionalaty that requered a postback, like Sorting Column, Filtering, Paging, doesn't work and I have this js error:

Unable to cast object of type 'Telerik.Web.UI.GridHeaderItem' to type 'Telerik.Web.UI.GridDataItem'. (this for sorting)
Unable to cast object of type 'Telerik.Web.UI.GridPagerItem' to type 'Telerik.Web.UI.GridDataItem'. (this for paging)

Any idea what happend? Maybe some configuration in IIS.

Thanks.
Julio.
Iana Tsolova
Telerik team
 answered on 20 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?