Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
842 views
Hi,  radgrid
    I wish to get the value of the datafield of a column programmatically, however when I type Columns[0]., intellisence
does not show the datafield option. I have to use the Uniquename instead, however this will not always be the same as the datafield and thus could cause problems. Please help.




GridFilteringItem item = MasterTableView.GetItems(GridItemType.FilteringItem)[0] as GridFilteringItem;
                
             
                for (int i = 0; i < Columns.Count - 1; i++)
                    {

                    Type colType = Columns[i].DataType;
                    Telerik.Web.UI.GridColumn column = Columns[i];
                    string colName = MasterTableView.Columns[i].UniqueName;

                    if (colType == typeof(System.String) && (Columns[i].Visible))
                    {
Andrey
Telerik team
 answered on 19 Nov 2012
1 answer
108 views
Hi,
     How can I hide the cancel button in edit form from code behind. thanks in advance
Allen
Shinu
Top achievements
Rank 2
 answered on 19 Nov 2012
2 answers
309 views
Hi,
     How can I change the color of the selected row in the grid.
thanks
RT
Ryan
Top achievements
Rank 1
 answered on 19 Nov 2012
0 answers
41 views
On moving the grid to right most then there is misalignment in header and data . I am using office silver 2007 theme and gridlines are enabled and columns width is fixed . Master table's table layout fixed property is not reflecting anything .The problem is only in IE not in any other browser . Currently i am using IE9.  kindly help me for that 
Mukul
Top achievements
Rank 1
 asked on 19 Nov 2012
3 answers
71 views
Hi Team,

 I am new to RadScheduler. Currently in our project, we need to implement resize , drag and drop appointments in radscheduler 2011.1.519.35 version.
Are these features already implemented in RadScheduler 2011.1.519.35?

Regards,
Mallesh.
 
Plamen
Telerik team
 answered on 19 Nov 2012
3 answers
184 views
I have a RadGrid with 8 Columns. The last 5 columns are editable. however what I am trying  to achieve is :

On first edit all 5 editable cells are empty, but initially need the last 3 cells to remain uneditable unless something is entered into the first two cells. 

Can anyone guide me on how to do that?

Thx

Mark
Shinu
Top achievements
Rank 2
 answered on 19 Nov 2012
2 answers
155 views
hi

i am trying to use the radmenu with peritem templates as i want some specific functionality there , i saw several of your demos where you had buttons etc inside a menu item , and they had Server OnClick events attached to them.

when i set up the menu with the template , it gives me no option to access the controls on the server side , or even attach an event to it , 
this is a rough copy of the menu , but on the server side i cannot access any of the controls in it .

<telerik:RadMenu ID="RadMenu1" runat="server" Height="30px" Skin="WebBlue" Width="100%"
            ClientIDMode="AutoID">
            <Items>
                <telerik:RadMenuItem runat="server" AccessKey="M" Text="My Dashboards">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Edit">
                    <Items>
                        <telerik:RadMenuItem Text="Rename dashboard" AccessKey="S" PostBack="true" />
                        <telerik:RadMenuItem Text="Set as default dashboard" AccessKey="R" PostBack="true" />
                        <telerik:RadMenuItem Text="Delete current dashboard" AccessKey="D" PostBack="true" />
                        <telerik:RadMenuItem Text="Delete multiple dashboards" runat="server">
                            <GroupSettings Height="600px" Flow="Vertical"></GroupSettings>
                            <Items>
                                <telerik:RadMenuItem CssClass="rmItemE" runat="server">
                                    <ItemTemplate>
                                        <asp:CheckBoxList ID="DeleteDash" runat="server">
                                        </asp:CheckBoxList>
                                        <asp:Button runat="server" OnClientClick="if(!confirm('Are you certain you want to delete?')){return false;}"
                                            Text="Delete selected" ID="deleteseldbs" />
                                    </ItemTemplate>
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Share dashboard" AccessKey="W" />
                        <telerik:RadMenuItem Text="Print selected charts" AccessKey="o">
                            <Items>
                                <telerik:RadMenuItem Text="1 chart on each page" Value="1">
                                    <Items>
                                        <telerik:RadMenuItem CssClass="rmItemE">
                                            <ItemTemplate>
                                                <asp:CheckBoxList runat="server" ID="pdfmentexts">
                                                    <asp:ListItem Text="Caption" Value="C"></asp:ListItem>
                                                    <asp:ListItem Text="Private note" Value="P"></asp:ListItem>
                                                    <asp:ListItem Text="Shared note" Value="S"></asp:ListItem>
                                                </asp:CheckBoxList>
                                                <asp:Button ID="Button6" runat="server" Text="Create pdf" />
                                            </ItemTemplate>
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="2 charts on each page" Value="2">
                                    <Items>
                                        <telerik:RadMenuItem CssClass="rmItemE">
                                            <ItemTemplate>
                                                <asp:CheckBoxList ID="CheckBoxList1" runat="server">
                                                    <asp:ListItem Text="Caption" Value="C"></asp:ListItem>
                                                    <asp:ListItem Text="Private note" Value="P"></asp:ListItem>
                                                    <asp:ListItem Text="Shared note" Value="S"></asp:ListItem>
                                                </asp:CheckBoxList>
                                                <asp:Button ID="Button2_pdf" runat="server" Text="Create pdf" />
                                            </ItemTemplate>
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="4 charts on each page" Value="4">
                                    <Items>
                                        <telerik:RadMenuItem CssClass="rmItemE">
                                            <ItemTemplate>
                                                <asp:CheckBoxList ID="CheckBoxList2" runat="server">
                                                    <asp:ListItem Text="Caption" Value="C"></asp:ListItem>
                                                    <asp:ListItem Text="Private note" Value="P"></asp:ListItem>
                                                    <asp:ListItem Text="Shared note" Value="S"></asp:ListItem>
                                                </asp:CheckBoxList>
                                                <telerik:RadButton ID="btnCreatePDF" runat="server" Text="Create pdf" EnableBrowserButtonStyle="True"
                                                    OnClick="btnCreatePDF_Click">
                                                </telerik:RadButton>
                                            </ItemTemplate>
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Export selected to PowerPoint" AccessKey="i">
                            <Items>
                                <telerik:RadMenuItem Text="1 chart on each page" Value="1" />
                            </Items>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Copy this dashboard" AccessKey="M" />
                        <telerik:RadMenuItem Text="MultiCopy dashboards" AccessKey="G" />
                        <telerik:RadMenuItem Text="Select all items" AccessKey="C" />
                        <telerik:RadMenuItem Text="Link to this dashboard" />
                    </Items>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Shared Dashboards">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Back to main Menu" NavigateUrl="Default.aspx">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Current Dashboard :" Width="400px">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Logged in as :">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
Princy
Top achievements
Rank 2
 answered on 19 Nov 2012
1 answer
122 views
Hi all,

I've been using the RadControls (particularly RadGrid) for about a month now and i just found a weird bug with my RadGrid app when I tried to add additional condition to the sqldatasource query string. 

in my scenario, i have a list of employees and I'd like to exempt the Resigned employees from the active duty list by using the following query:
[code]
<asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings: grabber %>"
        SelectCommand="SELECT [DriversID], [Name], [DOB], [POB], [IDNumber], [LicenseNumber], [Address1], [Address2], [Mobile],
                              [Phone], [Country]
                       FROM [Drivers] WHERE DriversID = @DriversID AND Resigned is NULL"
        runat="server">
[/code] theoretically this should work however I'm quite surprised to find that the RadGrid still displays those Resigned employees. I've tried numerous query combinations to no avail. I hope someone could shed a little light into this. thanks in advance
Bernard
Top achievements
Rank 2
 answered on 19 Nov 2012
1 answer
129 views
I am using a radtabstrip with a radmultipage. When I click a button on pageview1 I want to dynamically create and add controls to the radAjaxPanel on pageview2. When I run my application I click the button and the controls are not being displayed in the panel at all.

EDIT- If I move the AjaxPanel Outside of the Multipage PageView it works! But I need to use it inside the pageview.

Markup (I didnt include everything)
<telerik:AjaxSetting AjaxControlID="radButtonStep3Next">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radAjaxPanel" />
                <telerik:AjaxUpdatedControl ControlID="radTabStripAddAssetWizard"  />
                <telerik:AjaxUpdatedControl ControlID="radMultiPageAddAsset" />
            </UpdatedControls>
</telerik:AjaxSetting>
<telerik:RadButton ID="radButtonStep3Next" runat="server"
                Text="Next" Skin="Sunset" ValidationGroup="validationGroupStep3"
                onclick="radButtonStep3Next_Click"></telerik:RadButton>
<telerik:RadAjaxPanel ID="radAjaxPanel" runat="server">
 </telerik:RadAjaxPanel>

CodeBehind
private void GenerateCompanyControls()
      {
  
          TextBox txtbx = new TextBox() { ID = "testTextBox" };
          radAjaxPanel.Controls.Add(txtbx);
  
      }
protected void radButtonStep3Next_Click(object sender, EventArgs e)
 {
     GenerateCompanyControls();
 }
Brett
Top achievements
Rank 1
 answered on 19 Nov 2012
1 answer
82 views
When going into edit mode either by clicking the edit command button or double clicking the row, is it possible to keep the row highlighted a different color so it is obvious which row is being edited?

Also, is it possible to auto scroll the edit form into view.  For instance if I click the edit command button on the last visible row in the gridview, you then have to scroll down to find the edit form.  I would like to auto scroll to it for the user.

Thanks,
Derek
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Nov 2012
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?