Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
249 views
Hi all,

Right now I am pulling values from 2 columns in a RadGrid control, and programitcally putting them into a table cell. Then, I am adding that table cell into a gridataitem, programitcally.

What I want to do, is then insert that griddataitem into a control within an item tempalte that contains a header and a footer.

Here is a sample of what I am doing:
<P>GridDataItem item = e.Item as GridDataItem;<BR></P>
<P>string totala =
item.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["total1"].ToString();<BR>string
totalb =
item.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["total2"].ToString();<BR></P>
<P>double a = double.Parse(totala.ToString());<BR>double b =
double.Parse(totalb.ToString());<BR>double c = a + b;</P>
<P><BR>TableCell tc = new TableCell();<BR>tc.Text = c.ToString("c");</P>
<P><BR>item.Cells.Add(tc);<BR></P>

Any ideas?



Princy
Top achievements
Rank 2
 answered on 23 Sep 2011
1 answer
149 views
Hi,

I have an ascx user control inside my radWindow in my page (see RadWindow code below),
Inside my wizard control my Edit button brings up the radWindow properly, it seems to bind correctly to my formview but the when saving it does not work,
** in particular the parameter values to my update call are unchanged.**
So it will eval correctly but not 2-way bind, I double-checked that I have 'bind' not eval. The radWindowManager is inside my master page.
In my control's formview there is no surrounding panels or updatePanels.

I use javascript to open the window, but my Save button executes and runs code-behind.

The control's 2-way bind was working in its old page (without a popup) and theres only been minor changes.
Any ideas why the expected 2-way bind is failing in a radWindow?


 <telerik:RadWindow ID="radWindowForControls" Title="Applicant Details" KeepInScreenBounds="true" Behaviors="Maximize,Move" EnableShadow="true"  runat="server"  AutoSize="true"  Modal="true"  >
        <ContentTemplate>
         <div align="right">
            <asp:Button ID="Button49" runat="server" CausesValidation="false" Text="Save" OnClick="btnSave_Click" />
            <asp:Button ID="Button50" runat="server" CausesValidation="false" Text="Save and Close"
                OnClick="btnSave_Click" />
            <asp:Button ID="Button51" runat="server" CausesValidation="false" Text="Cancel"
                OnClick="btnCancel_Click" OnClientClick="return promptCancel()" />
        </div>
            <uc1:ATAppDetails ID="myCtrlATAppDetails" runat="server"  />
             <div align="right">
            <asp:Button ID="Button52" runat="server" CausesValidation="false" Text="Save"
                OnClick="btnSave_Click" />
            <asp:Button ID="Button53" runat="server" CausesValidation="false" Text="Save and Close"
                OnClick="btnSave_Click" />
            <asp:Button ID="Button54" runat="server" CausesValidation="false" Text="Cancel"
                OnClick="btnCancel_Click" OnClientClick="return promptCancel()" />
        </div>
        </ContentTemplate>
    </telerik:RadWindow>
Marin Bratanov
Telerik team
 answered on 23 Sep 2011
1 answer
156 views
Hello,

I create raddock dynamically. I wish to add newly created raddock at  any position in the raddockzone.

RadDockZone1.Controls.Add(dock) - adds dock at index 0 by default.

Can you please suggest approach to add newly created raddock at any position in the raddockzone ?

Thanks
Slav
Telerik team
 answered on 23 Sep 2011
4 answers
161 views
I have a radEditor on a page with the FindAndReplace toolbar button defined.  On the client, when I click the button, the dialog opens up as expected and I'm able to enter the text into the Find textbox.  Nothing happens after I click find (no text is highlighted), even though the word I'm looking for is there (multiple times).

On the replace tab, I'm able to find the first instance of the target word (it's highlighted in the editor), but only the the Replace All button works.  The replace button does nothing.  (After the replace button is executed, a message box is displayed saying "FindAndReplace_AllReplaced".

Only after I get this message will I get messages when I click Find (either tab) or Replace indicating FindAndReplace_NotFound.  (This message isn't displayed until I click the Replace All button.

I'm using Q2 2009 tools against VS2008 (c#).  This is occuring in IE7.  We don't test against other browsers.

The radEditor/toolbar declaration is as follows:

            <telerik:RadEditor  
                ID="tbNote"  
                runat="server" 
                Width="502px"  
                TextMode="MultiLine"  
                Wrap="True"                  
                EditModes="Design"  
                Height="250px"  
                Style="overflow:auto;border: 1px solid navy;" Font-Size="Medium" > 
                <Tools> 
                    <telerik:EditorToolGroup Tag="BasicFunctions"
                        <telerik:EditorTool Name="Cut" /> 
                        <telerik:EditorTool Name="Copy" /> 
                        <telerik:EditorTool Name="Paste" /> 
                        <telerik:EditorSeparator /> 
                        <telerik:EditorTool Name="Bold" /> 
                        <telerik:EditorTool Name="Italic" /> 
                        <telerik:EditorTool Name="Underline" /> 
                        <telerik:EditorTool Name="StrikeThrough" /> 
                        <telerik:EditorSeparator /> 
                        <telerik:EditorTool Name="FindAndReplace" /> 
                        ... 

What, if anything, am I missing?
Rumen
Telerik team
 answered on 23 Sep 2011
1 answer
173 views
Hi,
My Problem is --> can't access to RadToolBar Item Template When Using OnClientButtonClicked

function getTextBox() {          
var
toolbar = $find("<%=RadToolBar1.ClientID %>");
     
var button = toolbar.findItemByText("button1");
     
var textBox = button.get_element().firstChild;
     
if (textBox.type != "text")
      textBox = textBox.nextSibling;
      alert(textBox.value);
      textBox.value =
"test";
   }

----------------------
<telerik:RadToolBar ID="RadToolBar1" Runat="server" dir="rtl"
                EnableEmbeddedSkins="False" Skin="Outlook" Width="100%" OnClientButtonClicked="click_handler">
        <Items>
<telerik:RadToolBarButton Text="button1">
    <ItemTemplate>
        <asp:TextBox ID="textBox1" runat="server" />
    </ItemTemplate>
</telerik:RadToolBarButton>
.
.
.

----------------------

When I delete OnClientButtonClicked="click_handler" it's work fine but i need handle button click and textbox value

sorry for bad english

Kate
Telerik team
 answered on 23 Sep 2011
2 answers
90 views
Hello,

In my situation a client can make one appiontment a day. But I have problem, when she wants to create a new appointment I have to ask if she wants to move her appointment.

I want to do this with a  confirmation message in the "Radscheduler_FormCreating" event. 

function confirmCallBackFn(arg) {
 
                                    var result = arg;
 
                                     
 
                                    if (result == true) {
 
                                        __doPostBack("<%= RadScheduler1.ClientID  %>", "_RadScheduler1_FormCreating#Delete");
                                    }
 
                                }

But the problem is, why does this not work, how do I get the result back to the server, because I can't do this?


Hope someone can help me , thanks in advance.
Sander
Top achievements
Rank 1
 answered on 23 Sep 2011
2 answers
210 views
Hi Everybody,

I have used a radgrid with ascx usercontrol for insert and edit, my edit mode is popup.

On edit command i need to assign the seleted row values to the controls in the usercontrol(ascx) and display in the popup.

Is there a way to refer the rad grid from the usercontrols cs page on edit command click?

Please give me suggestions.

Thank You,


Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
 answered on 23 Sep 2011
1 answer
99 views
I'm trying to implement the radgrid keyboard navigation controls to a grid, but an unexpected error in firefox stopped releasing it.

i have a grid which is editable with keyboard controls.  When you hit enter you enter edit mode and focus gets put on the proper field.  If the user tabs over to the next field which is a combobox, it leaves that row in edit mode, and puts the row cursor on the row above the one you're on.

This does not happen in IE or Chrome.  In another browser, it just does not update, and stays in edit mode.

I would like to have the row update, if not, then do nothing.

Any Ideas?

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None"
        AutoGenerateEditColumn="True" OnInsertCommand="RadGrid1_InsertCommand" OnUpdateCommand="RadGrid1_UpdateCommand"
        OnItemDataBound="RadGrid1_ItemDataBound" OnEditCommand="RadGrid1_EditCommand"
        ShowFooter="True"
        OnItemCommand="RadGrid1_ItemCommand" DataMember="DefaultView" >
        <ClientSettings AllowKeyboardNavigation="True">
            <KeyboardNavigationSettings AllowSubmitOnEnter="True" />
        </ClientSettings>
        <GroupPanel Enabled="False">
        </GroupPanel>
        <MasterTableView EditMode="InPlace" DataMember="DefaultView" ShowHeadersWhenNoRecords="true"
            CommandItemDisplay="TopAndBottom" DataKeyNames="ID" >
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="ItemID"
                    FilterControlAltText="Filter ItemID column" HeaderText="ItemID" ReadOnly="True"
                    UniqueName="ItemID">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="ItemDescription" FilterControlAltText="Filter ItemDescription column"
                    HeaderText="ItemDescription" SortExpression="ItemDescription" UniqueName="ItemDescription">
                    <EditItemTemplate>
                        <asp:Label runat="server" ID="lblItemDescription" Text='<%# Bind("ItemDescription") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblItemDescription" Text='<%# Bind("ItemDescription") %>'></asp:Label>
                    </ItemTemplate>
                    <InsertItemTemplate>
                        <telerik:RadComboBox ID="cboItem" runat="server" DataSourceID="ODSItems" DataTextField="Description"
                            DataValueField="InventoryItemID" SelectedValue='<%# Bind("ItemID") %>' OnSelectedIndexChanged="cboItem_SelectedIndexChanged" />
                    </InsertItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="Collection" FilterControlAltText="Filter Collection column"
                    HeaderText="Collection" SortExpression="Collection" UniqueName="Collection">
                    <EditItemTemplate>
                        <asp:Label runat="server" ID="lblCollection" Text='<%# Bind("Collection") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblCollection" Text='<%# Bind("Collection") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="Location" FilterControlAltText="Filter Location column"
                    HeaderText="Location" SortExpression="Location" UniqueName="Location">
                    <EditItemTemplate>
                        <asp:Label runat="server" ID="lblLocation" Text='<%# Bind("Location") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblLocation" Text='<%# Bind("Location") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn FilterControlAltText="Filter Quantity column" HeaderText="Quantity"
                    UniqueName="Quantity" DataField="Quantity" DefaultInsertValue="0">
                    <EditItemTemplate>
                        <telerik:RadNumericTextBox runat="server" ID="txtQuantity" Text='<%# Bind("Quantity") %>' />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                            ControlToValidate="txtQuantity" ForeColor="Red" />
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblQuantity" Text='<%# Bind("Quantity") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Unit" SortExpression="Unit" UniqueName="Unit">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblUnit" Text='<%# Bind("Unit") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadComboBox ID="cboUnit" runat="server" DataSourceID="ODSUnitList"
                            DataTextField="UnitDescription" DataValueField="UnitValue" SelectedValue='<%# Bind("UnitID") %>' />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                            ControlToValidate="cboUnit" ForeColor="Red" SetFocusOnError="true" Display="Dynamic" />
                    </EditItemTemplate>
                    <InsertItemTemplate>
                         <telerik:RadComboBox ID="cboUnit" runat="server" DataSourceID="ODSUnitList"
                            DataTextField="UnitDescription" DataValueField="UnitValue" />
 
                    </InsertItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Total" SortExpression="Total" UniqueName="Total"
                    DefaultInsertValue="0">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblTotal" Text='<%# Bind("Total") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:Label runat="server" ID="lblTotal" Text='<%# Bind("Total") %>'></asp:Label>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:Label runat="server" ID="lblOverallTotal" Text='Total = <%= OverallTotal %>'></asp:Label>
                    </FooterTemplate>
                </telerik:GridTemplateColumn>
                <%--  <telerik:GridBoundColumn FilterControlAltText="Filter CollectionID column" HeaderText="CollectionID"
                    UniqueName="CollectionID" DataField="CollectionID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn FilterControlAltText="Filter LocationID column" HeaderText="LocationID"
                    UniqueName="LocationID" DataField="LocationID">
                </telerik:GridBoundColumn>--%>
                <%--<telerik:GridBoundColumn FilterControlAltText="Filter UnitID column" HeaderText="UnitID"
                    UniqueName="UnitID" DataField="UnitID">
                </telerik:GridBoundColumn>--%>
            </Columns>
            <SortExpressions>
                <telerik:GridSortExpression FieldName="ItemID" />
            </SortExpressions>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>
Martin
Telerik team
 answered on 23 Sep 2011
2 answers
107 views
Hi, I had installed Teleric RAD Controls earlier with trial version and implemented in my project with trial version now I got lisence from client.
Can any one please guide me how to upgrade my system from Trial version to Lisenced Version and what changes needed in code.
Sanjeev
Top achievements
Rank 1
 answered on 23 Sep 2011
2 answers
74 views
Hi,
I am using Radgrid and using the facility of grouping grid header columns.
My requirement is to grouping for  single column only means there is no chance to  drag & drop  more than one column.in grouping panel.
I also want to display  pop up message for drag & drop for column.

AllowDragToGroup is working fine but How can I do the above  things.
 Please help me ...........




Thanks
Jaichand
Jaichand
Top achievements
Rank 1
 answered on 23 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?