I'm getting a null vlaue error for args.get_gridDataItem() when i select a row
Here is your code
function
rowSelected(sender, args)
{
//controlID = args.getDataKeyValue("ControlID");
Id = getDataItemKeyValue(sender,args.get_gridDataItem());
currentRowIndex = args.get_gridDataItem().get_element().rowIndex;
$find(
"<%= RadTabStrip1.ClientID %>").set_selectedIndex(0);
GetControlByControlID(controlID, setValues)
}
Whts the problem??
I made two small modifications to the default File Explorer Demo to test a problem I am having, and I was able to repeat the problem on it.
The issue is this:
I added a button to a page and a PreRender event to the file Explorer control on a page with the intention of updating the button text after the prerender event occurs on the file explorer. For some reason, if I upload a new file, the button text is updated as it should be, if I delete an existing file, the pre render event occurs, and the code to change the button text runs, but the text on the button is never updated. Why would I get this result?
/radcontrols_aspnetajax/fileexplorer/examples/default/defaultcs.aspx
take your existing file explorer default demo, and add a button above the text: "Browse to an image and double click to preview."
| <asp:Button ID="btnSubmit" runat="server" Text="Submit" /> |
| protected void FileExplorer1_PreRender(object sender, EventArgs e) |
| { |
| btnSubmit.Text += " | 1"; |
| } |

<telerik:RadGrid ID="RadGrid1" AutoGenerateColumns="false" DataSourceID="LinqDataSource1"
AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" runat="server" style="position:absolute; top:2000px; left:38px; " SkinID="None" >
<Headerstyle BackColor="LightSkyBlue" Font-Bold="True" ForeColor="Black"/>
<pagerstyle mode="NextPrevAndNumeric" BackColor="LightSkyBlue" />
<groupingsettings casesensitive="false" />
<AlternatingItemStyle BackColor="Gainsboro" />
<ItemStyle BackColor="#F9D295" />
<EditItemStyle BackColor="#F9D295" />
<
SelectedItemStyle BackColor="Gold" />
<MasterTableView TableLayout="Auto" >
<Columns>
<telerik:GridBoundColumn UniqueName="ColPlanner"
SortExpression="Planner_Code" HeaderText="Planner Code" DataField="Planner_Code" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColSupplier"
SortExpression="Supplier_Code" HeaderText="Supplier Code" DataField="Supplier_Code" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColFamily"
SortExpression="Product_Family" HeaderText="Product Family" DataField="Product_Family" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColPTC"
SortExpression="Part_Type_Code" HeaderText="Part Type Code" DataField="Part_Type_Code" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColPartNumber"
SortExpression="Part_Number" HeaderText="Part Number" DataField="Part_Number" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColPartDesc"
SortExpression
="Part_Description" HeaderText="Part Description" DataField="Part_Description" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColRule"
SortExpression="Rule" HeaderText="Rule" DataField="Rule" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColTotalTarget"
SortExpression="Total_Inventory_Target" HeaderText="Total Inventory Target" DataField="Total_Inventory_Target" ReadOnly="true" DataFormatString="{0:F0}" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColBuffer"
SortExpression="Buffer_Inventory" HeaderText="Buffer Inventory" DataField="Buffer_Inventory" ReadOnly="true" DataFormatString="{0:F0}">
</telerik:GridBoundColumn>
<telerik:GridNumericColumn UniqueName="ColInvTarget"
SortExpression="Inventory_Target" HeaderText="Inventory Target" DataField="Inventory_Target" DataFormatString="{0:F0}">
</telerik:GridNumericColumn>
<telerik:GridNumericColumn UniqueName="ColKanbanQty"
SortExpression="Kanban_Qty" HeaderText="Kanban Qty" DataField="Kanban_Qty" DataFormatString="{0:F0}">
</telerik:GridNumericColumn>
<telerik:GridNumericColumn UniqueName="ColNumberofRedKanbans"
SortExpression="Number_of_Red_Kanbans" HeaderText="Number of Red Kanbans" DataField="Number_of_Red_Kanbans" DataFormatString="{0:F0}">
</telerik:GridNumericColumn>
<telerik:GridNumericColumn UniqueName="ColNumberofYellowKanbans"
SortExpression="Number_of_Yellow_Kanbans" HeaderText="Number of Yellow Kanbans" DataField="Number_of_Yellow_Kanbans" DataFormatString="{0:F0}">
</telerik:GridNumericColumn>
<telerik:GridNumericColumn UniqueName="ColNumberofGreenKanbans"
SortExpression="Number_of_Green_Kanbans" HeaderText="Number of Green Kanbans" DataField="Number_of_Green_Kanbans" DataFormatString="{0:F0}">
</telerik:GridNumericColumn>
<telerik:GridBoundColumn UniqueName="ColLeadtimeInv"
SortExpression="Leadtime_Inventory" HeaderText="Leadtime Inventory" DataField="Leadtime_Inventory" ReadOnly="true" DataFormatString="{0:F0}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColVariabilityMargin"
SortExpression="Variability_Margin" HeaderText="Variability Margin (Days)" DataField="Variability_Margin" ReadOnly="true" DataFormatString="{0:F0}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColVariabilityPerc"
SortExpression="Variability_Perc" HeaderText="Variability Margin % of Leadtime" DataField="Variability_Perc" ReadOnly="true" DataFormatString="{0:F0}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColComment"
SortExpression="Comment" HeaderText="Calculation Comment" DataField="Comment" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColForecastType"
SortExpression="Forecast_Type" HeaderText="Forecast Type" DataField="Forecast_Type" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColRuleName"
SortExpression="Rule_Name" HeaderText="Rule Name" DataField="Rule_Name" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColDateCalculated"
SortExpression="Date_Calculated" HeaderText="Date Calculated" DataField="Date_Calculated" ReadOnly="true" DataFormatString="{0:d}">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true">
<Resizing
AllowColumnResize="True"
AllowRowResize = "false"
ResizeGridOnColumnResize = "false"
ClipCellContentOnResize = "true"
EnableRealTimeResize = "false" />
</ClientSettings>
</telerik:RadGrid>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="LinqToSql.LinqMonthShowAnalysisData"
TableName="wt107_Final_Inventory_Targets_Kanbans" AutoPage="true" AutoSort="true">
</asp:LinqDataSource>