Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
91 views
Here is my issue,

I have 15 columns radgrid. I didn't set any width property to my grid.
I can able to view all 15 columns in the grid using the browser's horizontal scroll bar.
Using the HeaderContextMenu i had hidden last 10 columns in the grid.
Then i made a sort in a column which causes a postback.
Now, there is no horizontal scroll bar in my page and balance 5 columns in my grid were visible in single screen.
Then i made all the hidden columns back to visible using the HeaderContextMenu.
But, i can't able to see the columns that i made visible. I can't able to see the horizontal scroll bar either.
if i performed a postback using columnsort or columnfilter, i can see the columns along with the horizontal scroll bar.

I guess you can understand my problem. Pls help and accept my aplogies for bad English.

<telerik:RadGrid Skin="Vista" OnNeedDataSource="dsRFP_Selecting" ShowGroupPanel="True"
        AllowFilteringByColumn="true" AutoGenerateColumns="false" AllowPaging="true"
        AllowSorting="true" ID="grid1" runat="server" OnPreRender="RadGrid1_PreRender"
        OnItemCommand="RadGrid1_ItemCommand">
        <GroupingSettings CaseSensitive="false" />
        <MasterTableView GroupLoadMode="Server" HierarchyDefaultExpanded="false" HierarchyLoadMode="ServerOnDemand"
            DataKeyNames="cr_id,rfp_number" EnableHeaderContextMenu="true">
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="images/expand.gif"
                    HeaderStyle-Width="10Px" UniqueName="EditCommandColumn1">
                </telerik:GridEditCommandColumn>
                <telerik:GridTemplateColumn HeaderStyle-Width="350Px" FilterControlWidth="250Px"
                    SortExpression="cr_name_og" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true"
                    ShowFilterIcon="false" DataField="cr_name_og" HeaderText="RFP Title [Click link to open Published RFP PDF]"
                    GroupByExpression="cr_name_og Group By cr_name_og">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblCRname" Text='<%# Eval("cr_name") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn HeaderStyle-Width="80Px" FilterControlWidth="70Px" CurrentFilterFunction="StartsWith"
                    AutoPostBackOnFilter="true" ShowFilterIcon="false" SortExpression="rfp_number"
                    HeaderText="RFP Number" HeaderButtonType="TextButton" DataField="rfp_number"
                    UniqueName="rfp_number" />
                <telerik:GridBoundColumn HeaderStyle-Width="150Px" CurrentFilterFunction="Contains"
                    AutoPostBackOnFilter="true" ShowFilterIcon="false" SortExpression="client_name"
                    HeaderText="Client Name" HeaderButtonType="TextButton" DataField="client_name"
                    UniqueName="client_name" />
                <telerik:GridBoundColumn HeaderStyle-Width="150Px" CurrentFilterFunction="Contains"
                    AutoPostBackOnFilter="true" ShowFilterIcon="false" SortExpression="cr_client_contact"
                    HeaderText="Client Contact" HeaderButtonType="TextButton" DataField="cr_client_contact"
                    UniqueName="cr_client_contact" />
                <telerik:GridBoundColumn HeaderStyle-Width="115Px" DataFormatString="{0:MM/dd/yyyy}"
                    SortExpression="cr_publish_dt" HeaderText="Published Date" DataField="cr_publish_dt"
                    UniqueName="cr_publish_dt" FilterListOptions="VaryByDataType" DataType="System.DateTime" />
                <telerik:GridBoundColumn HeaderStyle-Width="150Px" CurrentFilterFunction="Contains"
                    AutoPostBackOnFilter="true" ShowFilterIcon="false" SortExpression="program_mgr_name"
                    HeaderText="Program Manager" HeaderButtonType="TextButton" DataField="program_mgr_name"
                    UniqueName="program_mgr_name" />
                <telerik:GridBoundColumn HeaderStyle-Width="150Px" CurrentFilterFunction="Contains"
                    AutoPostBackOnFilter="true" ShowFilterIcon="false" SortExpression="cr_dev_status"
                    HeaderText="Current Status" HeaderButtonType="TextButton" DataField="cr_dev_status"
                    UniqueName="cr_dev_status" />
                <telerik:GridBoundColumn HeaderStyle-Width="50Px" CurrentFilterFunction="StartsWith"
                    AutoPostBackOnFilter="true" ShowFilterIcon="false" SortExpression="office_cd"
                    HeaderText="Office" HeaderButtonType="TextButton" DataField="office_cd" UniqueName="office_cd" />
                <telerik:GridBoundColumn HeaderStyle-Width="115Px" DataFormatString="{0:MM/dd/yyyy}"
                    SortExpression="cr_task_dt" HeaderText="Next Date to Contact" DataField="cr_task_dt"
                    UniqueName="cr_task_dt" FilterListOptions="VaryByDataType" DataType="System.DateTime" />
                <telerik:GridBoundColumn HeaderStyle-Width="150Px" CurrentFilterFunction="Contains"
                    AutoPostBackOnFilter="true" ShowFilterIcon="false" SortExpression="cr_cmpgn_status"
                    HeaderText="Campaign Status" HeaderButtonType="TextButton" DataField="cr_cmpgn_status"
                    UniqueName="cr_cmpgn_status" />
                <telerik:GridBoundColumn HeaderStyle-Width="115Px" DataFormatString="{0:MM/dd/yyyy}"
                    SortExpression="cr_due_dt" HeaderText="Proposal Due Date" DataField="cr_due_dt"
                    UniqueName="cr_due_dt" FilterListOptions="VaryByDataType" DataType="System.DateTime" />
                <telerik:GridBoundColumn HeaderStyle-Width="50Px" CurrentFilterFunction="Contains"
                    AutoPostBackOnFilter="true" ShowFilterIcon="false" SortExpression="cr_category_code"
                    HeaderText="Category" HeaderButtonType="TextButton" DataField="cr_category_code"
                    UniqueName="cr_category_code" />
                <telerik:GridBoundColumn HeaderStyle-Width="50Px" DataType="System.Int32" SortExpression="proposal_count"
                    HeaderText="Proposal Count" HeaderButtonType="TextButton" DataField="proposal_count"
                    UniqueName="proposal_count" />
                <telerik:GridBoundColumn HeaderStyle-Width="50Px" DataType="System.Int32" SortExpression="intent_count"
                    HeaderText="Intent Count" HeaderButtonType="TextButton" DataField="intent_count"
                    UniqueName="intent_count" />
            </Columns>
            <EditFormSettings UserControlName="detail.ascx" EditFormType="WebUserControl">
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" ColumnsReorderMethod="Reorder"
            EnableRowHoverStyle="false" AllowDragToGroup="true">
            <Selecting AllowRowSelect="True"></Selecting>
            <Resizing AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True">
            </Resizing>
        </ClientSettings>
    </telerik:RadGrid>
Pavel
Telerik team
 answered on 21 Jul 2010
1 answer
147 views
Hi
I am getting the following exception during load testing width 50 users.
What may be the problrm.
Please help me to over come from this problem.

Timestamp: 7/17/2010 10:44:23 AM Message:
Error Message : Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Stack Trace :    at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
   at System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState)
   at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
   at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState)
   at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState)
   at System.Web.UI.HiddenFieldPageStatePersister.Load()
   at Telerik.Web.UI.RadHiddenFieldPageStatePersister.Load()
   at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
   at System.Web.UI.Page.LoadAllState()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.app_pages_transfersummary_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 Category: errors Severity: Information Machine: MLISINVWTOAWEB4 Application Domain: /LM/W3SVC/1/ROOT-1-129238370435562304 Process Id: 5096 Process Name: c:\windows\system32\inetsrv\w3wp.exe Win32 Thread Id: 3776 Thread Name:




Thanks in advance

Dharmendra Kumar
Rosen
Telerik team
 answered on 21 Jul 2010
1 answer
94 views
Please see attached snap. how to implement empty rows, if there is not enough record.
Tsvetoslav
Telerik team
 answered on 21 Jul 2010
1 answer
127 views
Hi

I am showing my tooltip from my grid and i am firing an event which rebind my grid, however the grid does not get updated on the screen.

Im using an UpdatePanel.

My question is how to get the panel to update controls that sit outside of the tooltip from a button click that sits inside the tooltip ?


Svetlina Anati
Telerik team
 answered on 21 Jul 2010
3 answers
72 views
Hi,
I have been working on one project since last 2 months and we are using telerik and visual studio. Today morning when I made some changes to one of the files of my project and tried to rebuild it, it suddenly gave me tons of errors. They are all related to telerik. It doesn't recognise any telerik controls. I tried adding Telerik.Web.UI.dll file by doing right click on the project-->add references. But got no luck. Check the screenshot I attached for the errors I am getting.
Please help me out. I have to fix this immediately.

Thanks,
Georgi Tunev
Telerik team
 answered on 21 Jul 2010
1 answer
129 views
Hi,

I've customized a RadGrid so that my Category field can be selected from a dropdownlist.

I've done this via the following code in the 'EditItem' template for my ProductCategoryName Template column
As shown below
<telerik:GridTemplateColumn DataField="ProductCategoryName"
            DefaultInsertValue="" HeaderText="Category"
            SortExpression="ProductCategoryName" UniqueName="ProductCategoryName">
            <EditItemTemplate>          
                    
           <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSourceCategories" DataTextField="CategoryName" DataValueField="CategoryName" SelectedValue='<%# Bind("ProductCategoryName") %>'>
           </asp:DropDownList>        
                    
                    
            </EditItemTemplate>


My problem is that it appears that the RadGRid does not have an <InsertItemTemplate> and instead just uses whetever is in the
<EditItem> Template when one is in in Insert mode.

This, naturally means that I get the following error...

'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value


Would anyone be able to provide me with a solution for this problem ?


Radoslav
Telerik team
 answered on 21 Jul 2010
1 answer
140 views
Hello,

I have a button at my pager template in GRID with text = "Approve", on page load i want text change on button clicking, means if text = "approve" is clicked then text should change to  = "raject" and if text = "reject" is clciked, the  text must  = "approve"

.......

 

<PagerTemplate>

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

<asp:Button ID="btn1" runat="server" Text="Approve" />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

 

</PagerTemplate>

 


 

</telerik:RadGrid>

I m trying to do below manner, but won't able to capture button click event, please help

 

 

 

 

protected

 

void grdADInbox_ItemCreated(object sender, GridItemEventArgs e)

 

{

 

if (e.Item is GridPagerItem)

 

{

 

GridPagerItem item = (GridPagerItem) e.Item;

 

 

Button btn = item.FindControl("btnFutureApprovals") as Button;

 

 

switch (btnFutureApprovals.Text)

 

{

 

case "Future Approvals":

 

btnFutureApprovals.Text =

"Current Approvals";

 

 

break;

 

 

case "Current Approvals":

 

btnFutureApprovals.Text =

"Future Approvals";

 

 

break;

 

}

}

}

Princy
Top achievements
Rank 2
 answered on 21 Jul 2010
1 answer
101 views
hi
im looking how i can localize my radupload in italian?

thanks
regards

webster
Shinu
Top achievements
Rank 2
 answered on 21 Jul 2010
3 answers
83 views
Hi,

Apologises for my previous post - codesnippet formatting didn't work.

Well, I am looking for a solution where by I can have a Radtree with nodes. Each node will have inner node containing checkboxlist. All nodes and checkboxlist get populated from database. It can be done in designtime with NodeTemplate. I am sure it is possible in runtime as well but I am not sure how can I add NodeTemplate in runtime to the inner nodes only. I looked into documentation  NodeTemplate in Runtime but doesn't help a lot.


Could you please kindly hint me how it can be achieved.

Thanks in advance.

Cheers,
M G
Veronica
Telerik team
 answered on 21 Jul 2010
4 answers
356 views

I'm not sure if this is related just to jQuery, or if there is an issue with the Telerik version thereof.

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> 
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> 

My goal is to capture the Enter key in a textbox, and depending on the textbox which has focus, move to the next appropriate control. When I move from one textbox to another, it's fine. When I want to move from a textbox to a checkbox, I can't get an object for the checkbox, the return value (ctrl) is null.  The following is in a RadCodeBlock.
function KeyPressed(ctrl, e) {  
  if (e.get_domEvent().rawEvent.keyCode == 13) {  
    var ID = ctrl.get_id();  
    var ctrl;  
    if (ID.indexOf("F1") >= 0) ctrl = $find("<%= F2.ClientID %>");      
    if (ID.indexOf("F2") >= 0) ctrl = $("#<%= C1.ClientID %>"); // fail       
    // $find("<%= C1.ClientID %>"); // this didn't work either  
    if (ctrl !== null) {      
      e.set_cancel(true);      
      setTimeout(function() { ctrl.focus(); }, 1);      
    }  
    ...  
  }  
}

The F1 and F2 controls are textboxes. C1 is a checkbox (all control names simplified for this text).  The controls look like this:
<telerik:RadNumericTextBox ID="F1" Width="80px" runat="server" 
  Type="Number" NumberFormat-DecimalDigits="0" ClientEvents-OnKeyPress="KeyPressed" /> 
...  
<telerik:RadNumericTextBox ID="F2" Width="80px" runat="server" 
  Type="Number" NumberFormat-DecimalDigits="0" ClientEvents-OnKeyPress="KeyPressed" /> 
...  
<asp:CheckBox ID="C1" runat="server" Text="Check Me!" /> 

I'd like to understand what's wrong, but since we're here, outside of this kind of manual wiring, is there any more elegant way to set the Enter key to follow TabStops?

Thanks!
Sebastian
Telerik team
 answered on 21 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?