Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
171 views
Hello Sir

I want to filter the radgrid column but it can give the error selection out of range when i m trying to add 2nd drop downlist search for 2nd column. It works when i add the dropdownlist for single column it will works fine , but in 2nd gives error .


<telerik:GridTemplateColumn HeaderText="Primary Product" DataField="ProdName" UniqueName="ProdName"
                                                                                AllowFiltering="true" AutoPostBackOnFilter="true">
                                                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                                         
                                                                                <ItemTemplate>
                                                                                  <%# DataBinder.Eval(Container.DataItem,"ProdName") %>
                                                                                    <input type="hidden" id="hidPropID" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"Proposal_ID")%>'
                                                                                        name="hidPropID" />
                                                                                    <input type="hidden" id="hidProposalGrpVal" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"ProposalGrpVal")%>'
                                                                                        name="hidProposalGrpVal" />
                                                                                    <input type="hidden" id="hidChecked" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"Checked")%>'
                                                                                        name="hidChecked" />
                                                                                </ItemTemplate>
                                                                             <FilterTemplate>
                                                                                    <telerik:RadComboBox ID="ddlPrimProd" Width="130" DataSourceID="Sqlprimprod" DataTextField="Name"
                                                                                        DataValueField="Name" Height="70" SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("Name").CurrentFilterValue %>'
                                                                                        runat="server" AppendDataBoundItems="True" Sort="Ascending" SortCaseSensitive="false"
                                                                                         MarkFirstMatch="true" Skin="Black" OnClientSelectedIndexChanged="ProdSelectedIndexChanged">
                                                                                        <Items>
                                                                                            <telerik:RadComboBoxItem Text="< Any Product >" />
                                                                                        </Items>
                                                                                    </telerik:RadComboBox>
                                                                                    <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">

                                                                                        <script type="text/javascript">
                                                                                            function ProdSelectedIndexChanged(sender,args) {
                                                                                            var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");
                                                                                                  if (sender.get_value() != "0")
                                                                                                   {                                                                                               
                                                                                                        tableView.filter("Name",args.get_item().get_value(),"EqualTo");
                                                                                                   }
                                                                                                else {
                                                                                                        tableView.filter("Name", args.get_item().get_value(), "NoFilter");
                                                                                                  }
                                                                                            }
                                                                                        </script>

                                                                                    </telerik:RadScriptBlock>
                                                                                </FilterTemplate></telerik:GridTemplateColumn>


<telerik:GridBoundColumn HeaderText="Crop" DataField="CropName" AllowFiltering="true"
                                                                                UniqueName="Name" AutoPostBackOnFilter="true" SortExpression="CropName">
                                                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                                                               
                                                                                <%--<ItemStyle Width="10%" />--%>
                                                                               <%--<FilterTemplate >
                                                                                <telerik:RadComboBox ID="ddlcrop" Width="130" DataTextField="CropName" ShowToggleImage ="false" EnableLoadOnDemand = "true"
                                                                                    DataValueField="CropName" runat="server" AppendDataBoundItems="true" markFirstMatch="true" Skin="Black"></telerik:RadComboBox>
                                                                                </FilterTemplate>--%>                  
                                                                                                                                                              
                                                                                <FilterTemplate>
                                                                                <telerik:RadComboBox ID="ddlcrop" Width="130" DataSourceID="SqlDataSource1" DataTextField="Name"
                                                                                    DataValueField="Name" Height="90" SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("Name").CurrentFilterValue %>'
                                                                                    runat="server" AppendDataBoundItems="true" OnClientSelectedIndexChanged="SelectedIndexChanged"
                                                                                    MarkFirstMatch="true" Skin="Black">
                                                                                    <Items>
                                                                                        <telerik:RadComboBoxItem Text=" <  Every  >" />
                                                                                    </Items>
                                                                                </telerik:RadComboBox>
                                                                                <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

                                                                                    <script type="text/javascript">
                                                                                            function SelectedIndexChanged(sender,args) {
                                                                                            var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");
                                                                                                  if (sender.get_value() != "0")
                                                                                                   {                                                                                                
                                                                                                        tableView.filter("Name",args.get_item().get_value(),"Contains");
                                                                                                   }
                                                                                                else {
                                                                                                        tableView.filter("Name", args.get_item().get_value(), "NoFilter");
                                                                                                  }
                                                                                            }
                                                                                    </script>

                                                                                </telerik:RadScriptBlock>
                                                                            </FilterTemplate>
                                                                            </telerik:GridBoundColumn>



It gives exception when page is postback

  dgProposals.DataBind()

I m confuse why it happen bcuz it works when i trying for single column it will filter out proper , but when i add the the combobox for another column it gives exception.


The datasources are different ;


<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GoConnectionString %>"
        SelectCommand="SELECT [ID], [Name] FROM [Crop]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="sqlprimprod" runat="server" ConnectionString="<%$ ConnectionStrings:GoConnectionString %>"
        SelectCommand="SELECT [Name] FROM [QryProdTN] ORDER BY [Name]"></asp:SqlDataSource>


Help Me urgent sir, Its very urgnet need
Pavlina
Telerik team
 answered on 11 Aug 2009
1 answer
54 views

Hello,

 

I have a small problem with using Telerik Ajax in a dynamically loaded uses control.

In the beginning the page had 3 user controls with Ajax and all of them were loaded at runtime. Everything was working as expected. The main page had a RadAjax Manager and the user controls had RadAjax Manager Proxy controls on them.

 

After implementing the user control loading thru Ajax based on this http://www.telerik.com/help/aspnet/ajax/ajxloadusercontrols.html. There were no more changes to the main page.

Now when I click on a control inside user control that should update something in the same user control with the help of Ajax my entire user control just disappears from the page completely without any errors, or execution of the code in the user control.

What have I forgotten to add/modify in the page to make it work?

Thank you for your time

Pavlina
Telerik team
 answered on 11 Aug 2009
1 answer
70 views
I have seen that many bug fixes and improvements are available with the internal builds of the RadControls for ASP.NET AJAX Q2 2009 suite. Is any offical release (Q3 or just a service pack) planned for the near future?

Thanks
Martin
Svetlina Anati
Telerik team
 answered on 11 Aug 2009
5 answers
414 views
Hi

I want to use the power of the TimeZoneOffset property on the radscheduler.
I have looked at the examples in the online demos and the programming pages and the example given shows a radscheduler with a dropdown populated with GMT +1 +2 etc etc.

Changing the value in the dropdown causes an ajax postback to get the new appointment items adjusted to the localized times.

My need is much simpler nut I can't quite seem to get it to work. I don't want the dropdown for the user. All I need is that if say a user puts in say a telephone conference at 18:00 uk time when a user in New York looks at the scheduler it shows it at 13:00. So all the code would seem to have to do somewhere once it has detected it's a request from a New york user is something like this.

int

hoursOffset = -5;
RadScheduler1.TimeZoneOffset =
TimeSpan.Parse(hoursOffset.ToString());

Is this correct and where do I put such code? I've tried it on a little test project in onload but it doesn't seem to have any effect on the appointment times.

Thanks

Gary

Peter
Telerik team
 answered on 11 Aug 2009
2 answers
132 views
Hi There,

Could you tell me where I find the Text properties for the text: "Page Size:" in RadGrid footer ?

Thanks.

Marcio Nascimento
Marcio Nascimento
Top achievements
Rank 1
 answered on 11 Aug 2009
2 answers
169 views
Hi There,

Is there a way to enable/disable menu itens without having to select them ?

Thanks.

Marcio Nascimento
Marcio Nascimento
Top achievements
Rank 1
 answered on 11 Aug 2009
4 answers
168 views
Hi,

I have a grid with GridDropDownColumn, similar to this: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx. Although all the records have values in the GridDropDownColumn, the first record always appears empty, even in the demo above (see Category column). If I sort the grid or use paging, then the value appears correctly. Is this some kind of bug? Is there anything I can do to fix it?

Thanks,
Julia
Julia Shah
Top achievements
Rank 1
 answered on 11 Aug 2009
1 answer
78 views
I have a license for Telerik Q1 2009 version. Can I upgrade to Q2 2009 ?
Thanks
Anil   
Pavlina
Telerik team
 answered on 11 Aug 2009
5 answers
95 views
Hello, I've been reading  alot about custom skins created in Q3 no longer working once you upgrade to 2009 Q1 (build 1527),  I have a input, toolbar and radgrid skin that no longer render properly...can you convert it to work with 2009 Q1...if so what is the process so I can do it myself in the future, I've tried it many times with 2009 Q1 and none of my changes seem to work.  I need to convert to Q1 due to some errors I am getting with the RadToolbar under Q3 2008.

THanks
Pavlina
Telerik team
 answered on 11 Aug 2009
2 answers
150 views
I have a hierarchical RadGrid with 3 levels, each bound to an SqlDataSource. The 3rd level grid has a summary of information, and if you click the (custom) Edit button for the row, a (ASP.NET) DetailsView control (bound to another SqlDataSource) is displayed, letting the user edit lots of fields, including some SQL fields that are also visible in the RadGrid's 3rd table. When the edit is saved in the DetailsView, the 3rd level needs to be refreshed to display the updated information. This is being attempted by the ItemCommand event of the DetailsView.

The problem is that I cannot get the 3rd level table to refresh at all, no matter what I try. Each time, the data stays the same, and if you click on anything in the grid, a nasty error comes up about the viewstate being different. I have tried simple databinding on the 3rd level, and calling DataBind(). I've also tried advanced databinding and calling Rebind() (and also setting DataSource to null). Neither works at all. I can rebind the entire grid, but then it all collapses and I STILL get the error about the viewstate being different.

I'm not sure what to try next??????????
Georgi Krustev
Telerik team
 answered on 11 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?