Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
107 views
Hai,

How to invoke the grid itemcommand event on a button click with command as filter. I have to filter the grid when I click on a button which is not in the grid. So I have to call the itemcommand event on this button click. How can I do this?

Thanks & regards,
Regeesh
Shinu
Top achievements
Rank 2
 answered on 09 Aug 2010
1 answer
342 views
Hi,

I have an asp:LinkButton inside of my grid. I need this button to be invisible when the user is not logged in and visible when logged in. The problem I'm having is that I'm not sure how to access this button's ID to control it.

here is my code:

<telerik:RadGrid ID="gridEventsWebinars" runat="server" AutoGenerateColumns="false"
                    ShowHeader="false" EnableEmbeddedSkins="False" OnNeedDataSource="gridEventsWebinars_NeedDataSource"
                    OnColumnCreated="gridEventsWebinars_ColumnCreated" OnItemCreated="gridEventsWebinars_ItemCreated"
                      OnItemCommand="RadGrid_ItemCommand">
                    <HeaderContextMenu EnableEmbeddedSkins="False">
                    </HeaderContextMenu>
                    <MasterTableView DataKeyNames="strCampaignID">
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <SelectFields>
                                    <telerik:GridGroupByField FieldName="strStartMonth" FormatString="{0:MMMM}" HeaderText=" "
                                        HeaderValueSeparator=" " />
                                </SelectFields>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldName="intStartMonth" HeaderText=" " SortOrder="Ascending" />
                                </GroupByFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                        <Columns>
                            <telerik:GridTemplateColumn UniqueName="WebinarID">
                                <ItemTemplate>
                                    <div style="clear: both;">
                                        <div style="float: left;">
                                            <asp:Image ID="imgWebinar" runat="server" ImageUrl="~/img/WebinarIcon24.jpg" ToolTip='<%# Eval("strEventName") %>' /></div>
                                        <div style="position: relative; padding-left: 36px;">
                                            <p>
                                                <asp:Label ID="lblStartDate" runat="server" Text='<%# Eval("dtStartDate", "{0:M/dd/yyyy}") %>'></asp:Label>
                                                |
                                                <asp:Label ID="lblStartTime" runat="server" Text='<%# Eval("dtStartTime", "{0:h:mm tt}") %>'></asp:Label>
                                                â€“
                                                <asp:Label ID="lblEndTime" runat="server" Text='<%# Eval("dtEndTime", "{0:h:mm tt}") %>'></asp:Label>
                                                ET
                                                <br />
                                                <strong>
                                                    <asp:Label ID="lblEventType" runat="server" Text='<%# Eval("strEventType") %>'></asp:Label>
                                                    | </strong><strong>
                                                        <asp:Label ID="lblEventName" runat="server" Text='<%# Eval("strEventName") %>'></asp:Label></strong>
                                                <!-- KK on 05.05.09 -->
                                                <!-- Added description to Webinar listing -->
                                                <br />
                                                <asp:Label ID="lblDescription" runat="server" Text='<%# Eval("strDescription") %>'></asp:Label>
                                                <br />
                                                <!-- JO on 12.16.08 -->
                                                <!-- Added functionally on turn off sign-up -->
                                                <%--<asp:HyperLink ID="linkSignUp" runat="server" NavigateUrl='<%# "~/Contact/webinar-signup.aspx?EventID=" + Eval("intEventID") %>'>Learn More & Register</asp:HyperLink>--%>
                                                <asp:HyperLink ID="linkSignUp" runat="server" NavigateUrl='<%# "EventDetail.aspx?EventID=" + Eval("intEventID") %>'>Learn More</asp:HyperLink>
                                                       
                                                 
                                                <asp:LinkButton ID="RegisterWebinarBtn" runat="server" Text="One-click Registration" CommandName="RegisterWebinarBtn_Command"></asp:LinkButton>
                                                 
                                                 
                                            </p>
                                        </div>
                                    </div>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                        <EditFormSettings>
                            <EditColumn InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif" EditImageUrl="Edit.gif"
                                CancelImageUrl="Cancel.gif">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <GroupHeaderItemStyle Font-Bold="True" Height="30px" CssClass="rgGroupHeader-events" />
                    <ClientSettings AllowExpandCollapse="False" AllowGroupExpandCollapse="False">
                        <Resizing AllowColumnResize="True" />
                    </ClientSettings>
                    <FilterMenu EnableEmbeddedSkins="False">
                    </FilterMenu>
                </telerik:RadGrid>

the button is:
<asp:LinkButton ID="RegisterWebinarBtn" runat="server" Text="One-click Registration" CommandName="RegisterWebinarBtn_Command"></asp:LinkButton>

Thanks
Princy
Top achievements
Rank 2
 answered on 09 Aug 2010
1 answer
91 views

Hi ,
i am using radwindowmanager on my entire application. and in all the pages it works fine except one page.
i dont know the reason for this as i am using multiple radwindowmanager on this page.

here is the code which is working on all pages but not on one particular page..

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Vista"
                         Width="1200px" Height="750px" ReloadOnShow="true" Modal="true"
                                    ShowContentDuringLoad="false" Behavior="Close"
                                    VisibleStatusbar="false">
                            <Windows>
                                <telerik:RadWindow Skin="Vista" ID="AttachmentDialog" runat="server" Title="Document Dialog"
                                    ReloadOnShow="true" Modal="true"
                                    ShowContentDuringLoad="false" Behavior="Close"
                                    VisibleStatusbar="false" OnClientClose="ReloadAttachmentGrid"
                                />
                            
                            </Windows>
                        </telerik:RadWindowManager> 

please suggest where i am doing wrong.on that page after doing all changes the popup size is still small..i mean not 1200 and 750.

Georgi Tunev
Telerik team
 answered on 09 Aug 2010
2 answers
108 views
Good day!
Can I add delete confirmation when I select "Delete" in such a menu?
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandmenu/defaultcs.aspx?product=menu

Is it possible to call to javascript function from such a C# code:
protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
        {
            int radGridClickedRowIndex;

            radGridClickedRowIndex = Convert.ToInt32(Request.Form["radGridClickedRowIndex"]);

            switch (e.Item.Text)
            {
                case "Edit":
                    RadGrid1.Items[radGridClickedRowIndex].Edit = true;
                    RadGrid1.Rebind();
                    break;
                case "Add":
                    RadGrid1.MasterTableView.IsItemInserted = true;
                    RadGrid1.Rebind();
                    break;
                case "Delete":
                    RadGrid1.MasterTableView.PerformDelete(RadGrid1.Items[radGridClickedRowIndex]);
                    break;
            }
        }

?
lina fetisova
Top achievements
Rank 1
 answered on 09 Aug 2010
0 answers
110 views
Hi,

I have been using the GridCheckBoxColumn in the Grid. I do need to invoke a checkbox clicked event when the checkbox is checked or unchecked. Based on the event, the reason for selection(next column) is to be populated or cleared. I am not using the radgrid_itembound method as I am using a customized grid of RadGrid which doesn't give this method exposed.  Please suggest on the checkbox click event.

Regards,
Francita.

Francita
Top achievements
Rank 1
 asked on 07 Aug 2010
2 answers
152 views

Dear All
I need to change text direction of RadEditor from server side on the basis of application language. I mean "rtl" and ltr". I have tried with the following but unable to see any difference. Can you guide me in this regard.

   if (Page.IsPostBack == false)
        {
                      RadData.Attributes.Add("dir", Activity.getLanguageDirection());
}

I have also tried by adding this attribute to full page which is transformed to rtl/ltl but no effect on RADEditor..

Any suggestions??
Aamir Ali Ansari
Top achievements
Rank 2
 answered on 07 Aug 2010
4 answers
275 views
Good Day All

i have a Toolbar button that has a textbox and image buttons, now my problem is that the controls inside the toolbar are not aligned correctly. i would like to have them centered. I have attached the image on how they look and the markup to the definition is

<telerik:RadToolBar ID="RadToolBar1" Runat="server" Width="100%" Height="100%" Skin="Forest">
              <Items>
              <telerik:RadToolBarButton Width="90%" Text="Button1" runat="server">
              <ItemTemplate>
                <asp:ImageButton ID="btnoweb" Height="50" Width="50" runat="server" ImageUrl="~/images/Picture3.png" />
                 
                <asp:ImageButton ID="btnCalender" Height="50" Width="50" runat="server" OnClick="btnCalender_Click" ImageUrl="~/images/CalenderView.png" />
                
                <asp:ImageButton ID="btnAttach" Height="50" Width="50" runat="server" ImageUrl="~/images/Attach.png"/>
                
               <asp:Menu ID="mnuMenu" Height="50" Width="50" runat="server" ></asp:Menu>
               
               <asp:ImageButton ID="imgpose" Height="50" Width="50" runat="server" ImageUrl="~/images/Picture5.png"/>
                <asp:TextBox ID="txtsearch"  Width="650px"  Height="40px" runat="server" ></asp:TextBox>
               <asp:ImageButton ID="ImageButton1" Height="50" Width="50" runat="server" ImageUrl="~/images/Cancel.png" />
              </ItemTemplate>
              </telerik:RadToolBarButton>
              </Items>
             </telerik:RadToolBar>

Thanks
Vuyiswa
Top achievements
Rank 2
 answered on 07 Aug 2010
4 answers
117 views
hello

I needed some custom filter controls. So I created my own column-class:
public class GridColBound : GridBoundColumn

and created my own filter-control:
protected override void SetupFilterControls(TableCell cell)
 {
     base.SetupFilterControls(cell);
     cell.Controls.RemoveAt(0);
     Label _lbl = new Label();
     _lbl.ID = "FilterLabel" + this.DataField;
     _lbl.Visible = true;
     _lbl.Text = "Filter";
     _lbl.BackColor = System.Drawing.Color.Green;
     _lbl.ForeColor = System.Drawing.Color.White;
     _lbl.BorderColor = System.Drawing.Color.Black;
     _lbl.BorderStyle = BorderStyle.Solid;
     cell.Controls.AddAt(0, _lbl);
     cell.Controls.RemoveAt(1);
 }
...

Everything worked as expected, but: No more events are thrown. No ItemCommand, no RadToolBar1_ButtonClick.

What can I do?

thanks

Ralph


Regeesh Joseph
Top achievements
Rank 1
 answered on 07 Aug 2010
1 answer
70 views
Hi all,

 I have a rad grid, that is automatically generated because it must be dynamic. When editting items in the grid I use AutoGenerate='true' because the grid never has the same dataset twice.

When using .ExtractValues, the values are not matching up with the grid.

As an example, my datagrid has 3 columns. ID, A and B.

ID get's set to read only when the form is in edit mode so as to not confuse users. We then have A and B, correctly displayed in the correct order.

But when .ExtractValues pulls out the values, the values for column B go in with Key A and vice-versa.

Any ideas?

Thanks!
Brad
Top achievements
Rank 1
 answered on 07 Aug 2010
1 answer
63 views
I want to have 5-6 tabs each Multipage would have a RadGrid or RadListView on it (amound other things)

Is there a way to set it up so only the active tab is rendering\bloating the viewstate :)

...in my case a user might not even click to any other tabs ever so I don't want any extra bloat coming down

Or is this how it works now?
Cori
Top achievements
Rank 2
 answered on 06 Aug 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?