I have a RadGrid that i use to select records then display said record in a different frame/page. this is working exactly as i want it to.
Starting off, the grid is empty. the customer makes a search and it is then populated with the relevant data.
i need to be able to automatically select the first row and it then fire off the "OnSelectedIndexChanged" function i have created.
i have tried using the
grid.MasterTableView.Items[0].Selected = true;
in my codebehind. and while it does highlight the first row, it does not select/click on it to fire off the "OnSelectedIndexChanged" function.
i have also tried the clientevents options of ongridcreated, ondatabound, etc and they dont work as intended. when the page loads, before the grid is populated these client events keep firing over and over.
i need it to only fire once, when the grid is populated after a search.
I am really stumped here, and could use assistance.
Hi, i'm starting with Telerik.
I'm trying to understand a particular behavior about RowIndex. I'm checking RowIndex of each GridViewItem and it's not going like expected.
Instead of list 1,2,3 it's showing 2, 4, 6. I'm wondering why is it happening.
Hi there,
I am using the RadCheckBoxList and I want to color an individual ButtonListItem.
The attributes propery is not available, so I am not able to set the styling of an individual item.
RadCheckBoxList radCheckBoxList = (RadCheckBoxList)radPanelItem.Items[0].FindControl("radCheckBoxList");
if (radCheckBoxList != null)
{
// Iterate items.
foreach (ButtonListItem radCheckBoxItem in radCheckBoxList.Items)
{
// Set ValueID.
string valueID = radCheckBoxItem.Value;
//
string text = radCheckBoxItem.Text;
// Calculate total checkbox.
int total = CalcCheckBoxTotal(propertyID, valueID, partTable, getPartValuesByCommodityCode.PartValueTable);
radCheckBoxItem.Text = text + " (" + total + ")";
// Set color checkbox to silver when total.
if (total == 0)
{
// radCheckBoxItem.Attributes.Add("style", "color:Silver;");
}
}
}
The property is available when you use the regular System.Web.UI.WebControls.CheckBoxList control.
Any idea how to set the color of an individual item?
Regards,
Marcel
Good Day:
I need to copy the contents out if a cell in a row. I am able to highlight the text, but when I try to right click, I am unable. Any thoughts on the settings I need to change to allow for this?
The setting for my grid are below.
<telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" datasourceid="sqldsJobs"
AllowFilteringByColumn="True" Skin="Telerik" Height="350px" AutoGenerateColumns="False" AllowPaging="True" GridLines="None" >
<MasterTableView ClientDataKeyNames="ukid" AllowMultiColumnSorting="true" DataKeyNames="ukid" datasourceid="sqldsJobs" CommandItemDisplay="Top">
<CommandItemSettings ExportToPdfText="Export to Pdf" ShowAddNewRecordButton="False" ShowExportToExcelButton="True"></CommandItemSettings>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
<Columns> ..... </Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings EnablePostBackOnRowClick="true">
<Selecting AllowRowSelect="True" />
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<FilterMenu EnableImageSprites="False"></FilterMenu>
<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
</telerik:RadGrid>
Thanks,
Omar
I am trying to get all filter editors to have the same width and look align.
Please help, I am new here, still learning.