Hi allI have a WebDataGrid, I fill it in .aspx.ch like ".DataSource = SomeDataTable".The last column is empty and I like to have a button there on each row.OnClick I need to read some informations about the current row.I guess this should be done with TemplateDataField.How can I do this in the code behind after setting the DataSource ?Thanks and best regardsFrank Uray
Hello Frank,I just downloaded the sample and tested it. I could not reproduce the issue with IE. Please ensure that you have added the Windows 7 theme in our ig_res folder. This might be causing the issue. I have removed the ig_res folder in order to lower the size of the archived file.
Hi NikiforI have tried to run your sample,but it does not work, just a blank screen is shown ...I am using the 20112.2025 assemblies: <add assembly="Infragistics4.Web.v11.2, Version=11.2.20112.2025, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB" /> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="Infragistics4.WebUI.Documents.Reports.v11.2, Version=11.2.20112.2025, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB" /> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="Infragistics4.WebUI.Documents.Excel.v11.2, Version=11.2.20112.2025, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB" /> <add assembly="Infragistics4.WebUI.Documents.Word.v11.2, Version=11.2.20112.2025, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB" /> <add assembly="Infragistics4.WebUI.Documents.IO.v11.2, Version=11.2.20112.2025, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB" />Here I send you the modified (only assemblies) solution.RegardsFrank
Hi NikiforSorry, I did not get an eMail notification ...I will take a look tomorrow :-)RegardsFrank
Hello Frank,I have mistaken with my previous response. I am sending you the sample again. I contains the event with the string which is the index of the row. It also contains only one created column which will be templated. Others are auto generated. As you mentioned you know only one control please create it as a template. It will allow you to achieve the desired scenario. In order to prevent duplicating the column when autogenerate creates all the column you can hide the autogenerated column as shown in the sample. If you want to order the columns in a specific way please adjust the visible index property.
Thanks for your answer.This only works because you are duplicating the columns ...When you do this, it does not work any more: if (!IsPostBack) { //BoundDataField bf = new BoundDataField(); //bf.Key = "Column01"; //bf.DataFieldName = "Column01"; //bf.Header.Text = "Column01"; //this.WebDataGrid_Test.Columns.Add(bf); //bf = new BoundDataField(); //bf.Key = "Column02"; //bf.DataFieldName = "Column02"; //bf.Header.Text = "Column02"; //this.WebDataGrid_Test.Columns.Add(bf); //TemplateDataField tf = new TemplateDataField(); //tf.Key = "Button"; //tf.Header.Text = "Button"; //this.WebDataGrid_Test.Columns.Add(tf); }
In my case, the data is coming from a database and I only knowI will have a empty column called "Action". There the button should be.All other columns are dynamicly and I dont know while design time.RegardsFrank