Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
86 views
I have the grid like this:
    <telerik:RadGrid ID="ReportsListGrid" ShowStatusBar="true" runat="server" AllowPaging="True"
        AllowSorting="true" AllowMultiRowSelection="True" PageSize="20" OnNeedDataSource="ReportsListGrid_NeedDataSource">
        <MasterTableView TableLayout="Fixed" DataKeyNames="ReportId" AutoGenerateColumns="True">
            <Columns>
                <telerik:GridBoundColumn DataField="ReportId" HeaderText="ReportId" AllowFiltering="false"
                    SortExpression="ReportId" />
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name" />
                <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" />
                <telerik:GridBoundColumn DataField="ReportLocation" HeaderText="ReportLocation" SortExpression="ReportLocation" />
                <telerik:GridBoundColumn DataField="Active" HeaderText="Active" SortExpression="Active" />
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

And Following is how i am binding it:

        Dim reports = ReportFactory.CreateReportController().GetReports()
'reports is IList  collection
        ReportsListGrid.DataSource = reports
        ReportsListGrid.DataBind()

On the pageload grid loads correctly, but when i click on any column header for sorting it says: 

"System.IndexOutOfRangeException: Cannot find column ReportLocation."

Please help!!!!!!!!!!!

Thanks J
Jayesh Goyani
Top achievements
Rank 2
 answered on 07 Jul 2012
1 answer
82 views
I am having Copy icon and edit icon in a row, when I click on copy I would like to do the same behavior for edit click, means I would like to open the edit template is it possible to do.
Jayesh Goyani
Top achievements
Rank 2
 answered on 07 Jul 2012
9 answers
318 views
Hi all,

I have a tree list and 2 radio button under this tree list... when i try to find the radio button on my tree list its state has been always checked false.. i have assigned the auto postback .. but its not working it seems..

Source is 
<td>
  <asp:RadioButton ID="rbDepPer" runat="server" GroupName="dep" />
  <telerik:RadNumericTextBox ID="txtBoxDepPer" Text='<%# Bind("DepPer") %>' runat="server">
  </telerik:RadNumericTextBox>
 </td>
  <td>
  Depreciation Year:
 </td>
 <td>
<asp:RadioButton ID="rbDepYear" runat="server" GroupName="dep" />
 <telerik:RadNumericTextBox ID="txtBoxDepYear" Text='<%# Bind("DepYear") %>' runat="server"
 Width="300px" >
 </telerik:RadNumericTextBox>
   </td>
Code Behind
Protected Sub RadTreeList1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.TreeListItemCreatedEventArgs) Handles RadTreeList1.ItemCreated
       If TypeOf e.Item Is TreeListEditFormItem AndAlso DirectCast(e.Item, TreeListEditFormItem).IsInEditMode Then
           Dim item As TreeListEditableItem = TryCast(e.Item, TreeListEditableItem)
           Dim rad1 As RadioButton = DirectCast(item.FindControl("rbDepPer"), RadioButton)
           Dim rad2 As RadioButton = DirectCast(item.FindControl("rbDepYear"), RadioButton)
           Dim textBox = TryCast(item.FindControl("txtBoxDepPer"), RadNumericTextBox)
           Dim textBox2 = TryCast(item.FindControl("txtBoxDepYear"), RadNumericTextBox)
           rad1.AutoPostBack = True
           rad2.AutoPostBack = True
           If rad1.Checked = True Then
               textBox.Enabled = True
               textBox2.Enabled = False
           ElseIf rad2.Checked = True Then
               textBox2.Enabled = True
               textBox.Enabled = False
           End If
       End If
   End Sub


I need to set visibility of that text box control while clicking the radio button..
Please help..


Regards,

Prassin
Prassin
Top achievements
Rank 1
 answered on 07 Jul 2012
1 answer
52 views
I am trying to create a very very basic form template, that looks like below

Employee Details

Officer Information                      Department Information                  Status
Label   Txt Box                            Label   Txt Box                                Label     Chx Box
Label   Txt Box                            Label   Txt Box                                Label     Text Box
Label   Txt Box                            Label   Txt Box 
Label   Txt Box                            Label   Txt Box 
Label   Txt Box                            Label   Txt Box 
Label   Txt Box                            Label   Txt Box 


Update    Cancel

below is the code I got and it is all screwed up, I tried to use the edit template designer, but it didn't seem very fluid.

any help would be greatly appreciated. I tried a bunch of stuff in here so alot of the junk can go away. I just want it to look neat and professional and not have any alignment issues.


<EditFormSettings EditFormType="Template">
<EditColumn FilterControlAltText="Filter EditCommandColumn column"
        UniqueName="EditCommandColumn1"></EditColumn>
    <FormTemplate>
    <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                        style="border-collapse: collapse; background: white;">
                        <tr class="EditFormHeader">
                            <td style="font-size: small">
                                <b>Employee Details</b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Officer Info:</b>
                            </td>
                        </tr>
                        
 
   <tr>
        <asp:Label ID="Label1" runat="server" Text="First Name:"></asp:Label>
        <asp:TextBox ID="TextBox1" runat="server" CssClass="txtbox" Text='<%# Bind("emp_Fname") %>'></asp:TextBox>
        <asp:Label ID="Label6" runat="server" Text="ID Num:"></asp:Label>
        <asp:TextBox ID="TextBox5" runat="server" CssClass="txtbox" Text='<%# Bind("emp_IdNum") %>'></asp:TextBox>
   </tr>
   <tr>    
        <asp:Label ID="Label3" runat="server" Text="Last Name:"></asp:Label>
        <asp:TextBox ID="TextBox2" runat="server" CssClass="txtbox" Text='<%# Bind("emp_Lname") %>'></asp:TextBox>
        <asp:Label ID="Label8" runat="server" Text="Classification"></asp:Label>
        <asp:TextBox ID="TextBox7" runat="server" CssClass="txtbox" Text='<%# Bind("emp_class") %>'></asp:TextBox>
   </tr>
       </table>
      <tr>
      <td>
        <asp:Label ID="Label4" runat="server" Text="Race:"></asp:Label>
        <asp:TextBox ID="TextBox3" runat="server" Height="21px"
            style="margin-left: 51px" Text='<%# Bind("emp_Race") %>'></asp:TextBox>
        </td>
      </tr>
      <tr>
      <td>
        <asp:Label ID="Label5" runat="server" Text="Sex"></asp:Label>
          :<asp:TextBox ID="TextBox4" runat="server" Height="21px"
            style="margin-left: 62px" Text='<%# Bind("emp_Sex") %>'></asp:TextBox>
</td>
      </tr>
      <tr>
      <td>
          <asp:Label ID="Label7" runat="server" Text="DOB:"></asp:Label>
          <asp:TextBox ID="TextBox6" runat="server" Height="21px"
              style="margin-left: 56px" Text='<%# Bind("emp_DOB") %>'></asp:TextBox>
</td>
      </tr>
      <tr>
      <td>
           </td>
      </tr>
      <tr>
      <td>
        <asp:Label ID="Label9" runat="server" Text="Email Address"></asp:Label>
        <asp:TextBox ID="TextBox8" runat="server" Height="21px"
            style="margin-left: 18px" Text='<%# Bind("emp_Email") %>'></asp:TextBox>
        <asp:Label ID="Label10" runat="server" Text="Street Address"></asp:Label>
        <asp:TextBox ID="TextBox9" runat="server" Height="21px"
            style="margin-left: 18px" Text='<%# Bind("emp_StreetAdd") %>'></asp:TextBox>
        <asp:Label ID="Label11" runat="server" Text="City"></asp:Label>
        <asp:TextBox ID="TextBox10" runat="server" Height="21px"
            style="margin-left: 18px" Text='<%# Bind("emp_City") %>'></asp:TextBox>
        <asp:Label ID="Label12" runat="server" Text="Zip"></asp:Label>
        <asp:TextBox ID="TextBox11" runat="server" Height="21px"
            style="margin-left: 18px" Text='<%# Bind("emp_Zip") %>'></asp:TextBox>
        <asp:Label ID="Label13" runat="server" Text="Hire Date"></asp:Label>
        <asp:TextBox ID="TextBox12" runat="server" Height="21px"
            style="margin-left: 18px" Text='<%# Bind("emp_HireDate") %>'></asp:TextBox>
        <asp:Label ID="Label14" runat="server" Text="Class Date"></asp:Label>
        <asp:TextBox ID="TextBox13" runat="server" Height="21px"
            style="margin-left: 18px" Text='<%# Bind("emp_classDate") %>'></asp:TextBox>
        <asp:Label ID="Label15" runat="server" Text="Grant Position"></asp:Label>
        <asp:TextBox ID="TextBox14" runat="server" Height="21px"
            style="margin-left: 18px" Text='<%# Bind("emp_GrantPost") %>'></asp:TextBox>
         <asp:Label ID="Label17" runat="server" Text="Inactive"></asp:Label>   
         <asp:CheckBox ID="CheckBox1" runat="server"
                        Checked='<%# Bind("emp_Inactive") %>' />
        <asp:Label ID="Label16" runat="server" Text="Reason Inactive"></asp:Label>
        <asp:TextBox ID="TextBox15" runat="server" Height="21px"
            style="margin-left: 18px" Text='<%# Bind("emp_ReasonInactive") %>'></asp:TextBox>
         
            <tr>
                            <td align="right">
                                <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </asp:Button
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button>
                            </td>
                        </tr>
         
        
         
    </FormTemplate>
</EditFormSettings>



Dave
Top achievements
Rank 1
 answered on 06 Jul 2012
1 answer
118 views
I have a page, lets say Page1 that does a response.redirect to another page, Page2. 

Page2 has a RadGrid in it and it takes about 30 seconds to load.  The problem is the Response.rediirect stays on Page1 until Page2 is done loading the RadGrid. 

How can I load Page2 to load, then load the RadGrid so users are stuck on Page1 for 30 seconds?
Sayle
Top achievements
Rank 1
 answered on 06 Jul 2012
1 answer
140 views
First off, let me say that I am quite excited to learn more about RadControls.  I'm still mostly a beginner .net developer (I've been developing with ASP classic for years but only touched .net here and there) but even after just a few days of working with the trial I can see that these controls are going to help me move forward immensely.

Anyway, one of the tasks that I need to perform is pretty simple, I think.  I need to be able to use a tab control to load content from multiple sources - other servers on our network.  The content will be called via url and I'd like it to maintain "state" if I can use that term in this context.  In other words, click tab 1, load content, click link in content, content changes.  Click tab 2, load content.  Click tab 1 again and return to content as it was when I last viewed it.

I'm currently trying to accomplish this using the Tabstrip/MulitPage/Pageview combination that is shown in the demos on this site.  I have no problem getting everything to load (contentURL="xxxxx" is simple enough) but the state is lost when you click another tab.

I also attempted to do this using RadWindow and I believe the "state" was maintained the way I wanted it to be but when I tried to combine that with the Tab/Pageview method I found that the windows need to be told when to show/hide so it seemed to defeat the purpose of using tabs.

Lastly, I'll just add that I thought the first method (tab/multipage/pageview) was working the way I wanted it but I'm not sure if that was ever the case. I've done too much fiddling and I can't remember what worked and what didn't.  I do know that it doesn't work now though and I'm hoping I changed something along to way to make that so.  I may just start a new page and try again from scratch.

At any rate, my question is, simply, is what I'm trying to do the best way to do it and, if so, would someone be kind enough to offer some advice as to how to go about it?  I'll post some code if need be but I have yet to write anything in the codebehind so there's not much to see.

Thanks.
dino
Top achievements
Rank 1
 answered on 06 Jul 2012
2 answers
204 views
hi.. I've been playing around with radcalendar and noticed that when I click a date it sets the value of selected date to the date as expected. However if I then click the same date the value of radcalendar1.SelectedDate is set to 01/01/0001 00:00:00 .

If you click different days radcalendar.SelectedDate is always set to the correct value, it just seems to occur when you click the same date.

is there a simple fix for this?

<telerik:RadCalendar ID="RadCalendar1" Runat="server" CultureInfo="en-GB"
    MultiViewColumns="4" MultiViewRows="1"
        EnableMultiSelect="false" AutoPostBack="true"
    OnSelectionChanged="RadCalendar1_SelectionChanged" SelectedDate=""  
    ViewSelectorText="x" Skin="Windows7">
        <SpecialDays>
            <telerik:RadCalendarDay Date="" Repeatable="Today">
                <ItemStyle CssClass="rcToday" />
            </telerik:RadCalendarDay>
        </SpecialDays>
Jake
Top achievements
Rank 1
 answered on 06 Jul 2012
4 answers
173 views
Radajaxmanagerproxy.Responsescript is not firing Javascripts in Google Chrome but working fine with IE and FF.
Anindya
Top achievements
Rank 1
 answered on 06 Jul 2012
0 answers
81 views
If I use user control to edit grid records can inject property/constructor to my control, or hook to any 'Pre' ItemCreated of the grid that I use event ?
Jacob
Top achievements
Rank 1
 asked on 06 Jul 2012
1 answer
154 views
I have a grid that opens up a fancybox on a nested item, it updates the tables and then when the fancybox closes the grid should reload the datasource and rebind.
JS
$("a.verifyAnalyst").fancybox({
    'width': '100%',
    'height': '100%',
    'autoScale': true,
    'transitionIn': 'none',
    'transitionOut': 'none',
    'type': 'iframe',
    'onClosed': function() {
                    $find("<%=WIPAjaxManager.ClientID%>").ajaxRequest("Rebind");
                }
});
Code Behind
protected void WIPAjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
    if (e.Argument == "Rebind")
    {
        WorkInProgressMainGrid.MasterTableView.SortExpressions.Clear();
        WorkInProgressMainGrid.MasterTableView.GroupByExpressions.Clear();
        WorkInProgressMainGrid.Rebind();
    }
}
The problem is that is actually calling the rebind, but the grid doesn't update, then when I click on any other button I get the following error:
Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

I can't see why this is happening? Other Rebinds using onClick events are working 100%.

Can someone please advise me on how to reload the grid on closing of a fancybox.

Thank you.
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Jul 2012
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?