Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
122 views
Dear All,
    I have developing product in 4 tier architecture by asp.net using c sharp and i have done RadGrid but how navigate from grid page to update page with ID.how to pass id from grid page to update page without using NavigateURL

my code is:
<telerik:RadGrid ID="radgrdUserList" runat="server" AllowPaging="true" AllowSorting="true"
                AutoGenerateColumns="false" >
                <MasterTableView ClientDataKeyNames="ID" DataKeyNames="ID">
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="UserName" HeaderText="User Name">
                            <ItemTemplate>
                                <asp:HyperLink ID="lnkUserName" runat="server" Text='<%#Eval("UserName") %>' NavigateUrl='<%#"~/UserDetails.aspx?ID=" +
                                                                Eval("ID") %>'></asp:HyperLink></ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderText="First Name" UniqueName="FirstName" DataField="FirstName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="Last Name" UniqueName="LastName" DataField="LastName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="Date of Join" UniqueName="DOB" DataField="DOB">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="Created By" UniqueName="CreatedBy" DataField="CreatedBy">
                        </telerik:GridBoundColumn>
                          </Columns>
                </MasterTableView></telerik:RadGrid>

When i click UserName then pass Id from gridview page to update page in code behind code using query string or session, and how to receive ID in update page for update particular row details.
Susi
Top achievements
Rank 1
 answered on 18 Jun 2012
2 answers
165 views
Just bought the telerik controls, have radgrid working on other pages fine, but this one is not selecting the right value from the database. it shows the dropdownlist but it's always the first one.

Select Command returns: 1 or 0 bit value in sql
ColumnName in sql is :EventTitleStatus

The odsGetTitleStatuses: returns a datatable:
Yes: 1
No: 0


   <telerik:GridDropDownColumn DataSourceID="odsGetTitleStatuses"  DataType="System.Int32" HeaderText="Visible"
                    FilterControlAltText="Filter column1 column" ListTextField="StatusText" SortExpression="EventTitleStatus"
                    ListValueField="StatusValue" UniqueName="EventTitleStatus" DataField="EventTitleStatus">
                </telerik:GridDropDownColumn>

What am I doing wrong??
Charles
Top achievements
Rank 1
 answered on 18 Jun 2012
1 answer
239 views
Hi,

I find combobox little complex in its usage.     This is what i wish to do while using it inside grid control , I am using form template (in grid)...

1. I want combo to display intital value as "select"   (to force user to select dropdown)
2. if user does not select it should show error message.  
3. Above should also be true when user resets this choice back to "select" (initial value)
4. Since this is multicolumn using template,   it should display 1st row as "select" in all columns available in multicolumn
    or atleast in 1st column.


I tried doing above but failed on point #2 and Point #4.  

<telerik:RadComboBox Width="250px" HighlightTemplatedItems="true"
                    runat="server"   ID="cbCurrencyCode" AppendDataBoundItems="True"
                    DataSourceID="EntityDataSource2"
                    SelectedValue='<%# Bind("FKCurrencyCode") %>'
                    onitemdatabound="cbCurrencyCode_ItemDataBound"  >
      <Items>
          <telerik:RadComboBoxItem runat="server" Text="- Select -" Value="- Select -" />
      </Items>
     <HeaderTemplate>
            <ul>
                <li class="col1">Code</li>
                <li class="col2">Name</li>
            </ul>
        </HeaderTemplate>
        <ItemTemplate>
            <ul>
                <li class="col1">
                    <%# DataBinder.Eval(Container.DataItem, "CurrencyCode")%></li>
                <li class="col2">
                    <%# DataBinder.Eval(Container.DataItem, "CurrencyName")%></li>
            </ul>
        </ItemTemplate>
                </telerik:RadComboBox>
  
                <br />
  <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="cbCurrencyCode"
InitialValue="- Select -" ErrorMessage="Please select." ValidationGroup="SearchFormValidationGroup"
CssClass="validator" />


protected void cbCurrencyCode_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e)
     {
         e.Item.Text = ((DAL.MasterCurrency)e.Item.DataItem).CurrencyCode;
         //((DataRowView)e.Item.DataItem)["CurrencyCode"].ToString();
         e.Item.Value = ((DAL.MasterCurrency)e.Item.DataItem).CurrencyCode;
         //((DataRowView)e.Item.DataItem)["CurrencyCode"].ToString();
     }


a. I also had to write above code, which i feel is unnecessary and there should be a better approach.
b. Form do get submitted, without doing any selection.  validationcontrol should have stopped, but it did not.
c. first row in the multicolumn list remains blank.  I want that it should display 'Select' and its value also should be "Select" so that validation can stop form submit.


I hope i was able to explain.  Any advice?

Regards












Peter
Telerik team
 answered on 18 Jun 2012
0 answers
100 views
Hi Guys

I attached one image , my client need same as that
Can you please let me know whether i can do like the same in grid
 that view will have some buttons above the cross image which is in the center and link buttons in all other cell
Initially i need to show a grid with same type with out any data
and after the link button is clicked user will insert data

My requirement
1) I need to show the grid same as like this with out any data
2) Whether this type of design is possible .If yes?Please guide

Karthik.K
Karthik Kantharaj
Top achievements
Rank 1
 asked on 18 Jun 2012
1 answer
185 views
Hi,

my problem is a little bit tricky. I will try to explain it as clear as I can.

I am using alot of grid in my application. For the moment I have a function called UpdateDefault which looks like this:

Public Sub GridCGSI_UpdateDefaults(ByVal tmpGrid As RadGrid)
    AddHandler tmpGrid.HeaderContextMenu.ItemCreated, AddressOf GridCGSI_HeaderContextMenu_ItemCreated
 
 
    tmpGrid.CellSpacing = "0"
    tmpGrid.AutoGenerateColumns = False
    tmpGrid.AllowPaging = True
    tmpGrid.PageSize = 40
    tmpGrid.AllowSorting = True
 
    tmpGrid.GridLines = GridLines.None
    tmpGrid.AllowFilteringByColumn = True
    tmpGrid.EnableHeaderContextMenu = True
    tmpGrid.ShowStatusBar = True
 
    tmpGrid.HeaderContextMenu.Enabled = True
 
 
    tmpGrid.GroupingSettings.CaseSensitive = False
    tmpGrid.ClientSettings.AllowColumnHide = True
    tmpGrid.ClientSettings.AllowColumnsReorder = True
    tmpGrid.ClientSettings.AllowKeyboardNavigation = True
    tmpGrid.ClientSettings.EnableRowHoverStyle = True
    tmpGrid.ClientSettings.Selecting.AllowRowSelect = True
    tmpGrid.ClientSettings.Scrolling.AllowScroll = True
    tmpGrid.ClientSettings.Scrolling.UseStaticHeaders = True
    tmpGrid.ClientSettings.Resizing.AllowColumnResize = True
    tmpGrid.ClientSettings.Resizing.AllowResizeToFit = True
    tmpGrid.ClientSettings.Resizing.EnableRealTimeResize = True
 
    tmpGrid.FilterMenu.EnableImageSprites = False
 
    tmpGrid.SortingSettings.SortedAscToolTip = "Trié asc"
    tmpGrid.SortingSettings.SortedDescToolTip = " desc"
    tmpGrid.SortingSettings.SortToolTip = "Cliquez ici pour trier"
    tmpGrid.StatusBarSettings.LoadingText = "Chargement..."
    tmpGrid.StatusBarSettings.ReadyText = GetMessageEx(3282).Texte
 
    tmpGrid.GroupingSettings.CaseSensitive = False
 
    tmpGrid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric
 
 
    tmpGrid.MasterTableView.TableLayout = GridTableLayout.Fixed
    tmpGrid.MasterTableView.EnableHeaderContextAggregatesMenu = "True"
    tmpGrid.MasterTableView.NoMasterRecordsText = "Aucun enregistrement à afficher"
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.ButtonType = GridButtonColumnType.PushButton
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.UpdateImageUrl = "Images/Icons/055-Check-ok-Icon.png"
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.CancelImageUrl = "Images/Icons/056-Check-not-ok-Icon.png"
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.InsertImageUrl = "Images/Icons/055-Check-ok-Icon.png"
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.CancelText = GetMessageEx(5352).Texte
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.UpdateText = GetMessageEx(4479).Texte
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.InsertText = GetMessageEx(3177).Texte
    tmpGrid.MasterTableView.CommandItemSettings.AddNewRecordText = GetMessageEx(3177).Texte
    tmpGrid.MasterTableView.CommandItemSettings.RefreshText = "Rafraîchir"
End Sub

As you can see, I am settings some default settings for my grid. The best way it would be to put this in the grid constructor.

I am not familiar with custom user control. I know I can create a class and inherits from RadGrid and extend the constructor, but I don't know how I can implement this in the xaml and use it properly in code behind.

I need your help Telerik! Could you make me a little Project Sample with an example?

Regards,

- Jocelyn
Jocelyn
Top achievements
Rank 1
 answered on 18 Jun 2012
0 answers
45 views
Hello,

I have a nested RadGrid. I want to be able to expand the selected node when returning to the grid from an edit page. I know how to return to the selected page of the RadGrid, but which property is the selected expanded node?

Thanks
Thomas
Thomas
Top achievements
Rank 1
 asked on 18 Jun 2012
1 answer
151 views
I have this on my RagGrid Edit FormTemplate:              

       <telerik:RadButton ID="RadBtnUpdate" runat="server" Text="Update" CommandName="Update"
                            Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>' CssClass="ComandButton">
                        </telerik:RadButton>
                       
       <telerik:RadButton ID="RadBtnInsert" runat="server" Text="Insert" CommandName="PerformInsert"
                            Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>' CssClass="ComandButton">
                        </telerik:RadButton>

When i "press" insert my "update button" is visible, not "insert button". (on edit appears update button, which is ok)
Any ideea why this?
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2012
7 answers
66 views
Hi all,

In my application I use the RadScheduler control work on MVC3, of course it is not support on MVC3 I must using Web service to bind data. And everything works fine in all browser. But when there are very much items display in the month view( total items close to 700  per month and I set VisibleAppointmentsPerDay="100" to show all of them). In the Firefox 13, IE9, Chrome it should take a froze page in 10s to 20s to loading and drawing all items and when I navigate to next month it takes time longer than that. Especially, in the IE7+ it show a froze page and after that throw an error: Stop running scripts?.

I tried to research to solve that error and i found interesting thing:
http://blogs.msdn.com/b/jpsanders/archive/2008/09/23/a-script-on-this-page-is-causing-internet-explorer-to-run-slowly-if-it-continues-to-run-your-computer-may-become-unresponsive.aspx 
 
That Error script only show on IE7+ when there are more than 5 million line of scripts :(


I am appreciate any support to solve this issue, so far can I use lazy loading in the month view schedule to avoid the froze page???

Plamen
Telerik team
 answered on 18 Jun 2012
0 answers
103 views
Hi
   I am using 2012.1.411.35 version and I have this code which does not work with IE 7 when browser resized but do resize the box on other browsers when resized.

<

 

 

p align="center" style="width:80%;">

<telerik:RadTextBox id="txtDeclineReason" runat="server" Rows="5" TextMode="MultiLine" Width="100%" CssClass="test" Visible="true"></telerik:RadTextBox>

</p>


Any help would be highly appreciated.

Best Regards
Rizwan Bashir

Rizwan
Top achievements
Rank 1
 asked on 18 Jun 2012
1 answer
136 views
That's great to see HTML5 charting controls.
Does the the HtmlChart 2012Q2 have support to stacked bar charts?
Marin Bratanov
Telerik team
 answered on 18 Jun 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?