Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
140 views
Hi ,

I am trying to lock grid header and freeze columns feature in radgrid. I am putting radgrid inside radsplitter. My radsplitter is inside the master page.I tried putting Table_Layout to be Fixed and put all Header style width for all columns. That will freeze my header but all columns are squeeze and there is no scroll bars. Please see attached screen shot and html code for your information. It would be greate if someone can guide me how to do. 

<div>
      <table>
          <tr>
              <td>
                  <telerik:RadGrid ID="gvViewTrans" Skin="Metro" AllowMultiRowEdit="true" EnableLinqExpressions="false"
                      GridLines="both" AllowPaging="true" runat="server" OnItemCommand="gvViewTrans_ItemCommand"
                      OnItemDataBound="gvViewTrans_ItemDataBound" OnNeedDataSource="gvViewTrans_NeedDataSource"
                      OnPreRender="gvViewTrans_PreRender" PageSize="31" Width="100%">
                      <MasterTableView EditMode="InPlace" CommandItemDisplay="Top" AutoGenerateColumns="false"
                          DataKeyNames="SID" Width="100%" TableLayout="Fixed">
                          <CommandItemTemplate>
                              <div style="display: none;">
                                  <telerik:RadButton ID="btnSave" runat="server" Text="Save" Width="80px" Skin="Sitefinity"
                                      CommandName="Save">
                                      <Icon PrimaryIconUrl="Images/save.png" PrimaryIconTop="3px" PrimaryIconLeft="5px" />
                                  </telerik:RadButton>
                              </div>
                          </CommandItemTemplate>
                          <ItemStyle Wrap="false" BorderColor="Red" />
                          <HeaderStyle BackColor="#941922" ForeColor="White" />
                          <Columns>
                              <telerik:GridBoundColumn UniqueName="Date" HeaderText="Date" ReadOnly="true" DataFormatString="{0:dd-MMM-yyyy}"
                                  DataField="Trans_Date" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="36px">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="Day" HeaderText="Day" ReadOnly="true" DataField="Trans_Date"
                                  DataFormatString="{0:ddd}" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="15px">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridCheckBoxColumn UniqueName="Locked" HeaderText="Lock" DataField="Locked"
                                  Visible="true" HeaderStyle-Width="10px">
                              </telerik:GridCheckBoxColumn>
                              <telerik:GridCheckBoxColumn UniqueName="Freeze" HeaderText="Freeze" DataField="Freeze"
                                  Visible="true" HeaderStyle-Width="10px">
                              </telerik:GridCheckBoxColumn>
                              <telerik:GridTemplateColumn UniqueName="SchIn" HeaderText="SchIn" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <asp:TextBox ID="TB_SchIn1" Text='<%# DataBinder.Eval(Container.DataItem, "SchIn1") %>'
                                          Width="40px" runat="server"></asp:TextBox>
                                      <br />
                                      <asp:TextBox ID="TB_SchIn2" Text='<%# DataBinder.Eval(Container.DataItem, "SchIn2") %>'
                                          Width="40px" runat="server"></asp:TextBox>
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="SchOut" HeaderText="SchOut" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <asp:TextBox ID="TB_SchOut1" Text='<%# DataBinder.Eval(Container.DataItem, "SchOut1") %>'
                                          Width="40px" runat="server" e></asp:TextBox>
                                      <br />
                                      <asp:TextBox ID="TB_SchOut2" Text='<%# DataBinder.Eval(Container.DataItem, "SchOut2") %>'
                                          Width="40px" runat="server"></asp:TextBox>
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="In" HeaderText="In" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px" DataField="In1">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <asp:TextBox ID="TB_In1" Text='<%# DataBinder.Eval(Container.DataItem, "In1") %>'
                                          Width="40px" runat="server"></asp:TextBox>
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="Out" HeaderText="Out" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px" DataField="Out1">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <asp:TextBox ID="TB_Out1" Text='<%# DataBinder.Eval(Container.DataItem, "Out1") %>'
                                          Width="40px" runat="server"></asp:TextBox>
                                      <br />
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="FinalWkhr" HeaderText="NRM" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px" DataField="FinalWkhr1">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <asp:TextBox ID="TB_FinalWkhr1" Text='<%# DataBinder.Eval(Container.DataItem, "TotalFinalWkhr") %>'
                                          Width="40px" runat="server"></asp:TextBox>
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="Late" HeaderText="Late" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px" DataField="Late1">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <asp:TextBox ID="TB_Late1" Text='<%# DataBinder.Eval(Container.DataItem, "TotalLate") %>'
                                          Width="40px" runat="server"></asp:TextBox>
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="EarlyOut" HeaderText="EarlyOut" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px" DataField="EarlyOut1">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <asp:TextBox ID="TB_EarlyOut1" Text='<%# DataBinder.Eval(Container.DataItem, "TotalEarlyOut") %>'
                                          Width="40px" runat="server"></asp:TextBox>
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="WKOT" HeaderText="WKOT" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px" DataField="WKOT">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <asp:TextBox ID="TB_WKOT" Text='<%# DataBinder.Eval(Container.DataItem, "WKOT") %>'
                                          Width="40px" runat="server"></asp:TextBox>
                                      <br />
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="OFFOT" HeaderText="OFFOT" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px" DataField="OFFOT">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <asp:TextBox ID="TB_OFFOT" Text='<%# DataBinder.Eval(Container.DataItem, "OFFOT") %>'
                                          Width="40px" runat="server"></asp:TextBox>
                                      <br />
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridBoundColumn UniqueName="Part_Time" HeaderText="PTHrs" DataField="Part_Time"
                                  HeaderStyle-Width="50px">
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridTemplateColumn UniqueName="Reason" HeaderText="Reason" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <telerik:RadComboBox ID="RCB_ReasonCode" runat="server" Width="80px" ZIndex="1000000">
                                      </telerik:RadComboBox>
                                      <br />
                                      <telerik:RadComboBox ID="RCB_ReasonCode2" runat="server" Width="80px" ZIndex="1000000">
                                      </telerik:RadComboBox>
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="Skill" HeaderText="Skill" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <telerik:RadComboBox ID="RCB_Skill" runat="server" Width="80px" ZIndex="1000000">
                                      </telerik:RadComboBox>
                                      <br />
                                      <telerik:RadComboBox ID="RCB_Skill2" runat="server" Width="80px" ZIndex="1000000">
                                      </telerik:RadComboBox>
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="Loc" HeaderText="Loc" HeaderStyle-BackColor="#941922"
                                  HeaderStyle-Width="40px">
                                  <HeaderStyle BackColor="#941922"></HeaderStyle>
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                                  <ItemTemplate>
                                      <telerik:RadComboBox ID="RCB_Loc" runat="server" Width="80px" OnItemsRequested="cboLocation_ItemsRequested"
                                          EnableLoadOnDemand="true" ZIndex="1000000">
                                      </telerik:RadComboBox>
                                      <br />
                                      <telerik:RadComboBox ID="RCB_Loc2" runat="server" Width="80px" OnItemsRequested="cboLocation_ItemsRequested"
                                          EnableLoadOnDemand="true" ZIndex="1000000">
                                      </telerik:RadComboBox>
                                  </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridBoundColumn UniqueName="ReasonCodeTemp" HeaderText="" DataField="ReasonCode"
                                  Visible="false" HeaderStyle-Width="20px">
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ReasonCodeTemp2" HeaderText="" DataField="ReasonCode2"
                                  Visible="false" HeaderStyle-Width="20px">
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="LocTemp" HeaderText="" DataField="Location1"
                                  Visible="false" HeaderStyle-Width="20px">
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="LocTemp2" HeaderText="" DataField="Location2"
                                  Visible="false" HeaderStyle-Width="20px">
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="SkillTemp" HeaderText="" DataField="SchSkill1"
                                  Visible="false" HeaderStyle-Width="20px">
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="SkillTemp2" HeaderText="" DataField="SchSkill2"
                                  Visible="false" HeaderStyle-Width="20px">
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="SchID1" HeaderText="" DataField="SchID1" Display="false"
                                  HeaderStyle-Width="20px">
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="SchID2" HeaderText="" DataField="SchID2" Display="false"
                                  HeaderStyle-Width="20px">
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="SchSubj1" HeaderText="" DataField="SchSubj1"
                                  Visible="false" HeaderStyle-Width="20px">
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="SchSubj2" HeaderText="" DataField="SchSubj2"
                                  Visible="false" HeaderStyle-Width="20px">
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="TxnRemarks" HeaderText="Remarks" DataField="TxnRemarks"
                                  HeaderStyle-Width="200px">
                                  <ItemStyle BackColor="#F2F2F2"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockIn" ReadOnly="true" HeaderText="Clk1" ItemStyle-BackColor="#F6EFD7"
                                  DataField="ClockIn1" HeaderStyle-Width="20px" DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockOut" ReadOnly="true" HeaderText="Clk2"
                                  DataField="ClockOut1" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="20px"
                                  DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockIn2" ReadOnly="true" HeaderText="Clk3"
                                  DataField="ClockIn2" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="20px" DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockOut2" ReadOnly="true" HeaderText="Clk4"
                                  DataField="ClockOut2" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="20px"
                                  DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockIn3" ReadOnly="true" HeaderText="Clk5"
                                  DataField="ClockIn3" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="20px" DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockOut3" ReadOnly="true" HeaderText="Clk6"
                                  DataField="ClockOut3" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="20px"
                                  DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockIn4" ReadOnly="true" HeaderText="Clk7"
                                  DataField="ClockIn4" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="20px" DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockOut4" ReadOnly="true" HeaderText="Clk8"
                                  DataField="ClockOut4" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="20px"
                                  DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockIn5" ReadOnly="true" HeaderText="Clk9"
                                  DataField="ClockIn5" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="20px" DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockOut5" ReadOnly="true" HeaderText="Clk10"
                                  DataField="ClockOut5" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="20px"
                                  DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockIn6" ReadOnly="true" HeaderText="Clk11"
                                  DataField="ClockIn6" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="20px" DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="ClockOut6" ReadOnly="true" HeaderText="Clk12"
                                  DataField="ClockOut6" ItemStyle-BackColor="#F6EFD7" HeaderStyle-Width="20px"
                                  DataFormatString="{0:HH:mm}">
                                  <ItemStyle BackColor="#F6EFD7"></ItemStyle>
                              </telerik:GridBoundColumn>
                          </Columns>
                      </MasterTableView>
                      <ClientSettings>
                          <ClientEvents OnGridCreating="GridCreated4" OnGridCreated="gvViewTransCreated"></ClientEvents>
                          <Scrolling AllowScroll="true" SaveScrollPosition="true" FrozenColumnsCount="2" UseStaticHeaders="true" />
                      </ClientSettings>
                  </telerik:RadGrid>
                  <telerik:GridDropDownListColumnEditor ID="ddlEditor" DropDownStyle-CssClass="ddl"
                      runat="server" />
                  <telerik:GridDropDownListColumnEditor ID="ddlReason" DropDownStyle-CssClass="ddlReasonCss"
                      runat="server" />
              </td>
          </tr>
      </table>
  </div>
Angel Petrov
Telerik team
 answered on 26 Sep 2014
8 answers
1.1K+ views
We have a scenario where there is a column that contains html-formatted text, which could run into several paragraphs. We'd like to have this show up in a tooltip when the mouse is hovered anywhere over the grid row, not just on a single cell.

Is that possible? Any code examples?

Thanks in advance.
Kishor
Top achievements
Rank 2
 answered on 26 Sep 2014
8 answers
541 views
Hi everyone,

Is it possible to hide the Collapse/Expand  button in a RadTree. Is there for example a set_expandable() javascript function ???

Regards,
Sebastien.
Krishna
Top achievements
Rank 1
 answered on 26 Sep 2014
1 answer
93 views
Is there a way to select from a grid and then have that selection be available to copy to the clipboard? A coworker would like that feature and I wasn't sure that exists!

Pavlina
Telerik team
 answered on 25 Sep 2014
0 answers
80 views
I have a RadComboBox with checked items allowed and I can store the values in the database all works perfect.

What I need to know is when I load the page and parse in a record Id how you I check the items in the combobox that where saved in the database?

Hope this makes sense

Simon
Simon
Top achievements
Rank 1
 asked on 25 Sep 2014
2 answers
567 views
I have a RadGrid with a numbers column that is filterable and sortable. While the column's datatype is set to integer, there is no filtering function for contains. It is just set for 'exact'. The way I figured out how to get around this is to change the column's datatype to a string. The filtering then functions perfectly.

The sorting, however, breaks. If the numbers have different lengths, it raises an issue.

Here's a quick example: You have three numbers: 100, 70, 400.
Sorting ascending as per integer column: 70, 100, 400.
Sorting ascending as per string column: 100, 400, 70.

Is there a way for me to have the filtering capabilities of a string column while preserving the sorting of the integer column?
Alexander
Top achievements
Rank 1
 answered on 25 Sep 2014
1 answer
122 views
Hi,
How can I as follows

foreach (TreeListDataItem item in treeList.Items)
{
   if(Convert.ToInt32(item.GetDataKeyValue("ID"))>=20000)
   item.Select.Enabled = false;                    
}

I want to use as attach file
ahmet
Top achievements
Rank 1
 answered on 25 Sep 2014
2 answers
199 views
Hello,

I am trying to prevent the user from using
negative values in two columns in my radgrid. I think that it might be easier for us to make a check in code behind.

We have made a method in code behind which should
get the value/values of the cells that has been edited by the user(only two
columns). And for some reason that method returns the old value, look below.

Example;

An order has a total price of 500 euro. If I change
this to 450 euro and push save changes then our method should print out 450
euro.. but it doesn’t. It prints out the first value of 500 euro which
frustrates me.

This method Is called using “onitemupdated” in the
radgrid

SubCheckFields(sender AsObject, e As Telerik.Web.UI.GridUpdatedEventArgs)

        Dim item
As
GridDataItem =TryCast(e.Item, GridDataItem)

        Dim
itemValue AsString= item("Quantity").Text

       
MsgBox(itemValue)

        EndSub

I want to make a check in our method to see if the
value is negative or not.. if negative it shouldn’t save anything and just show
a message to the user.. if the edited value is positive

It should save the changes.

 

So basically we need;

When the save changes is pressed it should;

1.  Call the method in the code-behind.
2.  Check if some of the values in the two colums are negative.
3.  If negative – Abort/error message
4.  If positive – Save changes

Furthermore it shouldn’t use the aspx
Updatecommand (since we use the code behind), how do we turn off this?

Also, is there an easier way to do this?

Code: code

Kind Regards
Matias
Top achievements
Rank 1
 answered on 25 Sep 2014
6 answers
260 views
Hi, 
I have a Radgrid  with :
<telerik:GridTemplateColumn UniqueName="Restricted" HeaderText="Restrict" FilterControlAltText="Filter Restricted column" Reorderable="False" Resizable="False" ShowSortIcon="False">
<ItemTemplate>
<asp:CheckBox ID="cbRistrict" runat="server" AutoPostBack="true" OnCheckedChanged="cbRistrict_OnCheckedChanged" ></asp:CheckBox>

<asp:ImageButton ID="cbRestrictedImageButton" runat="server" ImageUrl="~/Images/Lock-Restricted.png" ImageAlign="Baseline"></asp:ImageButton>

</ItemTemplate>
                                                                                                                 
</telerik:GridTemplateColumn>

How to find the imagebutton in the radgrid in clientside?

I have tried :
var j = $get("<%=IndexHidden.ClientID %>");
var grid = $find("<%=ToolkitSections.ClientID %>");
var masterTable = grid.get_masterTableView();
var gridItemElement = masterTable.get_dataItems()[j.value].findElement("cbRestrictedImageButton");

and even


var gridItemElement = masterTable.get_dataItems()[j.value].findControl("cbRestrictedImageButton");

but none of them is working well. would you please help me to find the imagebutton?

FYI: imagebutton is invisible by default and j is the index of selected item(checkbox) in radgrid.


shemein
Top achievements
Rank 1
 answered on 25 Sep 2014
1 answer
120 views
I am using a RadTreeList to display items, a RadContextMenu (Insert, Update, Delete) for when right clicking on a Tree Item and a RadWindowManager to help open a popup window on RadContextMenu ItemClick. When they click Insert or Update a dialog window opens smoothly they save, the dialog closes, treelist rebinds perfectly. When they click Delete I do not need to open a Window just run the code for deleting and then RadTreeList.Rebind();

Rebind will not work because of this item in my RadAjaxManager. The reason it is in here is so the dialogs open smoothly when the context menu is clicked:
<telerik:AjaxSetting AjaxControlID="rcMenu">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
    </UpdatedControls>
</telerik:AjaxSetting>

Here is how I have my Context Menu setup:
<telerik:RadContextMenu ID="rcMenu" runat="server" OnItemClick="rcMenu_ItemClick" EnableRoundedCorners="true" EnableShadows="true">
                <Items>
                    <telerik:RadMenuItem Text="Insert" Value="Insert"></telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="Modify" Value="Edit"></telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="Delete" Value="Delete"></telerik:RadMenuItem>
               </Items>
</telerik:RadContextMenu>
 
 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true" VisibleOnPageLoad="true" EnableViewState="false">
    </telerik:RadWindowManager>

Does anyone know of any workarounds so I can get the smooth dialog openings for Insert and Update, and for delete the page will still rebind the treelist when I call RadTreeList.Rebind();?
Maria Ilieva
Telerik team
 answered on 25 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?