Hi All,
I am using webdatagrid 12.1 .
I am doing colspan. but in following code grid returning undefined.
var grid = $find('<%= this.webdatagrid1.ClientID%> ');
var rows = grid.get_rows();
var firstRow = rows.get_row(0);
var fistCellElement = firstRow.get_cellByColumnKey('PaymentType').get_element();
fistCellElement.colSpan = 2;
if I use below code grid is giving value Null
grid = $find('<%=webdatagrid1.ClientID%>');
Please help me.
Thanks in Advance.
Thanks & Regards,
Ajay Kandagatla
Hello Ajay,
The earliest event when you can get reference to the WebDataGrid client side object is the Initialize client side event. I assume you are trying to call grid = $find('<%=webdatagrid1.clientid%>'); earlier, when the control is still not initialized and it properly returns null.
Please try to move your code to the Initialize event and see if this works.
function WebDataGrid1_Grid_Initialize(sender, eventArgs)
{
var grid = $find("<%= WebDataGrid1.ClientID %>");
var fistCellElement = firstRow.get_cellByColumnKey('Type').get_element();
}
Hi Histro,
I am new to Infragistics.
I written the same code in WebDataGrid1_Grid_Initialize function and called it from webDataGrid1_InitializeRow method from code behind.
the same error I am getting.
Regards,
Ajay K
Ajay,
Try with WebDataGrid1.ClientID, not webdatagrid1. If that still doesn't work, please send over your page so we can try this out.
Thank you in advance.
Hi,
when I use EnableClientRendering it showing error as LastName not found in following code
<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "LastName")%>,
Please see attached code and guide me to implement rowspan and collspan in it.
Did the suggested about the Initialize event helped ? If so please confirm that. About your next questions - please provide a working sample that I could investigate for you, since you have only sent a small part of your code.
I would also like to note that Infragistics' policy is about keeping a different thread/case for every different issue customers face. Please have this in mind when enquiring about some issue not related to the current one.
That event didn't work fine. still it's returning null.
I tried many ways to achieve rowspan, colspan in my grid.
Please check the attachment and implement rowspan in this.
I want in every column Repeated values should display only once and merge the remaining cells containing same values.
I amusing webdatagrid 12.1
1) That event didn't work fine. still it's returning null.
Please see the attached sample where it is demonstrated how a reference to the grid is get at the Initialize event using
var grid = $find('<%= this.webdatagrid1.ClientID%>');
2) I also want to do RowSpan in grid on loading not on sorting
- http://www.infragistics.com/community/forums/t/93980.aspx
Please let me know if you have further questions on 1). For every discussion on issue 2) please use the other thread.
I hope this helps.
Hello,
Please let me know if you have any further questions on the matter, I will be glad to help.