Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
66 views
Hi (vb user)
First off... love the scheduler. Once you have spent a few days playing with it, it becomes pretty darn cool.
Questions:
A: How do I remove the '-' or Empty option from my resources.  I am always going to demand a 'user' and 'location'
B: Is it possible based on one resource eg. Location to rebind the user resource? 

I have created resources both using the code behind ie.InitializeResources and using the datasetID straight off the ASPX. It would be really great if I could determine how to rebind/rebuild a resource based on another resource.

I think if I coud get these things done I might get paid.
Peter
Telerik team
 answered on 27 Sep 2010
1 answer
110 views
Apologies if this is a silly question, still learning telerik...

I have a RadWindowManager that has several windows.  When a user moves them around and clicks a button that does a postback the code behind has no knowledge of the current location of the windows.  Surely it can do this...  I must be missing something obvious.  Would I have to do a postback to update the viewstate of each window?  (the viewstate is set to false for the windows, but true for the window manager so it remembers orginal windows along with newly spawned).  Do I have to keep track of the changes client side (after the client side events) and send it to the server?  I would think there is a very easy way to do this...

Thank you in advance,
John
John
Top achievements
Rank 1
 answered on 27 Sep 2010
1 answer
73 views
I am using GridEditCommandColumn column, it works locally on my machine, however when deploying it on the server it only refreshes the screen. But on my local box it opens the edit entry form.

Hector
Daniel
Telerik team
 answered on 27 Sep 2010
1 answer
114 views

Dear Team,

I am using Rad Grid  then I binded some fileds in Existing Table.after given text box this calculated filed. Give correct solution for java script.


With Regards,
S.kannadasan

Shinu
Top achievements
Rank 2
 answered on 27 Sep 2010
5 answers
113 views
When I debug my code for editing/updating rows in the RadGrid, the following line of code:

DataRow[] changedRows = usersTable.Select(editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["GUID"].ToString());

... throws the following error:

"from Syntax error: Missing operand after 'c93' operator."

The code is taken and adapted (very slightly) from the Update_Command() method in the code example here.

What does the error mean?

Also, can you suggest any other resources on the InPlace editing for RadGrid as I don't find the Telerik examples very clear (minimal code comments and description). I find the ordering of examples quite disjointed at times. From an ASP.NET point of view, I'm a beginner, so it could just be my inexperience!

Regards,
Anthony
Anthony
Top achievements
Rank 1
 answered on 27 Sep 2010
1 answer
114 views
When not using Templates in RadScheduler, you are provided default buttons for Save, Cancel and Options. If I want to add a custom control to the InlineInsertTemplate, I'm left having to add my own buttons to perform Save, Cancel and Options. Is there a way I can add my own custom controls (DropDownList etc) but still utilize the default Save, Cancel and Options buttons? As it is now, if I use a template, I'm left having to add by own buttons to perform these operations. 
Veronica
Telerik team
 answered on 27 Sep 2010
1 answer
108 views
hi
when i click on nextpage,firstpage,... not work
please help
thansk
Shinu
Top achievements
Rank 2
 answered on 27 Sep 2010
2 answers
74 views
Hello

I have a nested grid that works in crome but refuses to in ie8 .
I click on the dropdown arrow and the event doesnt fired.
No errors are shown
Please help!!

<telerik:RadGrid ID="ResellerGrid" ShowStatusBar="true" runat="server" AutoGenerateColumns="False"
       AllowSorting="True" AllowMultiRowSelection="True" AllowPaging="True" GridLines="None"
       OnDetailTableDataBind="ResellerGrid_DetailTableDataBind" OnNeedDataSource="ResellerGrid_NeedDataSource" OnPreRender="ResellerGrid_OnPreRender">
       <MasterTableView DataKeyNames="ResellerPriceId,ProductId" ShowFooter="true" AllowMultiColumnSorting="True"
           HierarchyDefaultExpanded="False">
           <DetailTables>
               <telerik:GridTableView DataKeyNames="ProductId" Width="100%" runat="server">
                  <ParentTableRelation>
                       <telerik:GridRelationFields DetailKeyField="ResellerPriceId" MasterKeyField="ResellerPriceId" />
                   </ParentTableRelation>
                   <NoRecordsTemplate>
                       No data</NoRecordsTemplate>
                   <Columns>                      
                         <telerik:GridTemplateColumn UniqueName="ProductNameTemplateColumn" HeaderText="Product Name">
                           <ItemTemplate>
                               <asp:Label runat="server" ID="lblProductName" Text='<%#Eval("ProductName") %>'/>
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="chkScaledTemplateColumn" HeaderText="Is Scaled">
                           <ItemTemplate>
                               <asp:CheckBox runat="server" ID="chkScaled" OnCheckedChanged="chkScaled_OnCheckedChanged" Checked='<%#Eval("IsScaled") %>' AutoPostBack="true"/>
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn UniqueName="txtCostTemplateColumn" HeaderText="Cost Price">
                           <ItemTemplate>
                               <asp:TextBox runat="server" ID="txtCost" Text='<%#ToCurrency(Eval("CostPrice")) %>' />
                           </ItemTemplate>                           
                       </telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn UniqueName="txtMarkUpTemplateColumn" HeaderText="MarkUp">
                           <ItemTemplate>
                               <asp:TextBox runat="server" ID="txtMarkUp" Width="100px" OnTextChanged="txtMarkUp_OnLeave" Text='<%#Eval("MarkUp") %>' AutoPostBack="true" />%
                                <asp:RegularExpressionValidator ID="regMarkUp" ControlToValidate="txtMarkUp"
                      ErrorMessage="Incorrect Percentage" runat="server" ValidationExpression='<%$ Resources:ValidationPatterns, Decimal %>'>[Invalid]</asp:RegularExpressionValidator>
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn UniqueName="txtFinalCostTemplateColumn" HeaderText="Final Cost">
                           <ItemTemplate>
                               <asp:TextBox runat="server" ID="txtFinalCost" OnTextChanged="txtFinalCost_OnLeave" Text='<%#ToCurrency(Eval("FinalPrice")) %>' Align="Right" AutoPostBack="true"/>
                            <asp:RegularExpressionValidator ID="regFinalCost" ControlToValidate="txtFinalCost"
                      ErrorMessage="Incorrect Final Price" runat="server" ValidationExpression='<%$ Resources:ValidationPatterns,Decimal  %>'>[Invalid]</asp:RegularExpressionValidator>
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>                       
                       <telerik:GridTemplateColumn UniqueName="chkScaledTemplateColumn" HeaderText="Is Available">
                           <ItemTemplate>
                               <asp:CheckBox runat="server" ID="chkAvail" OnCheckedChanged="chkAvail_OnCheckedChanged" Checked='<%#Eval("IsAvailable") %>' AutoPostBack="true"/>
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
                   </Columns>
               </telerik:GridTableView>
           </DetailTables>
           <Columns>
               <telerik:GridTemplateColumn UniqueName="ProductNameTemplateColumn" HeaderText="Product Name">
                           <ItemTemplate>
                               <asp:Label runat="server" ID="lblProductName" Text='<%#Eval("ProductName") %>'/>
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
               <telerik:GridTemplateColumn UniqueName="txtCostTemplateColumn" HeaderText="Cost Price">
                   <ItemTemplate>
                       <asp:TextBox runat="server" ID="txtCost" Text='<%#ToCurrency(Eval("CostPrice")) %>'/>
                   </ItemTemplate>
               </telerik:GridTemplateColumn>
               <telerik:GridTemplateColumn UniqueName="txtMarkUpTemplateColumn" HeaderText="MarkUp">
                   <ItemTemplate>
                       <asp:TextBox runat="server" ID="txtMarkUp" Width="100px" OnTextChanged="txtTypeMarkUp_OnTextChanged" Text='<%#Eval("MarkUp") %>' AutoPostBack="true"/>
                   <asp:RegularExpressionValidator ID="regMarkUp" ControlToValidate="txtMarkUp"
                      ErrorMessage="Incorrect Percentage" runat="server" ValidationExpression='<%$ Resources:ValidationPatterns, Decimal %>'>[Invalid]</asp:RegularExpressionValidator>
                   </ItemTemplate>
               </telerik:GridTemplateColumn>
               <telerik:GridTemplateColumn UniqueName="txtFinalCostTemplateColumn" HeaderText="Final Cost" >
                   <ItemTemplate>
                       <asp:TextBox runat="server" ID="txtFinalCost" OnTextChanged="txtTypeFinalCost_OnTextChanged" Text='<%#ToCurrency(Eval("FinalPrice")) %>' AutoPostBack="true"/>
                    <asp:RegularExpressionValidator ID="regFinalCost" ControlToValidate="txtFinalCost"
                      ErrorMessage="Incorrect Final Price" runat="server" ValidationExpression='<%$ Resources:ValidationPatterns, Decimal %>'>[Invalid]</asp:RegularExpressionValidator>
                   </ItemTemplate>
               </telerik:GridTemplateColumn>
           </Columns>
       </MasterTableView>
   </telerik:RadGrid>
Iana Tsolova
Telerik team
 answered on 27 Sep 2010
8 answers
653 views
I have a radwindow which loads a user control containing a modal radtooltip. When the modaltooltip pops up it translates the overlay position and it's contents to the upper-left hand corner of the window. In other words, the tooltip overlay acts like the top left of the browser window is actually the top left of the radwindow.

I also noticed that on radwindows where there is a scrollbar that the loading indcator also seems to be the height of the window contents versus the height of the window. I might try putting the content into a scroll-able div versus the window scrollbar to see if it fixes it but wanted to ask what the problem may be...

Thanks!
Georgi Tunev
Telerik team
 answered on 27 Sep 2010
9 answers
771 views
I know that I must be missing something simple but I can't figure it out.  I have just changed all of my grids from the RadControls to the Prometheus controls.  In doing so (something I did or didn't do) broke.  When ever I try to use the CommandItemTemplate Update Button I get an error:

Only items with IsInEditMode set to true can be updated

Here is my commandItemTemplate:
<CommandItemTemplate> 
                        <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# RadGrid1.EditIndexes.Count > 0 %>'
                            <img style="border:0px" alt="" src="~/Skins/DWDS/Grid/Update.gif" runat="server" /> Update Activity 
                        </asp:LinkButton> 

As far as I know it is the same as the Prometheus examples.  If I use the update button from the EditFormsSettings it works fine.

Here is the Grid:

<telerik:RadGrid ID="RadGrid1" Skin="DWDS" EnableEmbeddedSkins="false" ImagesPath="~/Skins/DWDS/Grid/" runat="server" Width="100%" PageSize="14"  
                AllowAutomaticDeletes="true" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" 
                AllowPaging="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" ShowStatusBar="true" AllowSorting="true" ShowFooter="true" AllowFilteringByColumn="true" > 
                <PagerStyle Mode="NextPrevNumericAndAdvanced" /> 
                <ExportSettings FileName="DeepWellData File Export" /> 
                <MasterTableView CommandItemDisplay="Top" CurrentResetPageIndexAction="SetPageIndexToFirst" ShowHeadersWhenNoRecords="true" DataKeyNames="Activity_ID" DataSourceID="SqlDataSource1" Width="100%" AutoGenerateColumns="false" EditMode="EditForms"
                    <CommandItemTemplate> 
                        <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# RadGrid1.EditIndexes.Count > 0 %>'
                            <img style="border:0px" alt="" src="~/Skins/DWDS/Grid/Update.gif" runat="server" /> Update Activity 
                        </asp:LinkButton> 
                        &nbsp; 
                        <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%# RadGrid1.EditIndexes.Count > 0 || RadGrid1.MasterTableView.IsItemInserted %>'
                            <img style="border:0px" alt="" src="~/Skins/DWDS/Grid/Cancel.gif" runat="server" /> Cancel editing 
                        </asp:LinkButton> 
                        &nbsp; 
                        <asp:LinkButton ID="LinkButton2" runat="server" CommandName="InitInsert" Visible='<%# !RadGrid1.MasterTableView.IsItemInserted %>'
                            <img style="border:0px" alt="" src="~/Skins/DWDS/Grid/AddRecord.gif" runat="server" /> Add new Activity</asp:LinkButton> 
                        <asp:LinkButton ID="LinkButton3" runat="server" CommandName="PerformInsert" Visible='<%# RadGrid1.MasterTableView.IsItemInserted %>'
                         <img style="border:0px" alt="" src="~/Skins/DWDS/Grid/Insert.gif" runat="server" /> Add this Activity</asp:LinkButton> 
                        &nbsp;&nbsp;&nbsp; 
                        <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid"
                            <img style="border:0px" alt="" src="~/Skins/DWDS/Grid/Refresh.gif"  runat="server" /> Refresh Activity list 
                        </asp:LinkButton> 
                        &nbsp;&nbsp;&nbsp; 
                        <asp:Label ID="lblCategoryEdit" Visible="false" OnDataBinding="DisableCategoryEdit" runat="server"
                            <telerik:RadWindowManager ID="RadWindowManager2" runat="server" Height="500px" Width="480px" Modal="true"
                                <Windows> 
                                    <telerik:RadWindow OpenerElementID="aRegion" Width="480px" Height="450px" NavigateUrl="~/Projects/CaseFiles/AddRecord/Category.aspx" ID="RadWindow1" runat="server" /> 
                                </Windows> 
                            </telerik:RadWindowManager> 
                            <id="aRegion" style="cursor: pointer;"
                                <img src="~/Skins/DWDS/Grid/Edit.gif" runat="server" border="0" alt="Edit Categories" />Add/Edit Categories</a> </asp:Label> 
                        <br /> 
                        &nbsp; 
                    </CommandItemTemplate> 
                    <Columns> 
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="~\Skins\DWDS\Grid\Edit.gif"  
                            UniqueName="EditColumn"
                            <HeaderStyle Width="25px" /> 
                            <ItemStyle HorizontalAlign="Center" Width="25px" /> 
                        </telerik:GridEditCommandColumn> 
                        <telerik:GridButtonColumn ConfirmText="Delete this activity?" ButtonType="ImageButton" ImageUrl="~\Skins\DWDS\Grid\Delete.gif" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
                            <HeaderStyle Width="25px" /> 
                            <ItemStyle HorizontalAlign="Center" Width="25px" /> 
                        </telerik:GridButtonColumn> 
                        <telerik:GridBoundColumn DataField="Activity_ID" HeaderText="ID" ReadOnly="True" SortExpression="Name" UniqueName="Activity_ID" Visible="False" /> 
                        <telerik:GridBoundColumn DataField="Name" HeaderText="Activity Name" ColumnEditorID="GridTextBoxColumnEditor1" SortExpression="Name" UniqueName="name" /> 
                        <telerik:GridBoundColumn DataField="PName" HeaderText="Partner" ReadOnly="True" Display="true" SortExpression="PName" UniqueName="PName" /> 
                        <telerik:GridBoundColumn DataField="Category_Name" HeaderText="Category" ReadOnly="True" Display="true" SortExpression="Category_Name" UniqueName="Category_Name" /> 
                        <telerik:GridDropDownColumn DataField="Partner_ID" ColumnEditorID="GridDropDownListColumnEditor1" DataSourceID="SqlDataSource2" HeaderText="Partner" ListTextField="Name" ListValueField="Partner_ID" 
                            UniqueName="pid" Display="false" /> 
                        <telerik:GridDropDownColumn DataField="Category_ID" ColumnEditorID="GridDropDownListColumnEditor2" DataSourceID="SqlDataSource3" HeaderText="Category" ListTextField="Name" ListValueField="Category_ID" 
                            UniqueName="cid" Display="false" /> 
                        <telerik:GridDropDownColumn DataField="Goal_Number" ColumnEditorID="GridDropDownListColumnEditor3" DataSourceID="SqlDataSource7" Visible="false" HeaderText="Goal #" ListTextField="Goal" 
                            ListValueField="Goal" UniqueName="Goal_number" /> 
                        <telerik:GridNumericColumn DataField="Completion_Hours" Visible="false" HeaderText="Completion Hours (in Minutes)" ColumnEditorID="GridNumericColumnEditor1" SortExpression="Completion_Hours" 
                            UniqueName="Completion_Hours" /> 
                        <telerik:GridTemplateColumn HeaderText="Details" AllowFiltering="false" DataField="Activity_ID" UniqueName="viewActivity"
                            <ItemTemplate> 
                                <div style="text-align: center"
                                    <asp:ImageButton ID="showItem" OnClick="showActivityDetails_Click" runat="server" ImageUrl="~/Images/Icons/magnifier.gif" CommandName="viewingActivity" CommandArgument='<%# Eval("Activity_ID") %>' /> 
                                </div> 
                            </ItemTemplate> 
                            <FooterTemplate> 
                                <div style="font-size: 11px; color: #5e7ca7; padding-top: 2px"
                                    Export to:<br /> 
                                    <asp:ImageButton ID="btnExcel" runat="server" ImageUrl="~/Images/Icons/excel.gif" AlternateText="Export to excel" OnClick="btnExcel_Click" />&nbsp;&nbsp; 
                                    <asp:ImageButton ID="btnWord" runat="server" ImageUrl="~/Images/Icons/word.gif" AlternateText="Export to word" OnClick="btnWord_Click" /> 
                                </div> 
                            </FooterTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridHTMLEditorColumn Visible="false" DataField="Notes" ColumnEditorID="GridHTMLEditorColumnEditor1" HeaderText="Notes" SortExpression="Notes" UniqueName="Notes" /> 
                        <telerik:GridBoundColumn Visible="false" DataField="Partner_ID" UniqueName="Partner_ID" ReadOnly="true" /> 
                        <telerik:GridBoundColumn DataField="PName" Visible="false" UniqueName="PName2" ReadOnly="true" /> 
                    </Columns> 
                    <EditFormSettings CaptionDataField="Name" CaptionFormatString="Edit properties of Activity: {0}" ColumnNumber="1"
                        <FormTableItemStyle Wrap="False" Width="400px"></FormTableItemStyle> 
                        <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle> 
                        <FormMainTableStyle GridLines="Horizontal" CellSpacing="10" CellPadding="10" BackColor="White" /> 
                        <FormTableStyle CellSpacing="10" CellPadding="10" CssClass="module" Height="150px" BackColor="White" /> 
                        <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle> 
                        <FormStyle Width="10%"></FormStyle> 
                        <EditColumn ButtonType="ImageButton" UpdateImageUrl="~\Skins\DWDS\Grid\Update.gif" EditImageUrl="~\Skins\DWDS\Grid\Edit.gif" InsertImageUrl="~\Skins\DWDS\Grid\Insert.gif" CancelImageUrl="~\Skins\DWDS\Grid\Cancel.gif" 
                            InsertText="Insert Activity" UpdateText="Update record" UniqueName="EditCommandColumn1" CancelText="Cancel edit"
                        </EditColumn> 
                        <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle> 
                    </EditFormSettings> 
                    <ExpandCollapseColumn Visible="False"
                        <HeaderStyle Width="19px" /> 
                    </ExpandCollapseColumn> 
                    <RowIndicatorColumn Visible="False"
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                </MasterTableView> 
            </telerik:RadGrid> 

Can someone point out what I am doing wrong?

Thanks
Iana Tsolova
Telerik team
 answered on 27 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?